diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 7bf4ddf..624c44a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,6 +7,12 @@ docs/ActionType.md docs/AdAccount.md docs/AdAccountAnalyticsResponse.md docs/AdAccountCreateRequest.md +docs/AdAccountCreateSubscriptionRequest.md +docs/AdAccountCreateSubscriptionRequestPartnerMetadata.md +docs/AdAccountCreateSubscriptionResponse.md +docs/AdAccountGetSubscriptionResponse.md +docs/AdAccountGetSubscriptionResponseAllOf.md +docs/AdAccountGetSubscriptionResponseAllOf1.md docs/AdAccountOwner.md docs/AdAccountsApi.md docs/AdAccountsCountryResponse.md @@ -14,9 +20,13 @@ docs/AdAccountsCountryResponseData.md docs/AdArrayResponse.md docs/AdArrayResponseElement.md docs/AdCommon.md +docs/AdCountry.md docs/AdCreateRequest.md docs/AdGroupArrayResponse.md docs/AdGroupArrayResponseElement.md +docs/AdGroupAudienceSizingRequest.md +docs/AdGroupAudienceSizingRequestKeywords.md +docs/AdGroupAudienceSizingResponse.md docs/AdGroupCommon.md docs/AdGroupCreateRequest.md docs/AdGroupCreateRequestAllOf.md @@ -36,6 +46,8 @@ docs/AdResponse.md docs/AdResponseAllOf.md docs/AdUpdateRequest.md docs/AdUpdateRequest1.md +docs/AdsAnalyticsAdTargetingType.md +docs/AdsAnalyticsCampaignTargetingType.md docs/AdsAnalyticsCreateAsyncRequest.md docs/AdsAnalyticsCreateAsyncRequestAllOf.md docs/AdsAnalyticsCreateAsyncRequestAllOf1.md @@ -47,11 +59,39 @@ docs/AdsAnalyticsMetricsFilter.md docs/AdsAnalyticsResponse.md docs/AdsAnalyticsTargetingType.md docs/AdsApi.md +docs/AdsCreditDiscountsResponse.md +docs/AdsCreditRedeemRequest.md +docs/AdsCreditRedeemResponse.md +docs/AdvancedAuctionApi.md +docs/AdvancedAuctionBidOptions.md +docs/AdvancedAuctionItem.md +docs/AdvancedAuctionItemAllOf.md +docs/AdvancedAuctionItems.md +docs/AdvancedAuctionItemsGetRecord.md +docs/AdvancedAuctionItemsGetRequest.md +docs/AdvancedAuctionItemsSubmitDeleteRecord.md +docs/AdvancedAuctionItemsSubmitRecord.md +docs/AdvancedAuctionItemsSubmitRequest.md +docs/AdvancedAuctionItemsSubmitUpsertRecord.md +docs/AdvancedAuctionItemsSubmitUpsertRecordAllOf.md +docs/AdvancedAuctionKey.md +docs/AdvancedAuctionOperation.md +docs/AdvancedAuctionOperationError.md +docs/AdvancedAuctionProcessedItem.md +docs/AdvancedAuctionProcessedItemAllOf.md +docs/AdvancedAuctionProcessedItems.md docs/AgeBucketList.md docs/AnalyticsDailyMetrics.md docs/AnalyticsMetricsResponse.md docs/AnalyticsResponse.md +docs/AppTypeMultipliers.md +docs/AssetGroupBinding.md +docs/AssetGroupType.md +docs/AssetGroupTypes.md +docs/AssetIdPermissions.md +docs/AssetIdToPermissions.md docs/Audience.md +docs/AudienceAccountType.md docs/AudienceCategory.md docs/AudienceCommon.md docs/AudienceCreateCustomRequest.md @@ -69,18 +109,28 @@ docs/AudienceInsightType.md docs/AudienceInsightsApi.md docs/AudienceInsightsResponse.md docs/AudienceRule.md +docs/AudienceShareType.md +docs/AudienceSharingApi.md docs/AudienceSharingType.md +docs/AudienceSubcategory.md docs/AudienceType.md docs/AudienceUpdateOperationType.md docs/AudienceUpdateRequest.md docs/AudienceUpdateRequest1.md docs/AudiencesApi.md +docs/AuthRespondInvitesBody.md +docs/AuthRespondInvitesBodyAction.md +docs/AuthRespondInvitesBodyInvites.md docs/AvailabilityFilter.md +docs/BaseInviteDataResponse.md +docs/BaseInviteDataResponseInviteData.md docs/BatchOperation.md docs/BatchOperationStatus.md docs/BidFloor.md docs/BidFloorRequest.md docs/BidFloorSpec.md +docs/BillingApi.md +docs/BillingProfilesResponse.md docs/Board.md docs/BoardMedia.md docs/BoardOwner.md @@ -96,6 +146,7 @@ docs/BulkDownloadRequestCampaignFilter.md docs/BulkDownloadResponse.md docs/BulkEntityType.md docs/BulkOutputFormat.md +docs/BulkPinAnalyticsResponse.md docs/BulkReportingJobStatus.md docs/BulkUpsertRequest.md docs/BulkUpsertRequestCreate.md @@ -103,6 +154,23 @@ docs/BulkUpsertRequestUpdate.md docs/BulkUpsertResponse.md docs/BulkUpsertStatus.md docs/BulkUpsertStatusResponse.md +docs/BusinessAccessAssetsApi.md +docs/BusinessAccessError.md +docs/BusinessAccessInviteApi.md +docs/BusinessAccessRelationshipsApi.md +docs/BusinessAccessRole.md +docs/BusinessAccessUserSummary.md +docs/BusinessMemberAssetsSummary.md +docs/BusinessMemberAssetsSummaryAdAccounts.md +docs/BusinessMemberAssetsSummaryProfiles.md +docs/BusinessRole.md +docs/BusinessRoleCheckMode.md +docs/BusinessRoleForMembers.md +docs/BusinessSharedAudience.md +docs/BusinessSharedAudience1.md +docs/BusinessSharedAudienceResponse.md +docs/BusinessSharedAudienceResponse1.md +docs/BusinessesBusinessIdMembersAssetsAccessAccesses.md docs/CampaignCommon.md docs/CampaignCreateCommon.md docs/CampaignCreateCommonAllOf.md @@ -121,14 +189,49 @@ docs/CampaignUpdateRequestAllOf.md docs/CampaignUpdateResponse.md docs/CampaignsAnalyticsResponse.md docs/CampaignsApi.md -docs/CatalogProductGroup.md +docs/CancelInvitesBody.md +docs/Catalog.md +docs/CatalogAllOf.md docs/CatalogsApi.md +docs/CatalogsCreateCreativeAssetsItem.md +docs/CatalogsCreateHotelItem.md +docs/CatalogsCreateReportResponse.md +docs/CatalogsCreateRequest.md +docs/CatalogsCreateRetailItem.md +docs/CatalogsCreativeAssetsAttributes.md +docs/CatalogsCreativeAssetsAttributesAllOf.md +docs/CatalogsCreativeAssetsBatchItem.md +docs/CatalogsCreativeAssetsBatchRequest.md +docs/CatalogsCreativeAssetsFeed.md +docs/CatalogsCreativeAssetsFeedsCreateRequest.md +docs/CatalogsCreativeAssetsFeedsUpdateRequest.md +docs/CatalogsCreativeAssetsItemErrorResponse.md +docs/CatalogsCreativeAssetsItemResponse.md +docs/CatalogsCreativeAssetsItemsBatch.md +docs/CatalogsCreativeAssetsItemsFilter.md +docs/CatalogsCreativeAssetsItemsPostFilter.md +docs/CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest.md +docs/CatalogsCreativeAssetsProduct.md +docs/CatalogsCreativeAssetsProductGroup.md +docs/CatalogsCreativeAssetsProductGroupCreateRequest.md +docs/CatalogsCreativeAssetsProductGroupFilterKeys.md +docs/CatalogsCreativeAssetsProductGroupFilters.md +docs/CatalogsCreativeAssetsProductGroupFiltersAllOf.md +docs/CatalogsCreativeAssetsProductGroupFiltersAnyOf.md +docs/CatalogsCreativeAssetsProductGroupProductCounts.md +docs/CatalogsCreativeAssetsProductGroupUpdateRequest.md +docs/CatalogsCreativeAssetsProductMetadata.md docs/CatalogsDbItem.md +docs/CatalogsDeleteCreativeAssetsItem.md +docs/CatalogsDeleteHotelItem.md +docs/CatalogsDeleteRetailItem.md docs/CatalogsFeed.md docs/CatalogsFeedCredentials.md +docs/CatalogsFeedIngestion.md docs/CatalogsFeedIngestionDetails.md docs/CatalogsFeedIngestionErrors.md docs/CatalogsFeedIngestionInfo.md +docs/CatalogsFeedIngestionWarnings.md docs/CatalogsFeedProcessingResult.md docs/CatalogsFeedProcessingResultFields.md docs/CatalogsFeedProcessingSchedule.md @@ -140,6 +243,33 @@ docs/CatalogsFeedValidationWarnings.md docs/CatalogsFeedsCreateRequest.md docs/CatalogsFeedsUpdateRequest.md docs/CatalogsFormat.md +docs/CatalogsHotelAddress.md +docs/CatalogsHotelAttributes.md +docs/CatalogsHotelAttributesAllOf.md +docs/CatalogsHotelAttributesAllOfMainImage.md +docs/CatalogsHotelBatchItem.md +docs/CatalogsHotelBatchRequest.md +docs/CatalogsHotelFeed.md +docs/CatalogsHotelFeedsCreateRequest.md +docs/CatalogsHotelFeedsUpdateRequest.md +docs/CatalogsHotelGuestRatings.md +docs/CatalogsHotelItemErrorResponse.md +docs/CatalogsHotelItemResponse.md +docs/CatalogsHotelItemsBatch.md +docs/CatalogsHotelItemsFilter.md +docs/CatalogsHotelItemsPostFilter.md +docs/CatalogsHotelListProductsByCatalogBasedFilterRequest.md +docs/CatalogsHotelProduct.md +docs/CatalogsHotelProductGroup.md +docs/CatalogsHotelProductGroupCreateRequest.md +docs/CatalogsHotelProductGroupFilterKeys.md +docs/CatalogsHotelProductGroupFilters.md +docs/CatalogsHotelProductGroupFiltersAllOf.md +docs/CatalogsHotelProductGroupFiltersAnyOf.md +docs/CatalogsHotelProductGroupProductCounts.md +docs/CatalogsHotelProductGroupUpdateRequest.md +docs/CatalogsHotelProductMetadata.md +docs/CatalogsHotelReportParameters.md docs/CatalogsItemValidationDetails.md docs/CatalogsItemValidationErrors.md docs/CatalogsItemValidationIssue.md @@ -151,15 +281,17 @@ docs/CatalogsItemsBatchRequest.md docs/CatalogsItemsCreateBatchRequest.md docs/CatalogsItemsDeleteBatchRequest.md docs/CatalogsItemsDeleteDiscontinuedBatchRequest.md +docs/CatalogsItemsFilters.md +docs/CatalogsItemsPostFilters.md +docs/CatalogsItemsRequest.md docs/CatalogsItemsUpdateBatchRequest.md +docs/CatalogsItemsUpsertBatchRequest.md +docs/CatalogsListProductsByFeedBasedFilter.md docs/CatalogsListProductsByFilterRequest.md -docs/CatalogsListProductsByFilterRequestOneOf.md docs/CatalogsLocale.md docs/CatalogsProduct.md -docs/CatalogsProductGroup.md docs/CatalogsProductGroupCreateRequest.md docs/CatalogsProductGroupCurrencyCriteria.md -docs/CatalogsProductGroupFeedBasedCase.md docs/CatalogsProductGroupFilterKeys.md docs/CatalogsProductGroupFilters.md docs/CatalogsProductGroupFiltersAllOf.md @@ -167,17 +299,58 @@ docs/CatalogsProductGroupFiltersAnyOf.md docs/CatalogsProductGroupFiltersRequest.md docs/CatalogsProductGroupFiltersRequestAnyOf.md docs/CatalogsProductGroupFiltersRequestAnyOf1.md -docs/CatalogsProductGroupMerchantBasedCase.md +docs/CatalogsProductGroupMultipleCountriesCriteria.md docs/CatalogsProductGroupMultipleGenderCriteria.md +docs/CatalogsProductGroupMultipleMediaTypesCriteria.md docs/CatalogsProductGroupMultipleStringCriteria.md docs/CatalogsProductGroupMultipleStringListCriteria.md docs/CatalogsProductGroupPricingCriteria.md -docs/CatalogsProductGroupProductCounts.md +docs/CatalogsProductGroupPricingCurrencyCriteria.md +docs/CatalogsProductGroupProductCountsVertical.md docs/CatalogsProductGroupStatus.md docs/CatalogsProductGroupType.md docs/CatalogsProductGroupUpdateRequest.md -docs/CatalogsProductMetadata.md +docs/CatalogsReport.md +docs/CatalogsReportDistributionIssueFilter.md +docs/CatalogsReportDistributionStats.md +docs/CatalogsReportFeedIngestionFilter.md +docs/CatalogsReportFeedIngestionStats.md +docs/CatalogsReportParameters.md +docs/CatalogsReportStats.md +docs/CatalogsRetailBatchRequest.md +docs/CatalogsRetailFeed.md +docs/CatalogsRetailFeedsCreateRequest.md +docs/CatalogsRetailFeedsUpdateRequest.md +docs/CatalogsRetailItemErrorResponse.md +docs/CatalogsRetailItemResponse.md +docs/CatalogsRetailItemsBatch.md +docs/CatalogsRetailItemsFilter.md +docs/CatalogsRetailItemsPostFilter.md +docs/CatalogsRetailListProductsByCatalogBasedFilterRequest.md +docs/CatalogsRetailProduct.md +docs/CatalogsRetailProductGroup.md +docs/CatalogsRetailProductGroupCreateRequest.md +docs/CatalogsRetailProductGroupProductCounts.md +docs/CatalogsRetailProductGroupUpdateRequest.md +docs/CatalogsRetailProductMetadata.md +docs/CatalogsRetailReportParameters.md docs/CatalogsStatus.md +docs/CatalogsType.md +docs/CatalogsUpdatableCreativeAssetsAttributes.md +docs/CatalogsUpdatableHotelAttributes.md +docs/CatalogsUpdateCreativeAssetsItem.md +docs/CatalogsUpdateHotelItem.md +docs/CatalogsUpdateRetailItem.md +docs/CatalogsUpsertCreativeAssetsItem.md +docs/CatalogsUpsertHotelItem.md +docs/CatalogsUpsertRetailItem.md +docs/CatalogsVerticalBatchRequest.md +docs/CatalogsVerticalFeedsCreateRequest.md +docs/CatalogsVerticalFeedsUpdateRequest.md +docs/CatalogsVerticalProductGroup.md +docs/CatalogsVerticalProductGroupCreateRequest.md +docs/CatalogsVerticalProductGroupUpdateRequest.md +docs/CatalogsVerticalsListProductsByCatalogBasedFilterRequest.md docs/ConditionFilter.md docs/ConversionApiResponse.md docs/ConversionApiResponseEvents.md @@ -203,10 +376,26 @@ docs/ConversionTagType.md docs/ConversionTagsApi.md docs/ConversionTagsOcpmEligibleResponse.md docs/Country.md +docs/CountryFilter.md +docs/CreateAssetAccessRequestBody.md +docs/CreateAssetAccessRequestBodyAssetRequests.md +docs/CreateAssetAccessRequestErrorMessage.md +docs/CreateAssetAccessRequestResponse.md +docs/CreateAssetGroupBody.md +docs/CreateAssetGroupResponse.md +docs/CreateAssetInvitesRequest.md +docs/CreateAssetInvitesRequestItem.md +docs/CreateInvitesResultsResponseArray.md +docs/CreateInvitesResultsResponseArrayInvite.md +docs/CreateInvitesResultsResponseArrayItems.md docs/CreateMMMReportRequest.md docs/CreateMMMReportRequestAllOf.md docs/CreateMMMReportResponse.md docs/CreateMMMReportResponseData.md +docs/CreateMembershipOrPartnershipInvitesBody.md +docs/CreativeAssetsIdFilter.md +docs/CreativeAssetsProcessingRecord.md +docs/CreativeAssetsVisibilityType.md docs/CreativeType.md docs/Currency.md docs/CurrencyFilter.md @@ -221,20 +410,41 @@ docs/CustomerListUpdateRequest.md docs/CustomerListsApi.md docs/DataOutputFormat.md docs/DataStatus.md +docs/DeleteAssetGroupBody.md +docs/DeleteAssetGroupResponse.md +docs/DeleteAssetGroupResponseExceptions.md +docs/DeleteInvitesResultsResponseArray.md +docs/DeleteInvitesResultsResponseArrayException.md +docs/DeleteInvitesResultsResponseArrayItems.md +docs/DeleteMemberAccessResult.md +docs/DeleteMemberAccessResultsResponseArray.md +docs/DeletePartnerAssetAccessBody.md +docs/DeletePartnerAssetAccessBodyAccesses.md +docs/DeletePartnerAssetsResult.md +docs/DeletePartnerAssetsResultsResponseArray.md +docs/DeletePartnersRequest.md +docs/DeletePartnersResponse.md +docs/DeletedMembersResponse.md docs/DeliveryMetricsResponse.md docs/DeliveryMetricsResponseItems.md +docs/DetailedError.md docs/EnhancedMatchStatusType.md docs/EntityStatus.md docs/Error.md docs/Exception.md docs/FeedFields.md +docs/FeedFields1.md +docs/FeedFields2.md docs/FollowUserRequest.md docs/Gender.md docs/GenderFilter.md docs/GenderList.md docs/GetAudiencesOrderBy.md +docs/GetBusinessAssetTypeResponse.md +docs/GetBusinessAssetsResponse.md docs/GetMMMReportResponse.md docs/GetMMMReportResponseData.md +docs/GetPartnerAssetsResponse.md docs/GoogleProductCategory0Filter.md docs/GoogleProductCategory1Filter.md docs/GoogleProductCategory2Filter.md @@ -243,18 +453,39 @@ docs/GoogleProductCategory4Filter.md docs/GoogleProductCategory5Filter.md docs/GoogleProductCategory6Filter.md docs/Granularity.md +docs/GridClickType.md +docs/HotelIdFilter.md +docs/HotelProcessingRecord.md docs/ImageDetails.md docs/ImageMetadata.md +docs/ImageMetadataImages.md docs/InlineObject.md +docs/InlineObject1.md +docs/IntegrationLog.md +docs/IntegrationLogClientError.md +docs/IntegrationLogClientRequest.md +docs/IntegrationLogsInvalidLogResponse.md +docs/IntegrationLogsInvalidLogResponseRejectedLogs.md +docs/IntegrationLogsRequest.md +docs/IntegrationLogsSuccessResponse.md docs/IntegrationMetadata.md docs/IntegrationRecord.md docs/IntegrationRequest.md docs/IntegrationRequestPatch.md docs/IntegrationsApi.md docs/Interest.md -docs/InterestsApi.md +docs/InviteAssetsSummary.md +docs/InviteAssetsSummaryAdAccounts.md +docs/InviteAssetsSummaryProfiles.md +docs/InviteBusinessRoleBinding.md +docs/InviteExceptionResponse.md +docs/InviteResponse.md +docs/InviteStatus.md +docs/InviteType.md docs/ItemAttributes.md docs/ItemAttributesAllOf.md +docs/ItemAttributesRequest.md +docs/ItemAttributesRequestAllOf.md docs/ItemBatchRecord.md docs/ItemCreateBatchRecord.md docs/ItemDeleteBatchRecord.md @@ -267,9 +498,12 @@ docs/ItemResponse.md docs/ItemResponseAnyOf.md docs/ItemResponseAnyOf1.md docs/ItemUpdateBatchRecord.md +docs/ItemUpsertBatchRecord.md docs/ItemValidationEvent.md docs/Keyword.md +docs/KeywordAllOf.md docs/KeywordError.md +docs/KeywordList.md docs/KeywordMetrics.md docs/KeywordMetricsResponse.md docs/KeywordUpdate.md @@ -281,20 +515,38 @@ docs/KeywordsRequest.md docs/KeywordsResponse.md docs/L1InterestList.md docs/Language.md +docs/LeadAdsApi.md +docs/LeadFormArrayResponse.md +docs/LeadFormArrayResponseItems.md docs/LeadFormCommon.md +docs/LeadFormCommonPolicyLinks.md +docs/LeadFormCreateRequest.md docs/LeadFormQuestion.md docs/LeadFormQuestionFieldType.md docs/LeadFormQuestionType.md docs/LeadFormResponse.md docs/LeadFormResponseAllOf.md docs/LeadFormStatus.md +docs/LeadFormTestRequest.md +docs/LeadFormTestResponse.md +docs/LeadFormUpdateRequest.md +docs/LeadFormUpdateRequestAllOf.md docs/LeadFormsApi.md +docs/LeadsExportApi.md +docs/LeadsExportCreateRequest.md +docs/LeadsExportCreateResponse.md +docs/LeadsExportResponseData.md +docs/LeadsExportStatus.md docs/LineItem.md docs/LinkedBusiness.md +docs/MMMReportingColumn.md +docs/MMMReportingTargetingType.md docs/MatchType.md docs/MatchTypeResponse.md docs/MaxPriceFilter.md docs/MediaApi.md +docs/MediaType.md +docs/MediaTypeFilter.md docs/MediaUpload.md docs/MediaUploadAllOf.md docs/MediaUploadAllOfUploadParameters.md @@ -302,6 +554,9 @@ docs/MediaUploadDetails.md docs/MediaUploadRequest.md docs/MediaUploadStatus.md docs/MediaUploadType.md +docs/MemberBusinessRole.md +docs/MembersToDeleteBody.md +docs/MembersToDeleteBodyMembers.md docs/Metrics.md docs/MetricsReportingLevel.md docs/MetricsResponse.md @@ -310,17 +565,24 @@ docs/NonNullableCatalogsCurrency.md docs/NonNullableProductAvailabilityType.md docs/NullableCatalogsItemFieldType.md docs/NullableCurrency.md +docs/OauthAccessTokenRequestClientCredentials.md +docs/OauthAccessTokenRequestClientCredentialsAllOf.md docs/OauthAccessTokenRequestCode.md docs/OauthAccessTokenRequestCodeAllOf.md docs/OauthAccessTokenRequestRefresh.md docs/OauthAccessTokenRequestRefreshAllOf.md docs/OauthAccessTokenResponse.md +docs/OauthAccessTokenResponseClientCredentials.md docs/OauthAccessTokenResponseCode.md docs/OauthAccessTokenResponseCodeAllOf.md +docs/OauthAccessTokenResponseEverlastingRefresh.md +docs/OauthAccessTokenResponseEverlastingRefreshAllOf.md docs/OauthAccessTokenResponseIntegrationRefresh.md docs/OauthAccessTokenResponseRefresh.md +docs/OauthAccessTokenResponseRefreshAllOf.md docs/OauthApi.md docs/ObjectiveType.md +docs/OperationType.md docs/OptimizationGoalMetadata.md docs/OptimizationGoalMetadataConversionTagV3GoalMetadata.md docs/OptimizationGoalMetadataConversionTagV3GoalMetadataAttributionWindows.md @@ -338,8 +600,13 @@ docs/OrderLinesApi.md docs/OrderLinesArrayResponse.md docs/PacingDeliveryType.md docs/Paginated.md +docs/PartnerType.md +docs/Permissions.md +docs/PermissionsResponse.md +docs/PermissionsWithOwner.md docs/Pin.md docs/PinAnalyticsMetricsResponse.md +docs/PinAnalyticsMetricsResponseDailyMetrics.md docs/PinAnalyticsResponse.md docs/PinCreate.md docs/PinMedia.md @@ -369,31 +636,78 @@ docs/PinUpdateCarouselSlots.md docs/PinsApi.md docs/PinterestTagEventData.md docs/PlacementGroupType.md +docs/PlacementMultipliers.md +docs/PriceFilter.md docs/ProductAvailabilityType.md docs/ProductGroupAnalyticsResponse.md docs/ProductGroupPromotion.md docs/ProductGroupPromotionCreateRequest.md +docs/ProductGroupPromotionCreateRequestElement.md +docs/ProductGroupPromotionCreateRequestElementAllOf.md docs/ProductGroupPromotionResponse.md +docs/ProductGroupPromotionResponseElement.md docs/ProductGroupPromotionResponseItem.md docs/ProductGroupPromotionUpdateRequest.md docs/ProductGroupPromotionsApi.md +docs/ProductGroupReferenceFilter.md docs/ProductGroupSummaryStatus.md -docs/ProductGroupsApi.md -docs/ProductGroupsCreateRequestFeedBaseCase.md docs/ProductType0Filter.md docs/ProductType1Filter.md docs/ProductType2Filter.md docs/ProductType3Filter.md docs/ProductType4Filter.md +docs/QuizPinData.md +docs/QuizPinOption.md +docs/QuizPinQuestion.md +docs/QuizPinResult.md docs/RelatedTerms.md docs/RelatedTermsRelatedTermsList.md docs/ReportingColumnAsync.md docs/ResourcesApi.md +docs/RespondToInvitesResponseArray.md +docs/RespondToInvitesResponseArrayItems.md +docs/Role.md +docs/SSIOAccountAddress.md +docs/SSIOAccountItem.md +docs/SSIOAccountPMPName.md +docs/SSIOAccountResponse.md +docs/SSIOCreateInsertionOrderRequest.md +docs/SSIOCreateInsertionOrderRequestAllOf.md +docs/SSIOCreateInsertionOrderResponse.md +docs/SSIOEditInsertionOrderRequest.md +docs/SSIOEditInsertionOrderRequestAllOf.md +docs/SSIOEditInsertionOrderResponse.md +docs/SSIOInsertionOrderCommon.md +docs/SSIOInsertionOrderStatus.md +docs/SSIOInsertionOrderStatusResponse.md +docs/SSIOOrderLine.md docs/SearchApi.md +docs/SharedAudience.md +docs/SharedAudience1.md +docs/SharedAudienceAccount.md +docs/SharedAudienceCommon.md +docs/SharedAudienceResponse.md +docs/SharedAudienceResponse1.md +docs/SharedAudienceResponseCommon.md docs/SingleInterestTargetingOptionResponse.md +docs/SummaryPin.md +docs/TargetingAdvertiserCountry.md docs/TargetingOptionResponse.md docs/TargetingSpec.md +docs/TargetingSpecAppType.md docs/TargetingSpecSHOPPINGRETARGETING.md +docs/TargetingTemplateApi.md +docs/TargetingTemplateAudienceSizing.md +docs/TargetingTemplateAudienceSizingReachEstimate.md +docs/TargetingTemplateCommon.md +docs/TargetingTemplateCreate.md +docs/TargetingTemplateCreateAllOf.md +docs/TargetingTemplateGetResponseData.md +docs/TargetingTemplateGetResponseData1.md +docs/TargetingTemplateKeyword.md +docs/TargetingTemplateResponseData.md +docs/TargetingTemplateResponseData1.md +docs/TargetingTemplateUpdateRequest.md docs/TargetingTypeFilter.md docs/TemplateResponse.md docs/TemplateResponseDateRange.md @@ -415,14 +729,38 @@ docs/TrendingKeywordsResponse.md docs/TrendingKeywordsResponseTrends.md docs/TrendsSupportedRegion.md docs/UpdatableItemAttributes.md +docs/UpdateAssetGroupBody.md +docs/UpdateAssetGroupBodyAssetGroupsToUpdate.md +docs/UpdateAssetGroupResponse.md +docs/UpdateAssetGroupResponseExceptions.md +docs/UpdateInvitesResultsResponseArray.md +docs/UpdateInvitesResultsResponseArrayItems.md +docs/UpdateMaskBidOptionField.md +docs/UpdateMaskFieldType.md +docs/UpdateMemberAssetAccessBody.md +docs/UpdateMemberAssetAccessBodyAccesses.md +docs/UpdateMemberAssetsResultsResponseArray.md +docs/UpdateMemberAssetsResultsResponseArrayItems.md +docs/UpdateMemberBusinessRoleBody.md +docs/UpdateMemberResult.md +docs/UpdateMemberResultsResponseArray.md +docs/UpdatePartnerAssetAccessBody.md +docs/UpdatePartnerAssetAccessBodyAccesses.md +docs/UpdatePartnerAssetsResult.md +docs/UpdatePartnerAssetsResultsResponseArray.md +docs/UpdatePartnerResultsResponseArray.md +docs/UpdatePartnerResultsResponseArrayItems.md docs/UserAccountApi.md +docs/UserBusinessRoleBinding.md docs/UserFollowingFeedType.md docs/UserListOperationType.md docs/UserListType.md +docs/UserSingleAssetBinding.md docs/UserSummary.md docs/UserWebsiteSummary.md docs/UserWebsiteVerificationCode.md docs/UserWebsiteVerifyRequest.md +docs/UsersForIndividualAssetResponse.md docs/VideoMetadata.md git_push.sh openapi_generated/__init__.py @@ -431,27 +769,34 @@ openapi_generated/pinterest_client/api/__init__.py openapi_generated/pinterest_client/api/ad_accounts_api.py openapi_generated/pinterest_client/api/ad_groups_api.py openapi_generated/pinterest_client/api/ads_api.py +openapi_generated/pinterest_client/api/advanced_auction_api.py openapi_generated/pinterest_client/api/audience_insights_api.py +openapi_generated/pinterest_client/api/audience_sharing_api.py openapi_generated/pinterest_client/api/audiences_api.py +openapi_generated/pinterest_client/api/billing_api.py openapi_generated/pinterest_client/api/boards_api.py openapi_generated/pinterest_client/api/bulk_api.py +openapi_generated/pinterest_client/api/business_access_assets_api.py +openapi_generated/pinterest_client/api/business_access_invite_api.py +openapi_generated/pinterest_client/api/business_access_relationships_api.py openapi_generated/pinterest_client/api/campaigns_api.py openapi_generated/pinterest_client/api/catalogs_api.py openapi_generated/pinterest_client/api/conversion_events_api.py openapi_generated/pinterest_client/api/conversion_tags_api.py openapi_generated/pinterest_client/api/customer_lists_api.py openapi_generated/pinterest_client/api/integrations_api.py -openapi_generated/pinterest_client/api/interests_api.py openapi_generated/pinterest_client/api/keywords_api.py +openapi_generated/pinterest_client/api/lead_ads_api.py openapi_generated/pinterest_client/api/lead_forms_api.py +openapi_generated/pinterest_client/api/leads_export_api.py openapi_generated/pinterest_client/api/media_api.py openapi_generated/pinterest_client/api/oauth_api.py openapi_generated/pinterest_client/api/order_lines_api.py openapi_generated/pinterest_client/api/pins_api.py openapi_generated/pinterest_client/api/product_group_promotions_api.py -openapi_generated/pinterest_client/api/product_groups_api.py openapi_generated/pinterest_client/api/resources_api.py openapi_generated/pinterest_client/api/search_api.py +openapi_generated/pinterest_client/api/targeting_template_api.py openapi_generated/pinterest_client/api/terms_api.py openapi_generated/pinterest_client/api/terms_of_service_api.py openapi_generated/pinterest_client/api/user_account_api.py @@ -465,15 +810,25 @@ openapi_generated/pinterest_client/model/action_type.py openapi_generated/pinterest_client/model/ad_account.py openapi_generated/pinterest_client/model/ad_account_analytics_response.py openapi_generated/pinterest_client/model/ad_account_create_request.py +openapi_generated/pinterest_client/model/ad_account_create_subscription_request.py +openapi_generated/pinterest_client/model/ad_account_create_subscription_request_partner_metadata.py +openapi_generated/pinterest_client/model/ad_account_create_subscription_response.py +openapi_generated/pinterest_client/model/ad_account_get_subscription_response.py +openapi_generated/pinterest_client/model/ad_account_get_subscription_response_all_of.py +openapi_generated/pinterest_client/model/ad_account_get_subscription_response_all_of1.py openapi_generated/pinterest_client/model/ad_account_owner.py openapi_generated/pinterest_client/model/ad_accounts_country_response.py openapi_generated/pinterest_client/model/ad_accounts_country_response_data.py openapi_generated/pinterest_client/model/ad_array_response.py openapi_generated/pinterest_client/model/ad_array_response_element.py openapi_generated/pinterest_client/model/ad_common.py +openapi_generated/pinterest_client/model/ad_country.py openapi_generated/pinterest_client/model/ad_create_request.py openapi_generated/pinterest_client/model/ad_group_array_response.py openapi_generated/pinterest_client/model/ad_group_array_response_element.py +openapi_generated/pinterest_client/model/ad_group_audience_sizing_request.py +openapi_generated/pinterest_client/model/ad_group_audience_sizing_request_keywords.py +openapi_generated/pinterest_client/model/ad_group_audience_sizing_response.py openapi_generated/pinterest_client/model/ad_group_common.py openapi_generated/pinterest_client/model/ad_group_create_request.py openapi_generated/pinterest_client/model/ad_group_create_request_all_of.py @@ -492,6 +847,8 @@ openapi_generated/pinterest_client/model/ad_response.py openapi_generated/pinterest_client/model/ad_response_all_of.py openapi_generated/pinterest_client/model/ad_update_request.py openapi_generated/pinterest_client/model/ad_update_request1.py +openapi_generated/pinterest_client/model/ads_analytics_ad_targeting_type.py +openapi_generated/pinterest_client/model/ads_analytics_campaign_targeting_type.py openapi_generated/pinterest_client/model/ads_analytics_create_async_request.py openapi_generated/pinterest_client/model/ads_analytics_create_async_request_all_of.py openapi_generated/pinterest_client/model/ads_analytics_create_async_request_all_of1.py @@ -502,11 +859,38 @@ openapi_generated/pinterest_client/model/ads_analytics_get_async_response.py openapi_generated/pinterest_client/model/ads_analytics_metrics_filter.py openapi_generated/pinterest_client/model/ads_analytics_response.py openapi_generated/pinterest_client/model/ads_analytics_targeting_type.py +openapi_generated/pinterest_client/model/ads_credit_discounts_response.py +openapi_generated/pinterest_client/model/ads_credit_redeem_request.py +openapi_generated/pinterest_client/model/ads_credit_redeem_response.py +openapi_generated/pinterest_client/model/advanced_auction_bid_options.py +openapi_generated/pinterest_client/model/advanced_auction_item.py +openapi_generated/pinterest_client/model/advanced_auction_item_all_of.py +openapi_generated/pinterest_client/model/advanced_auction_items.py +openapi_generated/pinterest_client/model/advanced_auction_items_get_record.py +openapi_generated/pinterest_client/model/advanced_auction_items_get_request.py +openapi_generated/pinterest_client/model/advanced_auction_items_submit_delete_record.py +openapi_generated/pinterest_client/model/advanced_auction_items_submit_record.py +openapi_generated/pinterest_client/model/advanced_auction_items_submit_request.py +openapi_generated/pinterest_client/model/advanced_auction_items_submit_upsert_record.py +openapi_generated/pinterest_client/model/advanced_auction_items_submit_upsert_record_all_of.py +openapi_generated/pinterest_client/model/advanced_auction_key.py +openapi_generated/pinterest_client/model/advanced_auction_operation.py +openapi_generated/pinterest_client/model/advanced_auction_operation_error.py +openapi_generated/pinterest_client/model/advanced_auction_processed_item.py +openapi_generated/pinterest_client/model/advanced_auction_processed_item_all_of.py +openapi_generated/pinterest_client/model/advanced_auction_processed_items.py openapi_generated/pinterest_client/model/age_bucket_list.py openapi_generated/pinterest_client/model/analytics_daily_metrics.py openapi_generated/pinterest_client/model/analytics_metrics_response.py openapi_generated/pinterest_client/model/analytics_response.py +openapi_generated/pinterest_client/model/app_type_multipliers.py +openapi_generated/pinterest_client/model/asset_group_binding.py +openapi_generated/pinterest_client/model/asset_group_type.py +openapi_generated/pinterest_client/model/asset_group_types.py +openapi_generated/pinterest_client/model/asset_id_permissions.py +openapi_generated/pinterest_client/model/asset_id_to_permissions.py openapi_generated/pinterest_client/model/audience.py +openapi_generated/pinterest_client/model/audience_account_type.py openapi_generated/pinterest_client/model/audience_category.py openapi_generated/pinterest_client/model/audience_common.py openapi_generated/pinterest_client/model/audience_create_custom_request.py @@ -523,17 +907,25 @@ openapi_generated/pinterest_client/model/audience_insight_category_common.py openapi_generated/pinterest_client/model/audience_insight_type.py openapi_generated/pinterest_client/model/audience_insights_response.py openapi_generated/pinterest_client/model/audience_rule.py +openapi_generated/pinterest_client/model/audience_share_type.py openapi_generated/pinterest_client/model/audience_sharing_type.py +openapi_generated/pinterest_client/model/audience_subcategory.py openapi_generated/pinterest_client/model/audience_type.py openapi_generated/pinterest_client/model/audience_update_operation_type.py openapi_generated/pinterest_client/model/audience_update_request.py openapi_generated/pinterest_client/model/audience_update_request1.py +openapi_generated/pinterest_client/model/auth_respond_invites_body.py +openapi_generated/pinterest_client/model/auth_respond_invites_body_action.py +openapi_generated/pinterest_client/model/auth_respond_invites_body_invites.py openapi_generated/pinterest_client/model/availability_filter.py +openapi_generated/pinterest_client/model/base_invite_data_response.py +openapi_generated/pinterest_client/model/base_invite_data_response_invite_data.py openapi_generated/pinterest_client/model/batch_operation.py openapi_generated/pinterest_client/model/batch_operation_status.py openapi_generated/pinterest_client/model/bid_floor.py openapi_generated/pinterest_client/model/bid_floor_request.py openapi_generated/pinterest_client/model/bid_floor_spec.py +openapi_generated/pinterest_client/model/billing_profiles_response.py openapi_generated/pinterest_client/model/board.py openapi_generated/pinterest_client/model/board_media.py openapi_generated/pinterest_client/model/board_owner.py @@ -547,6 +939,7 @@ openapi_generated/pinterest_client/model/bulk_download_request_campaign_filter.p openapi_generated/pinterest_client/model/bulk_download_response.py openapi_generated/pinterest_client/model/bulk_entity_type.py openapi_generated/pinterest_client/model/bulk_output_format.py +openapi_generated/pinterest_client/model/bulk_pin_analytics_response.py openapi_generated/pinterest_client/model/bulk_reporting_job_status.py openapi_generated/pinterest_client/model/bulk_upsert_request.py openapi_generated/pinterest_client/model/bulk_upsert_request_create.py @@ -554,6 +947,20 @@ openapi_generated/pinterest_client/model/bulk_upsert_request_update.py openapi_generated/pinterest_client/model/bulk_upsert_response.py openapi_generated/pinterest_client/model/bulk_upsert_status.py openapi_generated/pinterest_client/model/bulk_upsert_status_response.py +openapi_generated/pinterest_client/model/business_access_error.py +openapi_generated/pinterest_client/model/business_access_role.py +openapi_generated/pinterest_client/model/business_access_user_summary.py +openapi_generated/pinterest_client/model/business_member_assets_summary.py +openapi_generated/pinterest_client/model/business_member_assets_summary_ad_accounts.py +openapi_generated/pinterest_client/model/business_member_assets_summary_profiles.py +openapi_generated/pinterest_client/model/business_role.py +openapi_generated/pinterest_client/model/business_role_check_mode.py +openapi_generated/pinterest_client/model/business_role_for_members.py +openapi_generated/pinterest_client/model/business_shared_audience.py +openapi_generated/pinterest_client/model/business_shared_audience1.py +openapi_generated/pinterest_client/model/business_shared_audience_response.py +openapi_generated/pinterest_client/model/business_shared_audience_response1.py +openapi_generated/pinterest_client/model/businesses_business_id_members_assets_access_accesses.py openapi_generated/pinterest_client/model/campaign_common.py openapi_generated/pinterest_client/model/campaign_create_common.py openapi_generated/pinterest_client/model/campaign_create_common_all_of.py @@ -571,13 +978,48 @@ openapi_generated/pinterest_client/model/campaign_update_request.py openapi_generated/pinterest_client/model/campaign_update_request_all_of.py openapi_generated/pinterest_client/model/campaign_update_response.py openapi_generated/pinterest_client/model/campaigns_analytics_response.py -openapi_generated/pinterest_client/model/catalog_product_group.py +openapi_generated/pinterest_client/model/cancel_invites_body.py +openapi_generated/pinterest_client/model/catalog.py +openapi_generated/pinterest_client/model/catalog_all_of.py +openapi_generated/pinterest_client/model/catalogs_create_creative_assets_item.py +openapi_generated/pinterest_client/model/catalogs_create_hotel_item.py +openapi_generated/pinterest_client/model/catalogs_create_report_response.py +openapi_generated/pinterest_client/model/catalogs_create_request.py +openapi_generated/pinterest_client/model/catalogs_create_retail_item.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_attributes.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_attributes_all_of.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_batch_item.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_batch_request.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_feed.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_feeds_create_request.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_feeds_update_request.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_item_error_response.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_item_response.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_items_batch.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_items_filter.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_items_post_filter.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_list_products_by_catalog_based_filter_request.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_product.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_create_request.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filter_keys.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters_all_of.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters_any_of.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_product_counts.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_update_request.py +openapi_generated/pinterest_client/model/catalogs_creative_assets_product_metadata.py openapi_generated/pinterest_client/model/catalogs_db_item.py +openapi_generated/pinterest_client/model/catalogs_delete_creative_assets_item.py +openapi_generated/pinterest_client/model/catalogs_delete_hotel_item.py +openapi_generated/pinterest_client/model/catalogs_delete_retail_item.py openapi_generated/pinterest_client/model/catalogs_feed.py openapi_generated/pinterest_client/model/catalogs_feed_credentials.py +openapi_generated/pinterest_client/model/catalogs_feed_ingestion.py openapi_generated/pinterest_client/model/catalogs_feed_ingestion_details.py openapi_generated/pinterest_client/model/catalogs_feed_ingestion_errors.py openapi_generated/pinterest_client/model/catalogs_feed_ingestion_info.py +openapi_generated/pinterest_client/model/catalogs_feed_ingestion_warnings.py openapi_generated/pinterest_client/model/catalogs_feed_processing_result.py openapi_generated/pinterest_client/model/catalogs_feed_processing_result_fields.py openapi_generated/pinterest_client/model/catalogs_feed_processing_schedule.py @@ -589,6 +1031,33 @@ openapi_generated/pinterest_client/model/catalogs_feed_validation_warnings.py openapi_generated/pinterest_client/model/catalogs_feeds_create_request.py openapi_generated/pinterest_client/model/catalogs_feeds_update_request.py openapi_generated/pinterest_client/model/catalogs_format.py +openapi_generated/pinterest_client/model/catalogs_hotel_address.py +openapi_generated/pinterest_client/model/catalogs_hotel_attributes.py +openapi_generated/pinterest_client/model/catalogs_hotel_attributes_all_of.py +openapi_generated/pinterest_client/model/catalogs_hotel_attributes_all_of_main_image.py +openapi_generated/pinterest_client/model/catalogs_hotel_batch_item.py +openapi_generated/pinterest_client/model/catalogs_hotel_batch_request.py +openapi_generated/pinterest_client/model/catalogs_hotel_feed.py +openapi_generated/pinterest_client/model/catalogs_hotel_feeds_create_request.py +openapi_generated/pinterest_client/model/catalogs_hotel_feeds_update_request.py +openapi_generated/pinterest_client/model/catalogs_hotel_guest_ratings.py +openapi_generated/pinterest_client/model/catalogs_hotel_item_error_response.py +openapi_generated/pinterest_client/model/catalogs_hotel_item_response.py +openapi_generated/pinterest_client/model/catalogs_hotel_items_batch.py +openapi_generated/pinterest_client/model/catalogs_hotel_items_filter.py +openapi_generated/pinterest_client/model/catalogs_hotel_items_post_filter.py +openapi_generated/pinterest_client/model/catalogs_hotel_list_products_by_catalog_based_filter_request.py +openapi_generated/pinterest_client/model/catalogs_hotel_product.py +openapi_generated/pinterest_client/model/catalogs_hotel_product_group.py +openapi_generated/pinterest_client/model/catalogs_hotel_product_group_create_request.py +openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filter_keys.py +openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters.py +openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters_all_of.py +openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters_any_of.py +openapi_generated/pinterest_client/model/catalogs_hotel_product_group_product_counts.py +openapi_generated/pinterest_client/model/catalogs_hotel_product_group_update_request.py +openapi_generated/pinterest_client/model/catalogs_hotel_product_metadata.py +openapi_generated/pinterest_client/model/catalogs_hotel_report_parameters.py openapi_generated/pinterest_client/model/catalogs_item_validation_details.py openapi_generated/pinterest_client/model/catalogs_item_validation_errors.py openapi_generated/pinterest_client/model/catalogs_item_validation_issue.py @@ -600,15 +1069,17 @@ openapi_generated/pinterest_client/model/catalogs_items_batch_request.py openapi_generated/pinterest_client/model/catalogs_items_create_batch_request.py openapi_generated/pinterest_client/model/catalogs_items_delete_batch_request.py openapi_generated/pinterest_client/model/catalogs_items_delete_discontinued_batch_request.py +openapi_generated/pinterest_client/model/catalogs_items_filters.py +openapi_generated/pinterest_client/model/catalogs_items_post_filters.py +openapi_generated/pinterest_client/model/catalogs_items_request.py openapi_generated/pinterest_client/model/catalogs_items_update_batch_request.py +openapi_generated/pinterest_client/model/catalogs_items_upsert_batch_request.py +openapi_generated/pinterest_client/model/catalogs_list_products_by_feed_based_filter.py openapi_generated/pinterest_client/model/catalogs_list_products_by_filter_request.py -openapi_generated/pinterest_client/model/catalogs_list_products_by_filter_request_one_of.py openapi_generated/pinterest_client/model/catalogs_locale.py openapi_generated/pinterest_client/model/catalogs_product.py -openapi_generated/pinterest_client/model/catalogs_product_group.py openapi_generated/pinterest_client/model/catalogs_product_group_create_request.py openapi_generated/pinterest_client/model/catalogs_product_group_currency_criteria.py -openapi_generated/pinterest_client/model/catalogs_product_group_feed_based_case.py openapi_generated/pinterest_client/model/catalogs_product_group_filter_keys.py openapi_generated/pinterest_client/model/catalogs_product_group_filters.py openapi_generated/pinterest_client/model/catalogs_product_group_filters_all_of.py @@ -616,17 +1087,58 @@ openapi_generated/pinterest_client/model/catalogs_product_group_filters_any_of.p openapi_generated/pinterest_client/model/catalogs_product_group_filters_request.py openapi_generated/pinterest_client/model/catalogs_product_group_filters_request_any_of.py openapi_generated/pinterest_client/model/catalogs_product_group_filters_request_any_of1.py -openapi_generated/pinterest_client/model/catalogs_product_group_merchant_based_case.py +openapi_generated/pinterest_client/model/catalogs_product_group_multiple_countries_criteria.py openapi_generated/pinterest_client/model/catalogs_product_group_multiple_gender_criteria.py +openapi_generated/pinterest_client/model/catalogs_product_group_multiple_media_types_criteria.py openapi_generated/pinterest_client/model/catalogs_product_group_multiple_string_criteria.py openapi_generated/pinterest_client/model/catalogs_product_group_multiple_string_list_criteria.py openapi_generated/pinterest_client/model/catalogs_product_group_pricing_criteria.py -openapi_generated/pinterest_client/model/catalogs_product_group_product_counts.py +openapi_generated/pinterest_client/model/catalogs_product_group_pricing_currency_criteria.py +openapi_generated/pinterest_client/model/catalogs_product_group_product_counts_vertical.py openapi_generated/pinterest_client/model/catalogs_product_group_status.py openapi_generated/pinterest_client/model/catalogs_product_group_type.py openapi_generated/pinterest_client/model/catalogs_product_group_update_request.py -openapi_generated/pinterest_client/model/catalogs_product_metadata.py +openapi_generated/pinterest_client/model/catalogs_report.py +openapi_generated/pinterest_client/model/catalogs_report_distribution_issue_filter.py +openapi_generated/pinterest_client/model/catalogs_report_distribution_stats.py +openapi_generated/pinterest_client/model/catalogs_report_feed_ingestion_filter.py +openapi_generated/pinterest_client/model/catalogs_report_feed_ingestion_stats.py +openapi_generated/pinterest_client/model/catalogs_report_parameters.py +openapi_generated/pinterest_client/model/catalogs_report_stats.py +openapi_generated/pinterest_client/model/catalogs_retail_batch_request.py +openapi_generated/pinterest_client/model/catalogs_retail_feed.py +openapi_generated/pinterest_client/model/catalogs_retail_feeds_create_request.py +openapi_generated/pinterest_client/model/catalogs_retail_feeds_update_request.py +openapi_generated/pinterest_client/model/catalogs_retail_item_error_response.py +openapi_generated/pinterest_client/model/catalogs_retail_item_response.py +openapi_generated/pinterest_client/model/catalogs_retail_items_batch.py +openapi_generated/pinterest_client/model/catalogs_retail_items_filter.py +openapi_generated/pinterest_client/model/catalogs_retail_items_post_filter.py +openapi_generated/pinterest_client/model/catalogs_retail_list_products_by_catalog_based_filter_request.py +openapi_generated/pinterest_client/model/catalogs_retail_product.py +openapi_generated/pinterest_client/model/catalogs_retail_product_group.py +openapi_generated/pinterest_client/model/catalogs_retail_product_group_create_request.py +openapi_generated/pinterest_client/model/catalogs_retail_product_group_product_counts.py +openapi_generated/pinterest_client/model/catalogs_retail_product_group_update_request.py +openapi_generated/pinterest_client/model/catalogs_retail_product_metadata.py +openapi_generated/pinterest_client/model/catalogs_retail_report_parameters.py openapi_generated/pinterest_client/model/catalogs_status.py +openapi_generated/pinterest_client/model/catalogs_type.py +openapi_generated/pinterest_client/model/catalogs_updatable_creative_assets_attributes.py +openapi_generated/pinterest_client/model/catalogs_updatable_hotel_attributes.py +openapi_generated/pinterest_client/model/catalogs_update_creative_assets_item.py +openapi_generated/pinterest_client/model/catalogs_update_hotel_item.py +openapi_generated/pinterest_client/model/catalogs_update_retail_item.py +openapi_generated/pinterest_client/model/catalogs_upsert_creative_assets_item.py +openapi_generated/pinterest_client/model/catalogs_upsert_hotel_item.py +openapi_generated/pinterest_client/model/catalogs_upsert_retail_item.py +openapi_generated/pinterest_client/model/catalogs_vertical_batch_request.py +openapi_generated/pinterest_client/model/catalogs_vertical_feeds_create_request.py +openapi_generated/pinterest_client/model/catalogs_vertical_feeds_update_request.py +openapi_generated/pinterest_client/model/catalogs_vertical_product_group.py +openapi_generated/pinterest_client/model/catalogs_vertical_product_group_create_request.py +openapi_generated/pinterest_client/model/catalogs_vertical_product_group_update_request.py +openapi_generated/pinterest_client/model/catalogs_verticals_list_products_by_catalog_based_filter_request.py openapi_generated/pinterest_client/model/condition_filter.py openapi_generated/pinterest_client/model/conversion_api_response.py openapi_generated/pinterest_client/model/conversion_api_response_events.py @@ -650,10 +1162,26 @@ openapi_generated/pinterest_client/model/conversion_tag_response.py openapi_generated/pinterest_client/model/conversion_tag_type.py openapi_generated/pinterest_client/model/conversion_tags_ocpm_eligible_response.py openapi_generated/pinterest_client/model/country.py +openapi_generated/pinterest_client/model/country_filter.py +openapi_generated/pinterest_client/model/create_asset_access_request_body.py +openapi_generated/pinterest_client/model/create_asset_access_request_body_asset_requests.py +openapi_generated/pinterest_client/model/create_asset_access_request_error_message.py +openapi_generated/pinterest_client/model/create_asset_access_request_response.py +openapi_generated/pinterest_client/model/create_asset_group_body.py +openapi_generated/pinterest_client/model/create_asset_group_response.py +openapi_generated/pinterest_client/model/create_asset_invites_request.py +openapi_generated/pinterest_client/model/create_asset_invites_request_item.py +openapi_generated/pinterest_client/model/create_invites_results_response_array.py +openapi_generated/pinterest_client/model/create_invites_results_response_array_invite.py +openapi_generated/pinterest_client/model/create_invites_results_response_array_items.py +openapi_generated/pinterest_client/model/create_membership_or_partnership_invites_body.py openapi_generated/pinterest_client/model/create_mmm_report_request.py openapi_generated/pinterest_client/model/create_mmm_report_request_all_of.py openapi_generated/pinterest_client/model/create_mmm_report_response.py openapi_generated/pinterest_client/model/create_mmm_report_response_data.py +openapi_generated/pinterest_client/model/creative_assets_id_filter.py +openapi_generated/pinterest_client/model/creative_assets_processing_record.py +openapi_generated/pinterest_client/model/creative_assets_visibility_type.py openapi_generated/pinterest_client/model/creative_type.py openapi_generated/pinterest_client/model/currency.py openapi_generated/pinterest_client/model/currency_filter.py @@ -667,20 +1195,41 @@ openapi_generated/pinterest_client/model/customer_list_request.py openapi_generated/pinterest_client/model/customer_list_update_request.py openapi_generated/pinterest_client/model/data_output_format.py openapi_generated/pinterest_client/model/data_status.py +openapi_generated/pinterest_client/model/delete_asset_group_body.py +openapi_generated/pinterest_client/model/delete_asset_group_response.py +openapi_generated/pinterest_client/model/delete_asset_group_response_exceptions.py +openapi_generated/pinterest_client/model/delete_invites_results_response_array.py +openapi_generated/pinterest_client/model/delete_invites_results_response_array_exception.py +openapi_generated/pinterest_client/model/delete_invites_results_response_array_items.py +openapi_generated/pinterest_client/model/delete_member_access_result.py +openapi_generated/pinterest_client/model/delete_member_access_results_response_array.py +openapi_generated/pinterest_client/model/delete_partner_asset_access_body.py +openapi_generated/pinterest_client/model/delete_partner_asset_access_body_accesses.py +openapi_generated/pinterest_client/model/delete_partner_assets_result.py +openapi_generated/pinterest_client/model/delete_partner_assets_results_response_array.py +openapi_generated/pinterest_client/model/delete_partners_request.py +openapi_generated/pinterest_client/model/delete_partners_response.py +openapi_generated/pinterest_client/model/deleted_members_response.py openapi_generated/pinterest_client/model/delivery_metrics_response.py openapi_generated/pinterest_client/model/delivery_metrics_response_items.py +openapi_generated/pinterest_client/model/detailed_error.py openapi_generated/pinterest_client/model/enhanced_match_status_type.py openapi_generated/pinterest_client/model/entity_status.py openapi_generated/pinterest_client/model/error.py openapi_generated/pinterest_client/model/exception.py openapi_generated/pinterest_client/model/feed_fields.py +openapi_generated/pinterest_client/model/feed_fields1.py +openapi_generated/pinterest_client/model/feed_fields2.py openapi_generated/pinterest_client/model/follow_user_request.py openapi_generated/pinterest_client/model/gender.py openapi_generated/pinterest_client/model/gender_filter.py openapi_generated/pinterest_client/model/gender_list.py openapi_generated/pinterest_client/model/get_audiences_order_by.py +openapi_generated/pinterest_client/model/get_business_asset_type_response.py +openapi_generated/pinterest_client/model/get_business_assets_response.py openapi_generated/pinterest_client/model/get_mmm_report_response.py openapi_generated/pinterest_client/model/get_mmm_report_response_data.py +openapi_generated/pinterest_client/model/get_partner_assets_response.py openapi_generated/pinterest_client/model/google_product_category0_filter.py openapi_generated/pinterest_client/model/google_product_category1_filter.py openapi_generated/pinterest_client/model/google_product_category2_filter.py @@ -689,16 +1238,38 @@ openapi_generated/pinterest_client/model/google_product_category4_filter.py openapi_generated/pinterest_client/model/google_product_category5_filter.py openapi_generated/pinterest_client/model/google_product_category6_filter.py openapi_generated/pinterest_client/model/granularity.py +openapi_generated/pinterest_client/model/grid_click_type.py +openapi_generated/pinterest_client/model/hotel_id_filter.py +openapi_generated/pinterest_client/model/hotel_processing_record.py openapi_generated/pinterest_client/model/image_details.py openapi_generated/pinterest_client/model/image_metadata.py +openapi_generated/pinterest_client/model/image_metadata_images.py openapi_generated/pinterest_client/model/inline_object.py +openapi_generated/pinterest_client/model/inline_object1.py +openapi_generated/pinterest_client/model/integration_log.py +openapi_generated/pinterest_client/model/integration_log_client_error.py +openapi_generated/pinterest_client/model/integration_log_client_request.py +openapi_generated/pinterest_client/model/integration_logs_invalid_log_response.py +openapi_generated/pinterest_client/model/integration_logs_invalid_log_response_rejected_logs.py +openapi_generated/pinterest_client/model/integration_logs_request.py +openapi_generated/pinterest_client/model/integration_logs_success_response.py openapi_generated/pinterest_client/model/integration_metadata.py openapi_generated/pinterest_client/model/integration_record.py openapi_generated/pinterest_client/model/integration_request.py openapi_generated/pinterest_client/model/integration_request_patch.py openapi_generated/pinterest_client/model/interest.py +openapi_generated/pinterest_client/model/invite_assets_summary.py +openapi_generated/pinterest_client/model/invite_assets_summary_ad_accounts.py +openapi_generated/pinterest_client/model/invite_assets_summary_profiles.py +openapi_generated/pinterest_client/model/invite_business_role_binding.py +openapi_generated/pinterest_client/model/invite_exception_response.py +openapi_generated/pinterest_client/model/invite_response.py +openapi_generated/pinterest_client/model/invite_status.py +openapi_generated/pinterest_client/model/invite_type.py openapi_generated/pinterest_client/model/item_attributes.py openapi_generated/pinterest_client/model/item_attributes_all_of.py +openapi_generated/pinterest_client/model/item_attributes_request.py +openapi_generated/pinterest_client/model/item_attributes_request_all_of.py openapi_generated/pinterest_client/model/item_batch_record.py openapi_generated/pinterest_client/model/item_create_batch_record.py openapi_generated/pinterest_client/model/item_delete_batch_record.py @@ -711,9 +1282,12 @@ openapi_generated/pinterest_client/model/item_response.py openapi_generated/pinterest_client/model/item_response_any_of.py openapi_generated/pinterest_client/model/item_response_any_of1.py openapi_generated/pinterest_client/model/item_update_batch_record.py +openapi_generated/pinterest_client/model/item_upsert_batch_record.py openapi_generated/pinterest_client/model/item_validation_event.py openapi_generated/pinterest_client/model/keyword.py +openapi_generated/pinterest_client/model/keyword_all_of.py openapi_generated/pinterest_client/model/keyword_error.py +openapi_generated/pinterest_client/model/keyword_list.py openapi_generated/pinterest_client/model/keyword_metrics.py openapi_generated/pinterest_client/model/keyword_metrics_response.py openapi_generated/pinterest_client/model/keyword_update.py @@ -724,18 +1298,32 @@ openapi_generated/pinterest_client/model/keywords_request.py openapi_generated/pinterest_client/model/keywords_response.py openapi_generated/pinterest_client/model/l1_interest_list.py openapi_generated/pinterest_client/model/language.py +openapi_generated/pinterest_client/model/lead_form_array_response.py +openapi_generated/pinterest_client/model/lead_form_array_response_items.py openapi_generated/pinterest_client/model/lead_form_common.py +openapi_generated/pinterest_client/model/lead_form_common_policy_links.py +openapi_generated/pinterest_client/model/lead_form_create_request.py openapi_generated/pinterest_client/model/lead_form_question.py openapi_generated/pinterest_client/model/lead_form_question_field_type.py openapi_generated/pinterest_client/model/lead_form_question_type.py openapi_generated/pinterest_client/model/lead_form_response.py openapi_generated/pinterest_client/model/lead_form_response_all_of.py openapi_generated/pinterest_client/model/lead_form_status.py +openapi_generated/pinterest_client/model/lead_form_test_request.py +openapi_generated/pinterest_client/model/lead_form_test_response.py +openapi_generated/pinterest_client/model/lead_form_update_request.py +openapi_generated/pinterest_client/model/lead_form_update_request_all_of.py +openapi_generated/pinterest_client/model/leads_export_create_request.py +openapi_generated/pinterest_client/model/leads_export_create_response.py +openapi_generated/pinterest_client/model/leads_export_response_data.py +openapi_generated/pinterest_client/model/leads_export_status.py openapi_generated/pinterest_client/model/line_item.py openapi_generated/pinterest_client/model/linked_business.py openapi_generated/pinterest_client/model/match_type.py openapi_generated/pinterest_client/model/match_type_response.py openapi_generated/pinterest_client/model/max_price_filter.py +openapi_generated/pinterest_client/model/media_type.py +openapi_generated/pinterest_client/model/media_type_filter.py openapi_generated/pinterest_client/model/media_upload.py openapi_generated/pinterest_client/model/media_upload_all_of.py openapi_generated/pinterest_client/model/media_upload_all_of_upload_parameters.py @@ -743,24 +1331,36 @@ openapi_generated/pinterest_client/model/media_upload_details.py openapi_generated/pinterest_client/model/media_upload_request.py openapi_generated/pinterest_client/model/media_upload_status.py openapi_generated/pinterest_client/model/media_upload_type.py +openapi_generated/pinterest_client/model/member_business_role.py +openapi_generated/pinterest_client/model/members_to_delete_body.py +openapi_generated/pinterest_client/model/members_to_delete_body_members.py openapi_generated/pinterest_client/model/metrics.py openapi_generated/pinterest_client/model/metrics_reporting_level.py openapi_generated/pinterest_client/model/metrics_response.py openapi_generated/pinterest_client/model/min_price_filter.py +openapi_generated/pinterest_client/model/mmm_reporting_column.py +openapi_generated/pinterest_client/model/mmm_reporting_targeting_type.py openapi_generated/pinterest_client/model/non_nullable_catalogs_currency.py openapi_generated/pinterest_client/model/non_nullable_product_availability_type.py openapi_generated/pinterest_client/model/nullable_catalogs_item_field_type.py openapi_generated/pinterest_client/model/nullable_currency.py +openapi_generated/pinterest_client/model/oauth_access_token_request_client_credentials.py +openapi_generated/pinterest_client/model/oauth_access_token_request_client_credentials_all_of.py openapi_generated/pinterest_client/model/oauth_access_token_request_code.py openapi_generated/pinterest_client/model/oauth_access_token_request_code_all_of.py openapi_generated/pinterest_client/model/oauth_access_token_request_refresh.py openapi_generated/pinterest_client/model/oauth_access_token_request_refresh_all_of.py openapi_generated/pinterest_client/model/oauth_access_token_response.py +openapi_generated/pinterest_client/model/oauth_access_token_response_client_credentials.py openapi_generated/pinterest_client/model/oauth_access_token_response_code.py openapi_generated/pinterest_client/model/oauth_access_token_response_code_all_of.py +openapi_generated/pinterest_client/model/oauth_access_token_response_everlasting_refresh.py +openapi_generated/pinterest_client/model/oauth_access_token_response_everlasting_refresh_all_of.py openapi_generated/pinterest_client/model/oauth_access_token_response_integration_refresh.py openapi_generated/pinterest_client/model/oauth_access_token_response_refresh.py +openapi_generated/pinterest_client/model/oauth_access_token_response_refresh_all_of.py openapi_generated/pinterest_client/model/objective_type.py +openapi_generated/pinterest_client/model/operation_type.py openapi_generated/pinterest_client/model/optimization_goal_metadata.py openapi_generated/pinterest_client/model/optimization_goal_metadata_conversion_tag_v3_goal_metadata.py openapi_generated/pinterest_client/model/optimization_goal_metadata_conversion_tag_v3_goal_metadata_attribution_windows.py @@ -777,8 +1377,13 @@ openapi_generated/pinterest_client/model/order_lines.py openapi_generated/pinterest_client/model/order_lines_array_response.py openapi_generated/pinterest_client/model/pacing_delivery_type.py openapi_generated/pinterest_client/model/paginated.py +openapi_generated/pinterest_client/model/partner_type.py +openapi_generated/pinterest_client/model/permissions.py +openapi_generated/pinterest_client/model/permissions_response.py +openapi_generated/pinterest_client/model/permissions_with_owner.py openapi_generated/pinterest_client/model/pin.py openapi_generated/pinterest_client/model/pin_analytics_metrics_response.py +openapi_generated/pinterest_client/model/pin_analytics_metrics_response_daily_metrics.py openapi_generated/pinterest_client/model/pin_analytics_response.py openapi_generated/pinterest_client/model/pin_create.py openapi_generated/pinterest_client/model/pin_media.py @@ -807,27 +1412,74 @@ openapi_generated/pinterest_client/model/pin_update.py openapi_generated/pinterest_client/model/pin_update_carousel_slots.py openapi_generated/pinterest_client/model/pinterest_tag_event_data.py openapi_generated/pinterest_client/model/placement_group_type.py +openapi_generated/pinterest_client/model/placement_multipliers.py +openapi_generated/pinterest_client/model/price_filter.py openapi_generated/pinterest_client/model/product_availability_type.py openapi_generated/pinterest_client/model/product_group_analytics_response.py openapi_generated/pinterest_client/model/product_group_promotion.py openapi_generated/pinterest_client/model/product_group_promotion_create_request.py +openapi_generated/pinterest_client/model/product_group_promotion_create_request_element.py +openapi_generated/pinterest_client/model/product_group_promotion_create_request_element_all_of.py openapi_generated/pinterest_client/model/product_group_promotion_response.py +openapi_generated/pinterest_client/model/product_group_promotion_response_element.py openapi_generated/pinterest_client/model/product_group_promotion_response_item.py openapi_generated/pinterest_client/model/product_group_promotion_update_request.py +openapi_generated/pinterest_client/model/product_group_reference_filter.py openapi_generated/pinterest_client/model/product_group_summary_status.py -openapi_generated/pinterest_client/model/product_groups_create_request_feed_base_case.py openapi_generated/pinterest_client/model/product_type0_filter.py openapi_generated/pinterest_client/model/product_type1_filter.py openapi_generated/pinterest_client/model/product_type2_filter.py openapi_generated/pinterest_client/model/product_type3_filter.py openapi_generated/pinterest_client/model/product_type4_filter.py +openapi_generated/pinterest_client/model/quiz_pin_data.py +openapi_generated/pinterest_client/model/quiz_pin_option.py +openapi_generated/pinterest_client/model/quiz_pin_question.py +openapi_generated/pinterest_client/model/quiz_pin_result.py openapi_generated/pinterest_client/model/related_terms.py openapi_generated/pinterest_client/model/related_terms_related_terms_list.py openapi_generated/pinterest_client/model/reporting_column_async.py +openapi_generated/pinterest_client/model/respond_to_invites_response_array.py +openapi_generated/pinterest_client/model/respond_to_invites_response_array_items.py +openapi_generated/pinterest_client/model/role.py +openapi_generated/pinterest_client/model/shared_audience.py +openapi_generated/pinterest_client/model/shared_audience1.py +openapi_generated/pinterest_client/model/shared_audience_account.py +openapi_generated/pinterest_client/model/shared_audience_common.py +openapi_generated/pinterest_client/model/shared_audience_response.py +openapi_generated/pinterest_client/model/shared_audience_response1.py +openapi_generated/pinterest_client/model/shared_audience_response_common.py openapi_generated/pinterest_client/model/single_interest_targeting_option_response.py +openapi_generated/pinterest_client/model/ssio_account_address.py +openapi_generated/pinterest_client/model/ssio_account_item.py +openapi_generated/pinterest_client/model/ssio_account_pmp_name.py +openapi_generated/pinterest_client/model/ssio_account_response.py +openapi_generated/pinterest_client/model/ssio_create_insertion_order_request.py +openapi_generated/pinterest_client/model/ssio_create_insertion_order_request_all_of.py +openapi_generated/pinterest_client/model/ssio_create_insertion_order_response.py +openapi_generated/pinterest_client/model/ssio_edit_insertion_order_request.py +openapi_generated/pinterest_client/model/ssio_edit_insertion_order_request_all_of.py +openapi_generated/pinterest_client/model/ssio_edit_insertion_order_response.py +openapi_generated/pinterest_client/model/ssio_insertion_order_common.py +openapi_generated/pinterest_client/model/ssio_insertion_order_status.py +openapi_generated/pinterest_client/model/ssio_insertion_order_status_response.py +openapi_generated/pinterest_client/model/ssio_order_line.py +openapi_generated/pinterest_client/model/summary_pin.py +openapi_generated/pinterest_client/model/targeting_advertiser_country.py openapi_generated/pinterest_client/model/targeting_option_response.py openapi_generated/pinterest_client/model/targeting_spec.py +openapi_generated/pinterest_client/model/targeting_spec_app_type.py openapi_generated/pinterest_client/model/targeting_spec_shoppingretargeting.py +openapi_generated/pinterest_client/model/targeting_template_audience_sizing.py +openapi_generated/pinterest_client/model/targeting_template_audience_sizing_reach_estimate.py +openapi_generated/pinterest_client/model/targeting_template_common.py +openapi_generated/pinterest_client/model/targeting_template_create.py +openapi_generated/pinterest_client/model/targeting_template_create_all_of.py +openapi_generated/pinterest_client/model/targeting_template_get_response_data.py +openapi_generated/pinterest_client/model/targeting_template_get_response_data1.py +openapi_generated/pinterest_client/model/targeting_template_keyword.py +openapi_generated/pinterest_client/model/targeting_template_response_data.py +openapi_generated/pinterest_client/model/targeting_template_response_data1.py +openapi_generated/pinterest_client/model/targeting_template_update_request.py openapi_generated/pinterest_client/model/targeting_type_filter.py openapi_generated/pinterest_client/model/template_response.py openapi_generated/pinterest_client/model/template_response_date_range.py @@ -847,13 +1499,37 @@ openapi_generated/pinterest_client/model/trending_keywords_response.py openapi_generated/pinterest_client/model/trending_keywords_response_trends.py openapi_generated/pinterest_client/model/trends_supported_region.py openapi_generated/pinterest_client/model/updatable_item_attributes.py +openapi_generated/pinterest_client/model/update_asset_group_body.py +openapi_generated/pinterest_client/model/update_asset_group_body_asset_groups_to_update.py +openapi_generated/pinterest_client/model/update_asset_group_response.py +openapi_generated/pinterest_client/model/update_asset_group_response_exceptions.py +openapi_generated/pinterest_client/model/update_invites_results_response_array.py +openapi_generated/pinterest_client/model/update_invites_results_response_array_items.py +openapi_generated/pinterest_client/model/update_mask_bid_option_field.py +openapi_generated/pinterest_client/model/update_mask_field_type.py +openapi_generated/pinterest_client/model/update_member_asset_access_body.py +openapi_generated/pinterest_client/model/update_member_asset_access_body_accesses.py +openapi_generated/pinterest_client/model/update_member_assets_results_response_array.py +openapi_generated/pinterest_client/model/update_member_assets_results_response_array_items.py +openapi_generated/pinterest_client/model/update_member_business_role_body.py +openapi_generated/pinterest_client/model/update_member_result.py +openapi_generated/pinterest_client/model/update_member_results_response_array.py +openapi_generated/pinterest_client/model/update_partner_asset_access_body.py +openapi_generated/pinterest_client/model/update_partner_asset_access_body_accesses.py +openapi_generated/pinterest_client/model/update_partner_assets_result.py +openapi_generated/pinterest_client/model/update_partner_assets_results_response_array.py +openapi_generated/pinterest_client/model/update_partner_results_response_array.py +openapi_generated/pinterest_client/model/update_partner_results_response_array_items.py +openapi_generated/pinterest_client/model/user_business_role_binding.py openapi_generated/pinterest_client/model/user_following_feed_type.py openapi_generated/pinterest_client/model/user_list_operation_type.py openapi_generated/pinterest_client/model/user_list_type.py +openapi_generated/pinterest_client/model/user_single_asset_binding.py openapi_generated/pinterest_client/model/user_summary.py openapi_generated/pinterest_client/model/user_website_summary.py openapi_generated/pinterest_client/model/user_website_verification_code.py openapi_generated/pinterest_client/model/user_website_verify_request.py +openapi_generated/pinterest_client/model/users_for_individual_asset_response.py openapi_generated/pinterest_client/model/video_metadata.py openapi_generated/pinterest_client/model_utils.py openapi_generated/pinterest_client/models/__init__.py @@ -868,6 +1544,12 @@ test/test_action_type.py test/test_ad_account.py test/test_ad_account_analytics_response.py test/test_ad_account_create_request.py +test/test_ad_account_create_subscription_request.py +test/test_ad_account_create_subscription_request_partner_metadata.py +test/test_ad_account_create_subscription_response.py +test/test_ad_account_get_subscription_response.py +test/test_ad_account_get_subscription_response_all_of.py +test/test_ad_account_get_subscription_response_all_of1.py test/test_ad_account_owner.py test/test_ad_accounts_api.py test/test_ad_accounts_country_response.py @@ -875,9 +1557,13 @@ test/test_ad_accounts_country_response_data.py test/test_ad_array_response.py test/test_ad_array_response_element.py test/test_ad_common.py +test/test_ad_country.py test/test_ad_create_request.py test/test_ad_group_array_response.py test/test_ad_group_array_response_element.py +test/test_ad_group_audience_sizing_request.py +test/test_ad_group_audience_sizing_request_keywords.py +test/test_ad_group_audience_sizing_response.py test/test_ad_group_common.py test/test_ad_group_create_request.py test/test_ad_group_create_request_all_of.py @@ -897,6 +1583,8 @@ test/test_ad_response.py test/test_ad_response_all_of.py test/test_ad_update_request.py test/test_ad_update_request1.py +test/test_ads_analytics_ad_targeting_type.py +test/test_ads_analytics_campaign_targeting_type.py test/test_ads_analytics_create_async_request.py test/test_ads_analytics_create_async_request_all_of.py test/test_ads_analytics_create_async_request_all_of1.py @@ -908,11 +1596,39 @@ test/test_ads_analytics_metrics_filter.py test/test_ads_analytics_response.py test/test_ads_analytics_targeting_type.py test/test_ads_api.py +test/test_ads_credit_discounts_response.py +test/test_ads_credit_redeem_request.py +test/test_ads_credit_redeem_response.py +test/test_advanced_auction_api.py +test/test_advanced_auction_bid_options.py +test/test_advanced_auction_item.py +test/test_advanced_auction_item_all_of.py +test/test_advanced_auction_items.py +test/test_advanced_auction_items_get_record.py +test/test_advanced_auction_items_get_request.py +test/test_advanced_auction_items_submit_delete_record.py +test/test_advanced_auction_items_submit_record.py +test/test_advanced_auction_items_submit_request.py +test/test_advanced_auction_items_submit_upsert_record.py +test/test_advanced_auction_items_submit_upsert_record_all_of.py +test/test_advanced_auction_key.py +test/test_advanced_auction_operation.py +test/test_advanced_auction_operation_error.py +test/test_advanced_auction_processed_item.py +test/test_advanced_auction_processed_item_all_of.py +test/test_advanced_auction_processed_items.py test/test_age_bucket_list.py test/test_analytics_daily_metrics.py test/test_analytics_metrics_response.py test/test_analytics_response.py +test/test_app_type_multipliers.py +test/test_asset_group_binding.py +test/test_asset_group_type.py +test/test_asset_group_types.py +test/test_asset_id_permissions.py +test/test_asset_id_to_permissions.py test/test_audience.py +test/test_audience_account_type.py test/test_audience_category.py test/test_audience_common.py test/test_audience_create_custom_request.py @@ -930,18 +1646,28 @@ test/test_audience_insight_type.py test/test_audience_insights_api.py test/test_audience_insights_response.py test/test_audience_rule.py +test/test_audience_share_type.py +test/test_audience_sharing_api.py test/test_audience_sharing_type.py +test/test_audience_subcategory.py test/test_audience_type.py test/test_audience_update_operation_type.py test/test_audience_update_request.py test/test_audience_update_request1.py test/test_audiences_api.py +test/test_auth_respond_invites_body.py +test/test_auth_respond_invites_body_action.py +test/test_auth_respond_invites_body_invites.py test/test_availability_filter.py +test/test_base_invite_data_response.py +test/test_base_invite_data_response_invite_data.py test/test_batch_operation.py test/test_batch_operation_status.py test/test_bid_floor.py test/test_bid_floor_request.py test/test_bid_floor_spec.py +test/test_billing_api.py +test/test_billing_profiles_response.py test/test_board.py test/test_board_media.py test/test_board_owner.py @@ -957,6 +1683,7 @@ test/test_bulk_download_request_campaign_filter.py test/test_bulk_download_response.py test/test_bulk_entity_type.py test/test_bulk_output_format.py +test/test_bulk_pin_analytics_response.py test/test_bulk_reporting_job_status.py test/test_bulk_upsert_request.py test/test_bulk_upsert_request_create.py @@ -964,6 +1691,23 @@ test/test_bulk_upsert_request_update.py test/test_bulk_upsert_response.py test/test_bulk_upsert_status.py test/test_bulk_upsert_status_response.py +test/test_business_access_assets_api.py +test/test_business_access_error.py +test/test_business_access_invite_api.py +test/test_business_access_relationships_api.py +test/test_business_access_role.py +test/test_business_access_user_summary.py +test/test_business_member_assets_summary.py +test/test_business_member_assets_summary_ad_accounts.py +test/test_business_member_assets_summary_profiles.py +test/test_business_role.py +test/test_business_role_check_mode.py +test/test_business_role_for_members.py +test/test_business_shared_audience.py +test/test_business_shared_audience1.py +test/test_business_shared_audience_response.py +test/test_business_shared_audience_response1.py +test/test_businesses_business_id_members_assets_access_accesses.py test/test_campaign_common.py test/test_campaign_create_common.py test/test_campaign_create_common_all_of.py @@ -982,14 +1726,49 @@ test/test_campaign_update_request_all_of.py test/test_campaign_update_response.py test/test_campaigns_analytics_response.py test/test_campaigns_api.py -test/test_catalog_product_group.py +test/test_cancel_invites_body.py +test/test_catalog.py +test/test_catalog_all_of.py test/test_catalogs_api.py +test/test_catalogs_create_creative_assets_item.py +test/test_catalogs_create_hotel_item.py +test/test_catalogs_create_report_response.py +test/test_catalogs_create_request.py +test/test_catalogs_create_retail_item.py +test/test_catalogs_creative_assets_attributes.py +test/test_catalogs_creative_assets_attributes_all_of.py +test/test_catalogs_creative_assets_batch_item.py +test/test_catalogs_creative_assets_batch_request.py +test/test_catalogs_creative_assets_feed.py +test/test_catalogs_creative_assets_feeds_create_request.py +test/test_catalogs_creative_assets_feeds_update_request.py +test/test_catalogs_creative_assets_item_error_response.py +test/test_catalogs_creative_assets_item_response.py +test/test_catalogs_creative_assets_items_batch.py +test/test_catalogs_creative_assets_items_filter.py +test/test_catalogs_creative_assets_items_post_filter.py +test/test_catalogs_creative_assets_list_products_by_catalog_based_filter_request.py +test/test_catalogs_creative_assets_product.py +test/test_catalogs_creative_assets_product_group.py +test/test_catalogs_creative_assets_product_group_create_request.py +test/test_catalogs_creative_assets_product_group_filter_keys.py +test/test_catalogs_creative_assets_product_group_filters.py +test/test_catalogs_creative_assets_product_group_filters_all_of.py +test/test_catalogs_creative_assets_product_group_filters_any_of.py +test/test_catalogs_creative_assets_product_group_product_counts.py +test/test_catalogs_creative_assets_product_group_update_request.py +test/test_catalogs_creative_assets_product_metadata.py test/test_catalogs_db_item.py +test/test_catalogs_delete_creative_assets_item.py +test/test_catalogs_delete_hotel_item.py +test/test_catalogs_delete_retail_item.py test/test_catalogs_feed.py test/test_catalogs_feed_credentials.py +test/test_catalogs_feed_ingestion.py test/test_catalogs_feed_ingestion_details.py test/test_catalogs_feed_ingestion_errors.py test/test_catalogs_feed_ingestion_info.py +test/test_catalogs_feed_ingestion_warnings.py test/test_catalogs_feed_processing_result.py test/test_catalogs_feed_processing_result_fields.py test/test_catalogs_feed_processing_schedule.py @@ -1001,6 +1780,33 @@ test/test_catalogs_feed_validation_warnings.py test/test_catalogs_feeds_create_request.py test/test_catalogs_feeds_update_request.py test/test_catalogs_format.py +test/test_catalogs_hotel_address.py +test/test_catalogs_hotel_attributes.py +test/test_catalogs_hotel_attributes_all_of.py +test/test_catalogs_hotel_attributes_all_of_main_image.py +test/test_catalogs_hotel_batch_item.py +test/test_catalogs_hotel_batch_request.py +test/test_catalogs_hotel_feed.py +test/test_catalogs_hotel_feeds_create_request.py +test/test_catalogs_hotel_feeds_update_request.py +test/test_catalogs_hotel_guest_ratings.py +test/test_catalogs_hotel_item_error_response.py +test/test_catalogs_hotel_item_response.py +test/test_catalogs_hotel_items_batch.py +test/test_catalogs_hotel_items_filter.py +test/test_catalogs_hotel_items_post_filter.py +test/test_catalogs_hotel_list_products_by_catalog_based_filter_request.py +test/test_catalogs_hotel_product.py +test/test_catalogs_hotel_product_group.py +test/test_catalogs_hotel_product_group_create_request.py +test/test_catalogs_hotel_product_group_filter_keys.py +test/test_catalogs_hotel_product_group_filters.py +test/test_catalogs_hotel_product_group_filters_all_of.py +test/test_catalogs_hotel_product_group_filters_any_of.py +test/test_catalogs_hotel_product_group_product_counts.py +test/test_catalogs_hotel_product_group_update_request.py +test/test_catalogs_hotel_product_metadata.py +test/test_catalogs_hotel_report_parameters.py test/test_catalogs_item_validation_details.py test/test_catalogs_item_validation_errors.py test/test_catalogs_item_validation_issue.py @@ -1012,15 +1818,17 @@ test/test_catalogs_items_batch_request.py test/test_catalogs_items_create_batch_request.py test/test_catalogs_items_delete_batch_request.py test/test_catalogs_items_delete_discontinued_batch_request.py +test/test_catalogs_items_filters.py +test/test_catalogs_items_post_filters.py +test/test_catalogs_items_request.py test/test_catalogs_items_update_batch_request.py +test/test_catalogs_items_upsert_batch_request.py +test/test_catalogs_list_products_by_feed_based_filter.py test/test_catalogs_list_products_by_filter_request.py -test/test_catalogs_list_products_by_filter_request_one_of.py test/test_catalogs_locale.py test/test_catalogs_product.py -test/test_catalogs_product_group.py test/test_catalogs_product_group_create_request.py test/test_catalogs_product_group_currency_criteria.py -test/test_catalogs_product_group_feed_based_case.py test/test_catalogs_product_group_filter_keys.py test/test_catalogs_product_group_filters.py test/test_catalogs_product_group_filters_all_of.py @@ -1028,17 +1836,58 @@ test/test_catalogs_product_group_filters_any_of.py test/test_catalogs_product_group_filters_request.py test/test_catalogs_product_group_filters_request_any_of.py test/test_catalogs_product_group_filters_request_any_of1.py -test/test_catalogs_product_group_merchant_based_case.py +test/test_catalogs_product_group_multiple_countries_criteria.py test/test_catalogs_product_group_multiple_gender_criteria.py +test/test_catalogs_product_group_multiple_media_types_criteria.py test/test_catalogs_product_group_multiple_string_criteria.py test/test_catalogs_product_group_multiple_string_list_criteria.py test/test_catalogs_product_group_pricing_criteria.py -test/test_catalogs_product_group_product_counts.py +test/test_catalogs_product_group_pricing_currency_criteria.py +test/test_catalogs_product_group_product_counts_vertical.py test/test_catalogs_product_group_status.py test/test_catalogs_product_group_type.py test/test_catalogs_product_group_update_request.py -test/test_catalogs_product_metadata.py +test/test_catalogs_report.py +test/test_catalogs_report_distribution_issue_filter.py +test/test_catalogs_report_distribution_stats.py +test/test_catalogs_report_feed_ingestion_filter.py +test/test_catalogs_report_feed_ingestion_stats.py +test/test_catalogs_report_parameters.py +test/test_catalogs_report_stats.py +test/test_catalogs_retail_batch_request.py +test/test_catalogs_retail_feed.py +test/test_catalogs_retail_feeds_create_request.py +test/test_catalogs_retail_feeds_update_request.py +test/test_catalogs_retail_item_error_response.py +test/test_catalogs_retail_item_response.py +test/test_catalogs_retail_items_batch.py +test/test_catalogs_retail_items_filter.py +test/test_catalogs_retail_items_post_filter.py +test/test_catalogs_retail_list_products_by_catalog_based_filter_request.py +test/test_catalogs_retail_product.py +test/test_catalogs_retail_product_group.py +test/test_catalogs_retail_product_group_create_request.py +test/test_catalogs_retail_product_group_product_counts.py +test/test_catalogs_retail_product_group_update_request.py +test/test_catalogs_retail_product_metadata.py +test/test_catalogs_retail_report_parameters.py test/test_catalogs_status.py +test/test_catalogs_type.py +test/test_catalogs_updatable_creative_assets_attributes.py +test/test_catalogs_updatable_hotel_attributes.py +test/test_catalogs_update_creative_assets_item.py +test/test_catalogs_update_hotel_item.py +test/test_catalogs_update_retail_item.py +test/test_catalogs_upsert_creative_assets_item.py +test/test_catalogs_upsert_hotel_item.py +test/test_catalogs_upsert_retail_item.py +test/test_catalogs_vertical_batch_request.py +test/test_catalogs_vertical_feeds_create_request.py +test/test_catalogs_vertical_feeds_update_request.py +test/test_catalogs_vertical_product_group.py +test/test_catalogs_vertical_product_group_create_request.py +test/test_catalogs_vertical_product_group_update_request.py +test/test_catalogs_verticals_list_products_by_catalog_based_filter_request.py test/test_condition_filter.py test/test_conversion_api_response.py test/test_conversion_api_response_events.py @@ -1064,10 +1913,26 @@ test/test_conversion_tag_type.py test/test_conversion_tags_api.py test/test_conversion_tags_ocpm_eligible_response.py test/test_country.py +test/test_country_filter.py +test/test_create_asset_access_request_body.py +test/test_create_asset_access_request_body_asset_requests.py +test/test_create_asset_access_request_error_message.py +test/test_create_asset_access_request_response.py +test/test_create_asset_group_body.py +test/test_create_asset_group_response.py +test/test_create_asset_invites_request.py +test/test_create_asset_invites_request_item.py +test/test_create_invites_results_response_array.py +test/test_create_invites_results_response_array_invite.py +test/test_create_invites_results_response_array_items.py +test/test_create_membership_or_partnership_invites_body.py test/test_create_mmm_report_request.py test/test_create_mmm_report_request_all_of.py test/test_create_mmm_report_response.py test/test_create_mmm_report_response_data.py +test/test_creative_assets_id_filter.py +test/test_creative_assets_processing_record.py +test/test_creative_assets_visibility_type.py test/test_creative_type.py test/test_currency.py test/test_currency_filter.py @@ -1082,20 +1947,41 @@ test/test_customer_list_update_request.py test/test_customer_lists_api.py test/test_data_output_format.py test/test_data_status.py +test/test_delete_asset_group_body.py +test/test_delete_asset_group_response.py +test/test_delete_asset_group_response_exceptions.py +test/test_delete_invites_results_response_array.py +test/test_delete_invites_results_response_array_exception.py +test/test_delete_invites_results_response_array_items.py +test/test_delete_member_access_result.py +test/test_delete_member_access_results_response_array.py +test/test_delete_partner_asset_access_body.py +test/test_delete_partner_asset_access_body_accesses.py +test/test_delete_partner_assets_result.py +test/test_delete_partner_assets_results_response_array.py +test/test_delete_partners_request.py +test/test_delete_partners_response.py +test/test_deleted_members_response.py test/test_delivery_metrics_response.py test/test_delivery_metrics_response_items.py +test/test_detailed_error.py test/test_enhanced_match_status_type.py test/test_entity_status.py test/test_error.py test/test_exception.py test/test_feed_fields.py +test/test_feed_fields1.py +test/test_feed_fields2.py test/test_follow_user_request.py test/test_gender.py test/test_gender_filter.py test/test_gender_list.py test/test_get_audiences_order_by.py +test/test_get_business_asset_type_response.py +test/test_get_business_assets_response.py test/test_get_mmm_report_response.py test/test_get_mmm_report_response_data.py +test/test_get_partner_assets_response.py test/test_google_product_category0_filter.py test/test_google_product_category1_filter.py test/test_google_product_category2_filter.py @@ -1104,18 +1990,39 @@ test/test_google_product_category4_filter.py test/test_google_product_category5_filter.py test/test_google_product_category6_filter.py test/test_granularity.py +test/test_grid_click_type.py +test/test_hotel_id_filter.py +test/test_hotel_processing_record.py test/test_image_details.py test/test_image_metadata.py +test/test_image_metadata_images.py test/test_inline_object.py +test/test_inline_object1.py +test/test_integration_log.py +test/test_integration_log_client_error.py +test/test_integration_log_client_request.py +test/test_integration_logs_invalid_log_response.py +test/test_integration_logs_invalid_log_response_rejected_logs.py +test/test_integration_logs_request.py +test/test_integration_logs_success_response.py test/test_integration_metadata.py test/test_integration_record.py test/test_integration_request.py test/test_integration_request_patch.py test/test_integrations_api.py test/test_interest.py -test/test_interests_api.py +test/test_invite_assets_summary.py +test/test_invite_assets_summary_ad_accounts.py +test/test_invite_assets_summary_profiles.py +test/test_invite_business_role_binding.py +test/test_invite_exception_response.py +test/test_invite_response.py +test/test_invite_status.py +test/test_invite_type.py test/test_item_attributes.py test/test_item_attributes_all_of.py +test/test_item_attributes_request.py +test/test_item_attributes_request_all_of.py test/test_item_batch_record.py test/test_item_create_batch_record.py test/test_item_delete_batch_record.py @@ -1128,9 +2035,12 @@ test/test_item_response.py test/test_item_response_any_of.py test/test_item_response_any_of1.py test/test_item_update_batch_record.py +test/test_item_upsert_batch_record.py test/test_item_validation_event.py test/test_keyword.py +test/test_keyword_all_of.py test/test_keyword_error.py +test/test_keyword_list.py test/test_keyword_metrics.py test/test_keyword_metrics_response.py test/test_keyword_update.py @@ -1142,20 +2052,36 @@ test/test_keywords_request.py test/test_keywords_response.py test/test_l1_interest_list.py test/test_language.py +test/test_lead_ads_api.py +test/test_lead_form_array_response.py +test/test_lead_form_array_response_items.py test/test_lead_form_common.py +test/test_lead_form_common_policy_links.py +test/test_lead_form_create_request.py test/test_lead_form_question.py test/test_lead_form_question_field_type.py test/test_lead_form_question_type.py test/test_lead_form_response.py test/test_lead_form_response_all_of.py test/test_lead_form_status.py +test/test_lead_form_test_request.py +test/test_lead_form_test_response.py +test/test_lead_form_update_request.py +test/test_lead_form_update_request_all_of.py test/test_lead_forms_api.py +test/test_leads_export_api.py +test/test_leads_export_create_request.py +test/test_leads_export_create_response.py +test/test_leads_export_response_data.py +test/test_leads_export_status.py test/test_line_item.py test/test_linked_business.py test/test_match_type.py test/test_match_type_response.py test/test_max_price_filter.py test/test_media_api.py +test/test_media_type.py +test/test_media_type_filter.py test/test_media_upload.py test/test_media_upload_all_of.py test/test_media_upload_all_of_upload_parameters.py @@ -1163,25 +2089,37 @@ test/test_media_upload_details.py test/test_media_upload_request.py test/test_media_upload_status.py test/test_media_upload_type.py +test/test_member_business_role.py +test/test_members_to_delete_body.py +test/test_members_to_delete_body_members.py test/test_metrics.py test/test_metrics_reporting_level.py test/test_metrics_response.py test/test_min_price_filter.py +test/test_mmm_reporting_column.py +test/test_mmm_reporting_targeting_type.py test/test_non_nullable_catalogs_currency.py test/test_non_nullable_product_availability_type.py test/test_nullable_catalogs_item_field_type.py test/test_nullable_currency.py +test/test_oauth_access_token_request_client_credentials.py +test/test_oauth_access_token_request_client_credentials_all_of.py test/test_oauth_access_token_request_code.py test/test_oauth_access_token_request_code_all_of.py test/test_oauth_access_token_request_refresh.py test/test_oauth_access_token_request_refresh_all_of.py test/test_oauth_access_token_response.py +test/test_oauth_access_token_response_client_credentials.py test/test_oauth_access_token_response_code.py test/test_oauth_access_token_response_code_all_of.py +test/test_oauth_access_token_response_everlasting_refresh.py +test/test_oauth_access_token_response_everlasting_refresh_all_of.py test/test_oauth_access_token_response_integration_refresh.py test/test_oauth_access_token_response_refresh.py +test/test_oauth_access_token_response_refresh_all_of.py test/test_oauth_api.py test/test_objective_type.py +test/test_operation_type.py test/test_optimization_goal_metadata.py test/test_optimization_goal_metadata_conversion_tag_v3_goal_metadata.py test/test_optimization_goal_metadata_conversion_tag_v3_goal_metadata_attribution_windows.py @@ -1199,8 +2137,13 @@ test/test_order_lines_api.py test/test_order_lines_array_response.py test/test_pacing_delivery_type.py test/test_paginated.py +test/test_partner_type.py +test/test_permissions.py +test/test_permissions_response.py +test/test_permissions_with_owner.py test/test_pin.py test/test_pin_analytics_metrics_response.py +test/test_pin_analytics_metrics_response_daily_metrics.py test/test_pin_analytics_response.py test/test_pin_create.py test/test_pin_media.py @@ -1230,31 +2173,78 @@ test/test_pin_update_carousel_slots.py test/test_pins_api.py test/test_pinterest_tag_event_data.py test/test_placement_group_type.py +test/test_placement_multipliers.py +test/test_price_filter.py test/test_product_availability_type.py test/test_product_group_analytics_response.py test/test_product_group_promotion.py test/test_product_group_promotion_create_request.py +test/test_product_group_promotion_create_request_element.py +test/test_product_group_promotion_create_request_element_all_of.py test/test_product_group_promotion_response.py +test/test_product_group_promotion_response_element.py test/test_product_group_promotion_response_item.py test/test_product_group_promotion_update_request.py test/test_product_group_promotions_api.py +test/test_product_group_reference_filter.py test/test_product_group_summary_status.py -test/test_product_groups_api.py -test/test_product_groups_create_request_feed_base_case.py test/test_product_type0_filter.py test/test_product_type1_filter.py test/test_product_type2_filter.py test/test_product_type3_filter.py test/test_product_type4_filter.py +test/test_quiz_pin_data.py +test/test_quiz_pin_option.py +test/test_quiz_pin_question.py +test/test_quiz_pin_result.py test/test_related_terms.py test/test_related_terms_related_terms_list.py test/test_reporting_column_async.py test/test_resources_api.py +test/test_respond_to_invites_response_array.py +test/test_respond_to_invites_response_array_items.py +test/test_role.py test/test_search_api.py +test/test_shared_audience.py +test/test_shared_audience1.py +test/test_shared_audience_account.py +test/test_shared_audience_common.py +test/test_shared_audience_response.py +test/test_shared_audience_response1.py +test/test_shared_audience_response_common.py test/test_single_interest_targeting_option_response.py +test/test_ssio_account_address.py +test/test_ssio_account_item.py +test/test_ssio_account_pmp_name.py +test/test_ssio_account_response.py +test/test_ssio_create_insertion_order_request.py +test/test_ssio_create_insertion_order_request_all_of.py +test/test_ssio_create_insertion_order_response.py +test/test_ssio_edit_insertion_order_request.py +test/test_ssio_edit_insertion_order_request_all_of.py +test/test_ssio_edit_insertion_order_response.py +test/test_ssio_insertion_order_common.py +test/test_ssio_insertion_order_status.py +test/test_ssio_insertion_order_status_response.py +test/test_ssio_order_line.py +test/test_summary_pin.py +test/test_targeting_advertiser_country.py test/test_targeting_option_response.py test/test_targeting_spec.py +test/test_targeting_spec_app_type.py test/test_targeting_spec_shoppingretargeting.py +test/test_targeting_template_api.py +test/test_targeting_template_audience_sizing.py +test/test_targeting_template_audience_sizing_reach_estimate.py +test/test_targeting_template_common.py +test/test_targeting_template_create.py +test/test_targeting_template_create_all_of.py +test/test_targeting_template_get_response_data.py +test/test_targeting_template_get_response_data1.py +test/test_targeting_template_keyword.py +test/test_targeting_template_response_data.py +test/test_targeting_template_response_data1.py +test/test_targeting_template_update_request.py test/test_targeting_type_filter.py test/test_template_response.py test/test_template_response_date_range.py @@ -1276,13 +2266,37 @@ test/test_trending_keywords_response.py test/test_trending_keywords_response_trends.py test/test_trends_supported_region.py test/test_updatable_item_attributes.py +test/test_update_asset_group_body.py +test/test_update_asset_group_body_asset_groups_to_update.py +test/test_update_asset_group_response.py +test/test_update_asset_group_response_exceptions.py +test/test_update_invites_results_response_array.py +test/test_update_invites_results_response_array_items.py +test/test_update_mask_bid_option_field.py +test/test_update_mask_field_type.py +test/test_update_member_asset_access_body.py +test/test_update_member_asset_access_body_accesses.py +test/test_update_member_assets_results_response_array.py +test/test_update_member_assets_results_response_array_items.py +test/test_update_member_business_role_body.py +test/test_update_member_result.py +test/test_update_member_results_response_array.py +test/test_update_partner_asset_access_body.py +test/test_update_partner_asset_access_body_accesses.py +test/test_update_partner_assets_result.py +test/test_update_partner_assets_results_response_array.py +test/test_update_partner_results_response_array.py +test/test_update_partner_results_response_array_items.py test/test_user_account_api.py +test/test_user_business_role_binding.py test/test_user_following_feed_type.py test/test_user_list_operation_type.py test/test_user_list_type.py +test/test_user_single_asset_binding.py test/test_user_summary.py test/test_user_website_summary.py test/test_user_website_verification_code.py test/test_user_website_verify_request.py +test/test_users_for_individual_asset_response.py test/test_video_metadata.py tox.ini diff --git a/README.md b/README.md index af5b058..14d5887 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ Pinterest's REST API This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 5.10.0 -- Package version: 0.1.8 +- API version: 5.14.0 +- Package version: 0.1.9 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://developers.pinterest.com/](https://developers.pinterest.com/) @@ -70,10 +70,14 @@ from openapi_generated.pinterest_client.model.ads_analytics_create_async_respons from openapi_generated.pinterest_client.model.ads_analytics_get_async_response import AdsAnalyticsGetAsyncResponse from openapi_generated.pinterest_client.model.ads_analytics_targeting_type import AdsAnalyticsTargetingType from openapi_generated.pinterest_client.model.conversion_report_attribution_type import ConversionReportAttributionType +from openapi_generated.pinterest_client.model.create_mmm_report_request import CreateMMMReportRequest +from openapi_generated.pinterest_client.model.create_mmm_report_response import CreateMMMReportResponse from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.get_mmm_report_response import GetMMMReportResponse from openapi_generated.pinterest_client.model.granularity import Granularity from openapi_generated.pinterest_client.model.metrics_response import MetricsResponse from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.template_response import TemplateResponse # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. configuration = openapi_generated.pinterest_client.Configuration( @@ -127,12 +131,15 @@ Class | Method | HTTP request | Description *AdAccountsApi* | [**ad_accounts_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsApi.md#ad_accounts_create) | **POST** /ad_accounts | Create ad account *AdAccountsApi* | [**ad_accounts_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsApi.md#ad_accounts_get) | **GET** /ad_accounts/{ad_account_id} | Get ad account *AdAccountsApi* | [**ad_accounts_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsApi.md#ad_accounts_list) | **GET** /ad_accounts | List ad accounts +*AdAccountsApi* | [**analytics_create_mmm_report**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsApi.md#analytics_create_mmm_report) | **POST** /ad_accounts/{ad_account_id}/mmm_reports | Create a request for a Marketing Mix Modeling (MMM) report *AdAccountsApi* | [**analytics_create_report**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsApi.md#analytics_create_report) | **POST** /ad_accounts/{ad_account_id}/reports | Create async request for an account analytics report *AdAccountsApi* | [**analytics_create_template_report**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsApi.md#analytics_create_template_report) | **POST** /ad_accounts/{ad_account_id}/templates/{template_id}/reports | Create async request for an analytics report using a template +*AdAccountsApi* | [**analytics_get_mmm_report**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsApi.md#analytics_get_mmm_report) | **GET** /ad_accounts/{ad_account_id}/mmm_reports | Get advertiser Marketing Mix Modeling (MMM) report. *AdAccountsApi* | [**analytics_get_report**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsApi.md#analytics_get_report) | **GET** /ad_accounts/{ad_account_id}/reports | Get the account analytics report created by the async call *AdAccountsApi* | [**sandbox_delete**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsApi.md#sandbox_delete) | **DELETE** /ad_accounts/{ad_account_id}/sandbox | Delete ads data for ad account in API Sandbox *AdAccountsApi* | [**templates_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsApi.md#templates_list) | **GET** /ad_accounts/{ad_account_id}/templates | List templates *AdGroupsApi* | [**ad_groups_analytics**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupsApi.md#ad_groups_analytics) | **GET** /ad_accounts/{ad_account_id}/ad_groups/analytics | Get ad group analytics +*AdGroupsApi* | [**ad_groups_audience_sizing**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupsApi.md#ad_groups_audience_sizing) | **POST** /ad_accounts/{ad_account_id}/ad_groups/audience_sizing | Get audience sizing *AdGroupsApi* | [**ad_groups_bid_floor_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupsApi.md#ad_groups_bid_floor_get) | **POST** /ad_accounts/{ad_account_id}/bid_floor | Get bid floors *AdGroupsApi* | [**ad_groups_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupsApi.md#ad_groups_create) | **POST** /ad_accounts/{ad_account_id}/ad_groups | Create ad groups *AdGroupsApi* | [**ad_groups_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupsApi.md#ad_groups_get) | **GET** /ad_accounts/{ad_account_id}/ad_groups/{ad_group_id} | Get ad group @@ -146,14 +153,31 @@ Class | Method | HTTP request | Description *AdsApi* | [**ads_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsApi.md#ads_get) | **GET** /ad_accounts/{ad_account_id}/ads/{ad_id} | Get ad *AdsApi* | [**ads_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsApi.md#ads_list) | **GET** /ad_accounts/{ad_account_id}/ads | List ads *AdsApi* | [**ads_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsApi.md#ads_update) | **PATCH** /ad_accounts/{ad_account_id}/ads | Update ads +*AdvancedAuctionApi* | [**advanced_auction_items_get_post**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionApi.md#advanced_auction_items_get_post) | **POST** /advanced_auction/items/get | Get item bid options (POST) +*AdvancedAuctionApi* | [**advanced_auction_items_submit_post**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionApi.md#advanced_auction_items_submit_post) | **POST** /advanced_auction/items/submit | Operate on item level bid options *AudienceInsightsApi* | [**audience_insights_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceInsightsApi.md#audience_insights_get) | **GET** /ad_accounts/{ad_account_id}/audience_insights | Get audience insights *AudienceInsightsApi* | [**audience_insights_scope_and_type_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceInsightsApi.md#audience_insights_scope_and_type_get) | **GET** /ad_accounts/{ad_account_id}/insights/audiences | Get audience insights scope and type -*AudienceInsightsApi* | [**audiences_insights_category_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceInsightsApi.md#audiences_insights_category_list) | **GET** /ad_accounts/{ad_account_id}/insights/audiences/{scope}/{type}/{category_id} | Get category sub-interest (DEPRECATED) +*AudienceSharingApi* | [**ad_accounts_audiences_shared_accounts_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceSharingApi.md#ad_accounts_audiences_shared_accounts_list) | **GET** /ad_accounts/{ad_account_id}/audiences/shared/accounts | List accounts with access to an audience owned by an ad account +*AudienceSharingApi* | [**business_account_audiences_shared_accounts_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceSharingApi.md#business_account_audiences_shared_accounts_list) | **GET** /businesses/{business_id}/audiences/shared/accounts | List accounts with access to an audience owned by a business +*AudienceSharingApi* | [**shared_audiences_for_business_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceSharingApi.md#shared_audiences_for_business_list) | **GET** /businesses/{business_id}/audiences | List received audiences for a business +*AudienceSharingApi* | [**update_ad_account_to_ad_account_shared_audience**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceSharingApi.md#update_ad_account_to_ad_account_shared_audience) | **PATCH** /ad_accounts/{ad_account_id}/audiences/ad_accounts/shared | Update audience sharing between ad accounts +*AudienceSharingApi* | [**update_ad_account_to_business_shared_audience**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceSharingApi.md#update_ad_account_to_business_shared_audience) | **PATCH** /ad_accounts/{ad_account_id}/audiences/businesses/shared | Update audience sharing from an ad account to businesses +*AudienceSharingApi* | [**update_business_to_ad_account_shared_audience**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceSharingApi.md#update_business_to_ad_account_shared_audience) | **PATCH** /businesses/{business_id}/audiences/ad_accounts/shared | Update audience sharing from a business to ad accounts +*AudienceSharingApi* | [**update_business_to_business_shared_audience**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceSharingApi.md#update_business_to_business_shared_audience) | **PATCH** /businesses/{business_id}/audiences/businesses/shared | Update audience sharing between businesses *AudiencesApi* | [**audiences_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudiencesApi.md#audiences_create) | **POST** /ad_accounts/{ad_account_id}/audiences | Create audience *AudiencesApi* | [**audiences_create_custom**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudiencesApi.md#audiences_create_custom) | **POST** /ad_accounts/{ad_account_id}/audiences/custom | Create custom audience *AudiencesApi* | [**audiences_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudiencesApi.md#audiences_get) | **GET** /ad_accounts/{ad_account_id}/audiences/{audience_id} | Get audience *AudiencesApi* | [**audiences_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudiencesApi.md#audiences_list) | **GET** /ad_accounts/{ad_account_id}/audiences | List audiences *AudiencesApi* | [**audiences_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudiencesApi.md#audiences_update) | **PATCH** /ad_accounts/{ad_account_id}/audiences/{audience_id} | Update audience +*BillingApi* | [**ads_credit_redeem**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BillingApi.md#ads_credit_redeem) | **POST** /ad_accounts/{ad_account_id}/ads_credit/redeem | Redeem ad credits +*BillingApi* | [**ads_credits_discounts_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BillingApi.md#ads_credits_discounts_get) | **GET** /ad_accounts/{ad_account_id}/ads_credit/discounts | Get ads credit discounts +*BillingApi* | [**billing_profiles_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BillingApi.md#billing_profiles_get) | **GET** /ad_accounts/{ad_account_id}/billing_profiles | Get billing profiles +*BillingApi* | [**ssio_accounts_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BillingApi.md#ssio_accounts_get) | **GET** /ad_accounts/{ad_account_id}/ssio/accounts | Get Salesforce account details including bill-to information. +*BillingApi* | [**ssio_insertion_order_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BillingApi.md#ssio_insertion_order_create) | **POST** /ad_accounts/{ad_account_id}/ssio/insertion_orders | Create insertion order through SSIO. +*BillingApi* | [**ssio_insertion_order_edit**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BillingApi.md#ssio_insertion_order_edit) | **PATCH** /ad_accounts/{ad_account_id}/ssio/insertion_orders | Edit insertion order through SSIO. +*BillingApi* | [**ssio_insertion_orders_status_get_by_ad_account**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BillingApi.md#ssio_insertion_orders_status_get_by_ad_account) | **GET** /ad_accounts/{ad_account_id}/ssio/insertion_orders/status | Get insertion order status by ad account id. +*BillingApi* | [**ssio_insertion_orders_status_get_by_pin_order_id**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BillingApi.md#ssio_insertion_orders_status_get_by_pin_order_id) | **GET** /ad_accounts/{ad_account_id}/ssio/insertion_orders/{pin_order_id}/status | Get insertion order status by pin order id. +*BillingApi* | [**ssio_order_lines_get_by_ad_account**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BillingApi.md#ssio_order_lines_get_by_ad_account) | **GET** /ad_accounts/{ad_account_id}/ssio/order_lines | Get Salesforce order lines by ad account id. *BoardsApi* | [**board_sections_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BoardsApi.md#board_sections_create) | **POST** /boards/{board_id}/sections | Create board section *BoardsApi* | [**board_sections_delete**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BoardsApi.md#board_sections_delete) | **DELETE** /boards/{board_id}/sections/{section_id} | Delete board section *BoardsApi* | [**board_sections_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BoardsApi.md#board_sections_list) | **GET** /boards/{board_id}/sections | List board sections @@ -168,31 +192,64 @@ Class | Method | HTTP request | Description *BulkApi* | [**bulk_download_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkApi.md#bulk_download_create) | **POST** /ad_accounts/{ad_account_id}/bulk/download | Get advertiser entities in bulk *BulkApi* | [**bulk_request_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkApi.md#bulk_request_get) | **GET** /ad_accounts/{ad_account_id}/bulk/{bulk_request_id} | Download advertiser entities in bulk *BulkApi* | [**bulk_upsert_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkApi.md#bulk_upsert_create) | **POST** /ad_accounts/{ad_account_id}/bulk/upsert | Create/update ad entities in bulk +*BusinessAccessAssetsApi* | [**asset_group_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#asset_group_create) | **POST** /businesses/{business_id}/asset_groups | Create a new asset group. +*BusinessAccessAssetsApi* | [**asset_group_delete**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#asset_group_delete) | **DELETE** /businesses/{business_id}/asset_groups | Delete asset groups. +*BusinessAccessAssetsApi* | [**asset_group_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#asset_group_update) | **PATCH** /businesses/{business_id}/asset_groups | Update asset groups. +*BusinessAccessAssetsApi* | [**business_asset_members_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#business_asset_members_get) | **GET** /businesses/{business_id}/assets/{asset_id}/members | Get members with access to asset +*BusinessAccessAssetsApi* | [**business_asset_partners_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#business_asset_partners_get) | **GET** /businesses/{business_id}/assets/{asset_id}/partners | Get partners with access to asset +*BusinessAccessAssetsApi* | [**business_assets_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#business_assets_get) | **GET** /businesses/{business_id}/assets | List business assets +*BusinessAccessAssetsApi* | [**business_member_assets_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#business_member_assets_get) | **GET** /businesses/{business_id}/members/{member_id}/assets | Get assets assigned to a member +*BusinessAccessAssetsApi* | [**business_members_asset_access_delete**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#business_members_asset_access_delete) | **DELETE** /businesses/{business_id}/members/assets/access | Delete member access to asset +*BusinessAccessAssetsApi* | [**business_members_asset_access_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#business_members_asset_access_update) | **PATCH** /businesses/{business_id}/members/assets/access | Assign/Update member asset permissions +*BusinessAccessAssetsApi* | [**business_partner_asset_access_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#business_partner_asset_access_get) | **GET** /businesses/{business_id}/partners/{partner_id}/assets | Get assets assigned to a partner or assets assigned by a partner +*BusinessAccessAssetsApi* | [**delete_partner_asset_access_handler_impl**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#delete_partner_asset_access_handler_impl) | **DELETE** /businesses/{business_id}/partners/assets | Delete partner access to asset +*BusinessAccessAssetsApi* | [**update_partner_asset_access_handler_impl**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessAssetsApi.md#update_partner_asset_access_handler_impl) | **PATCH** /businesses/{business_id}/partners/assets | Assign/Update partner asset permissions +*BusinessAccessInviteApi* | [**asset_access_requests_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessInviteApi.md#asset_access_requests_create) | **POST** /businesses/{business_id}/requests/assets/access | Create a request to access an existing partner's assets. +*BusinessAccessInviteApi* | [**cancel_invites_or_requests**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessInviteApi.md#cancel_invites_or_requests) | **DELETE** /businesses/{business_id}/invites | Cancel invites/requests +*BusinessAccessInviteApi* | [**create_asset_invites**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessInviteApi.md#create_asset_invites) | **POST** /businesses/{business_id}/invites/assets/access | Update invite/request with an asset permission +*BusinessAccessInviteApi* | [**create_membership_or_partnership_invites**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessInviteApi.md#create_membership_or_partnership_invites) | **POST** /businesses/{business_id}/invites | Create invites or requests +*BusinessAccessInviteApi* | [**get_invites**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessInviteApi.md#get_invites) | **GET** /businesses/{business_id}/invites | Get invites/requests +*BusinessAccessInviteApi* | [**respond_business_access_invites**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessInviteApi.md#respond_business_access_invites) | **PATCH** /businesses/invites | Accept or decline an invite/request +*BusinessAccessRelationshipsApi* | [**delete_business_membership**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessRelationshipsApi.md#delete_business_membership) | **DELETE** /businesses/{business_id}/members | Terminate business memberships +*BusinessAccessRelationshipsApi* | [**delete_business_partners**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessRelationshipsApi.md#delete_business_partners) | **DELETE** /businesses/{business_id}/partners | Terminate business partnerships +*BusinessAccessRelationshipsApi* | [**get_business_employers**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessRelationshipsApi.md#get_business_employers) | **GET** /businesses/employers | List business employers for user +*BusinessAccessRelationshipsApi* | [**get_business_members**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessRelationshipsApi.md#get_business_members) | **GET** /businesses/{business_id}/members | Get business members +*BusinessAccessRelationshipsApi* | [**get_business_partners**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessRelationshipsApi.md#get_business_partners) | **GET** /businesses/{business_id}/partners | Get business partners +*BusinessAccessRelationshipsApi* | [**update_business_memberships**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessRelationshipsApi.md#update_business_memberships) | **PATCH** /businesses/{business_id}/members | Update member's business role *CampaignsApi* | [**campaign_targeting_analytics_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignsApi.md#campaign_targeting_analytics_get) | **GET** /ad_accounts/{ad_account_id}/campaigns/targeting_analytics | Get targeting analytics for campaigns *CampaignsApi* | [**campaigns_analytics**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignsApi.md#campaigns_analytics) | **GET** /ad_accounts/{ad_account_id}/campaigns/analytics | Get campaign analytics *CampaignsApi* | [**campaigns_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignsApi.md#campaigns_create) | **POST** /ad_accounts/{ad_account_id}/campaigns | Create campaigns *CampaignsApi* | [**campaigns_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignsApi.md#campaigns_get) | **GET** /ad_accounts/{ad_account_id}/campaigns/{campaign_id} | Get campaign *CampaignsApi* | [**campaigns_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignsApi.md#campaigns_list) | **GET** /ad_accounts/{ad_account_id}/campaigns | List campaigns *CampaignsApi* | [**campaigns_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignsApi.md#campaigns_update) | **PATCH** /ad_accounts/{ad_account_id}/campaigns | Update campaigns -*CatalogsApi* | [**catalogs_product_group_pins_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_group_pins_list) | **GET** /catalogs/product_groups/{product_group_id}/products | List products for a Product Group +*CatalogsApi* | [**catalogs_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_create) | **POST** /catalogs | Create catalog +*CatalogsApi* | [**catalogs_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_list) | **GET** /catalogs | List catalogs +*CatalogsApi* | [**catalogs_product_group_pins_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_group_pins_list) | **GET** /catalogs/product_groups/{product_group_id}/products | List products by product group *CatalogsApi* | [**catalogs_product_groups_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_groups_create) | **POST** /catalogs/product_groups | Create product group +*CatalogsApi* | [**catalogs_product_groups_create_many**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_groups_create_many) | **POST** /catalogs/product_groups/multiple | Create product groups *CatalogsApi* | [**catalogs_product_groups_delete**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_groups_delete) | **DELETE** /catalogs/product_groups/{product_group_id} | Delete product group +*CatalogsApi* | [**catalogs_product_groups_delete_many**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_groups_delete_many) | **DELETE** /catalogs/product_groups/multiple | Delete product groups *CatalogsApi* | [**catalogs_product_groups_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_groups_get) | **GET** /catalogs/product_groups/{product_group_id} | Get product group *CatalogsApi* | [**catalogs_product_groups_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_groups_list) | **GET** /catalogs/product_groups | List product groups -*CatalogsApi* | [**catalogs_product_groups_product_counts_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_groups_product_counts_get) | **GET** /catalogs/product_groups/{product_group_id}/product_counts | Get product counts for a Product Group -*CatalogsApi* | [**catalogs_product_groups_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_groups_update) | **PATCH** /catalogs/product_groups/{product_group_id} | Update product group -*CatalogsApi* | [**feed_processing_results_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#feed_processing_results_list) | **GET** /catalogs/feeds/{feed_id}/processing_results | List processing results for a given feed +*CatalogsApi* | [**catalogs_product_groups_product_counts_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_groups_product_counts_get) | **GET** /catalogs/product_groups/{product_group_id}/product_counts | Get product counts +*CatalogsApi* | [**catalogs_product_groups_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#catalogs_product_groups_update) | **PATCH** /catalogs/product_groups/{product_group_id} | Update single product group +*CatalogsApi* | [**feed_processing_results_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#feed_processing_results_list) | **GET** /catalogs/feeds/{feed_id}/processing_results | List feed processing results *CatalogsApi* | [**feeds_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#feeds_create) | **POST** /catalogs/feeds | Create feed *CatalogsApi* | [**feeds_delete**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#feeds_delete) | **DELETE** /catalogs/feeds/{feed_id} | Delete feed *CatalogsApi* | [**feeds_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#feeds_get) | **GET** /catalogs/feeds/{feed_id} | Get feed +*CatalogsApi* | [**feeds_ingest**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#feeds_ingest) | **POST** /catalogs/feeds/{feed_id}/ingest | Ingest feed items *CatalogsApi* | [**feeds_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#feeds_list) | **GET** /catalogs/feeds | List feeds *CatalogsApi* | [**feeds_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#feeds_update) | **PATCH** /catalogs/feeds/{feed_id} | Update feed -*CatalogsApi* | [**items_batch_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#items_batch_get) | **GET** /catalogs/items/batch/{batch_id} | Get catalogs items batch +*CatalogsApi* | [**items_batch_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#items_batch_get) | **GET** /catalogs/items/batch/{batch_id} | Get item batch status *CatalogsApi* | [**items_batch_post**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#items_batch_post) | **POST** /catalogs/items/batch | Operate on item batch *CatalogsApi* | [**items_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#items_get) | **GET** /catalogs/items | Get catalogs items -*CatalogsApi* | [**items_issues_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#items_issues_list) | **GET** /catalogs/processing_results/{processing_result_id}/item_issues | List item issues for a given processing result -*CatalogsApi* | [**products_by_product_group_filter_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#products_by_product_group_filter_list) | **POST** /catalogs/products/get_by_product_group_filters | List filtered products -*ConversionEventsApi* | [**events_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ConversionEventsApi.md#events_create) | **POST** /ad_accounts/{ad_account_id}/events | Send conversion events to the Pinterest API for Conversions +*CatalogsApi* | [**items_issues_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#items_issues_list) | **GET** /catalogs/processing_results/{processing_result_id}/item_issues | List item issues +*CatalogsApi* | [**items_post**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#items_post) | **POST** /catalogs/items | Get catalogs items (POST) +*CatalogsApi* | [**products_by_product_group_filter_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#products_by_product_group_filter_list) | **POST** /catalogs/products/get_by_product_group_filters | List products by filter +*CatalogsApi* | [**reports_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#reports_create) | **POST** /catalogs/reports | Build catalogs report +*CatalogsApi* | [**reports_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#reports_get) | **GET** /catalogs/reports | Get catalogs report +*CatalogsApi* | [**reports_stats**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsApi.md#reports_stats) | **GET** /catalogs/reports/stats | List report stats +*ConversionEventsApi* | [**events_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ConversionEventsApi.md#events_create) | **POST** /ad_accounts/{ad_account_id}/events | Send conversions *ConversionTagsApi* | [**conversion_tags_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ConversionTagsApi.md#conversion_tags_create) | **POST** /ad_accounts/{ad_account_id}/conversion_tags | Create conversion tag *ConversionTagsApi* | [**conversion_tags_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ConversionTagsApi.md#conversion_tags_get) | **GET** /ad_accounts/{ad_account_id}/conversion_tags/{conversion_tag_id} | Get conversion tag *ConversionTagsApi* | [**conversion_tags_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ConversionTagsApi.md#conversion_tags_list) | **GET** /ad_accounts/{ad_account_id}/conversion_tags | Get conversion tags @@ -208,20 +265,30 @@ Class | Method | HTTP request | Description *IntegrationsApi* | [**integrations_commerce_post**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationsApi.md#integrations_commerce_post) | **POST** /integrations/commerce | Create commerce integration *IntegrationsApi* | [**integrations_get_by_id**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationsApi.md#integrations_get_by_id) | **GET** /integrations/{id} | Get integration metadata *IntegrationsApi* | [**integrations_get_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationsApi.md#integrations_get_list) | **GET** /integrations | Get integration metadata list -*InterestsApi* | [**interests_followed_interests**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InterestsApi.md#interests_followed_interests) | **GET** /users/{username}/interests/follow | List following interests +*IntegrationsApi* | [**integrations_logs_post**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationsApi.md#integrations_logs_post) | **POST** /integrations/logs | Receives batched logs from integration applications. *KeywordsApi* | [**country_keywords_metrics_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordsApi.md#country_keywords_metrics_get) | **GET** /ad_accounts/{ad_account_id}/keywords/metrics | Get country's keyword metrics *KeywordsApi* | [**keywords_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordsApi.md#keywords_create) | **POST** /ad_accounts/{ad_account_id}/keywords | Create keywords *KeywordsApi* | [**keywords_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordsApi.md#keywords_get) | **GET** /ad_accounts/{ad_account_id}/keywords | Get keywords *KeywordsApi* | [**keywords_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordsApi.md#keywords_update) | **PATCH** /ad_accounts/{ad_account_id}/keywords | Update keywords *KeywordsApi* | [**trending_keywords_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordsApi.md#trending_keywords_list) | **GET** /trends/keywords/{region}/top/{trend_type} | List trending keywords +*LeadAdsApi* | [**ad_accounts_subscriptions_del_by_id**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadAdsApi.md#ad_accounts_subscriptions_del_by_id) | **DELETE** /ad_accounts/{ad_account_id}/leads/subscriptions/{subscription_id} | Delete lead ads subscription +*LeadAdsApi* | [**ad_accounts_subscriptions_get_by_id**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadAdsApi.md#ad_accounts_subscriptions_get_by_id) | **GET** /ad_accounts/{ad_account_id}/leads/subscriptions/{subscription_id} | Get lead ads subscription +*LeadAdsApi* | [**ad_accounts_subscriptions_get_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadAdsApi.md#ad_accounts_subscriptions_get_list) | **GET** /ad_accounts/{ad_account_id}/leads/subscriptions | Get lead ads subscriptions +*LeadAdsApi* | [**ad_accounts_subscriptions_post**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadAdsApi.md#ad_accounts_subscriptions_post) | **POST** /ad_accounts/{ad_account_id}/leads/subscriptions | Create lead ads subscription *LeadFormsApi* | [**lead_form_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormsApi.md#lead_form_get) | **GET** /ad_accounts/{ad_account_id}/lead_forms/{lead_form_id} | Get lead form by id -*LeadFormsApi* | [**lead_forms_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormsApi.md#lead_forms_list) | **GET** /ad_accounts/{ad_account_id}/lead_forms | Get lead forms +*LeadFormsApi* | [**lead_form_test_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormsApi.md#lead_form_test_create) | **POST** /ad_accounts/{ad_account_id}/lead_forms/{lead_form_id}/test | Create lead form test data +*LeadFormsApi* | [**lead_forms_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormsApi.md#lead_forms_create) | **POST** /ad_accounts/{ad_account_id}/lead_forms | Create lead forms +*LeadFormsApi* | [**lead_forms_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormsApi.md#lead_forms_list) | **GET** /ad_accounts/{ad_account_id}/lead_forms | List lead forms +*LeadFormsApi* | [**lead_forms_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormsApi.md#lead_forms_update) | **PATCH** /ad_accounts/{ad_account_id}/lead_forms | Update lead forms +*LeadsExportApi* | [**leads_export_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadsExportApi.md#leads_export_create) | **POST** /ad_accounts/{ad_account_id}/leads_export | Create a request to export leads collected from a lead ad +*LeadsExportApi* | [**leads_export_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadsExportApi.md#leads_export_get) | **GET** /ad_accounts/{ad_account_id}/leads_export/{leads_export_id} | Get the lead export from the lead export create call *MediaApi* | [**media_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaApi.md#media_create) | **POST** /media | Register media upload *MediaApi* | [**media_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaApi.md#media_get) | **GET** /media/{media_id} | Get media upload details *MediaApi* | [**media_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaApi.md#media_list) | **GET** /media | List media uploads *OauthApi* | [**oauth_token**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthApi.md#oauth_token) | **POST** /oauth/token | Generate OAuth access token *OrderLinesApi* | [**order_lines_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OrderLinesApi.md#order_lines_get) | **GET** /ad_accounts/{ad_account_id}/order_lines/{order_line_id} | Get order line *OrderLinesApi* | [**order_lines_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OrderLinesApi.md#order_lines_list) | **GET** /ad_accounts/{ad_account_id}/order_lines | Get order lines +*PinsApi* | [**multi_pins_analytics**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinsApi.md#multi_pins_analytics) | **GET** /pins/analytics | Get multiple Pin analytics *PinsApi* | [**pins_analytics**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinsApi.md#pins_analytics) | **GET** /pins/{pin_id}/analytics | Get Pin analytics *PinsApi* | [**pins_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinsApi.md#pins_create) | **POST** /pins | Create Pin *PinsApi* | [**pins_delete**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinsApi.md#pins_delete) | **DELETE** /pins/{pin_id} | Delete Pin @@ -234,14 +301,18 @@ Class | Method | HTTP request | Description *ProductGroupPromotionsApi* | [**product_group_promotions_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotionsApi.md#product_group_promotions_list) | **GET** /ad_accounts/{ad_account_id}/product_group_promotions | Get product group promotions *ProductGroupPromotionsApi* | [**product_group_promotions_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotionsApi.md#product_group_promotions_update) | **PATCH** /ad_accounts/{ad_account_id}/product_group_promotions | Update product group promotions *ProductGroupPromotionsApi* | [**product_groups_analytics**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotionsApi.md#product_groups_analytics) | **GET** /ad_accounts/{ad_account_id}/product_groups/analytics | Get product group analytics -*ProductGroupsApi* | [**ad_accounts_catalogs_product_groups_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupsApi.md#ad_accounts_catalogs_product_groups_list) | **GET** /ad_accounts/{ad_account_id}/product_groups/catalogs | Get catalog product groups *ResourcesApi* | [**ad_account_countries_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ResourcesApi.md#ad_account_countries_get) | **GET** /resources/ad_account_countries | Get ad accounts countries *ResourcesApi* | [**delivery_metrics_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ResourcesApi.md#delivery_metrics_get) | **GET** /resources/delivery_metrics | Get available metrics' definitions *ResourcesApi* | [**interest_targeting_options_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ResourcesApi.md#interest_targeting_options_get) | **GET** /resources/targeting/interests/{interest_id} | Get interest details +*ResourcesApi* | [**lead_form_questions_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ResourcesApi.md#lead_form_questions_get) | **GET** /resources/lead_form_questions | Get lead form questions *ResourcesApi* | [**metrics_ready_state_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ResourcesApi.md#metrics_ready_state_get) | **GET** /resources/metrics_ready_state | Get metrics ready state *ResourcesApi* | [**targeting_options_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ResourcesApi.md#targeting_options_get) | **GET** /resources/targeting/{targeting_type} | Get targeting options +*SearchApi* | [**search_partner_pins**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SearchApi.md#search_partner_pins) | **GET** /search/partner/pins | Search pins by a given search term *SearchApi* | [**search_user_boards_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SearchApi.md#search_user_boards_get) | **GET** /search/boards | Search user's boards *SearchApi* | [**search_user_pins_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SearchApi.md#search_user_pins_list) | **GET** /search/pins | Search user's Pins +*TargetingTemplateApi* | [**targeting_template_create**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateApi.md#targeting_template_create) | **POST** /ad_accounts/{ad_account_id}/targeting_templates | Create targeting templates +*TargetingTemplateApi* | [**targeting_template_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateApi.md#targeting_template_list) | **GET** /ad_accounts/{ad_account_id}/targeting_templates | List targeting templates +*TargetingTemplateApi* | [**targeting_template_update**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateApi.md#targeting_template_update) | **PATCH** /ad_accounts/{ad_account_id}/targeting_templates | Update targeting templates *TermsApi* | [**terms_related_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TermsApi.md#terms_related_list) | **GET** /terms/related | List related terms *TermsApi* | [**terms_suggested_list**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TermsApi.md#terms_suggested_list) | **GET** /terms/suggested | List suggested terms *TermsOfServiceApi* | [**terms_of_service_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TermsOfServiceApi.md#terms_of_service_get) | **GET** /ad_accounts/{ad_account_id}/terms_of_service | Get terms of service @@ -253,6 +324,7 @@ Class | Method | HTTP request | Description *UserAccountApi* | [**user_account_analytics**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserAccountApi.md#user_account_analytics) | **GET** /user_account/analytics | Get user account analytics *UserAccountApi* | [**user_account_analytics_top_pins**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserAccountApi.md#user_account_analytics_top_pins) | **GET** /user_account/analytics/top_pins | Get user account top pins analytics *UserAccountApi* | [**user_account_analytics_top_video_pins**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserAccountApi.md#user_account_analytics_top_video_pins) | **GET** /user_account/analytics/top_video_pins | Get user account top video pins analytics +*UserAccountApi* | [**user_account_followed_interests**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserAccountApi.md#user_account_followed_interests) | **GET** /users/{username}/interests/follow | List following interests *UserAccountApi* | [**user_account_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserAccountApi.md#user_account_get) | **GET** /user_account | Get user account *UserAccountApi* | [**user_following_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserAccountApi.md#user_following_get) | **GET** /user_account/following | List following *UserAccountApi* | [**user_websites_get**](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserAccountApi.md#user_websites_get) | **GET** /user_account/websites | Get user websites @@ -267,15 +339,25 @@ Class | Method | HTTP request | Description - [AdAccount](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccount.md) - [AdAccountAnalyticsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountAnalyticsResponse.md) - [AdAccountCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountCreateRequest.md) + - [AdAccountCreateSubscriptionRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountCreateSubscriptionRequest.md) + - [AdAccountCreateSubscriptionRequestPartnerMetadata](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountCreateSubscriptionRequestPartnerMetadata.md) + - [AdAccountCreateSubscriptionResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountCreateSubscriptionResponse.md) + - [AdAccountGetSubscriptionResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountGetSubscriptionResponse.md) + - [AdAccountGetSubscriptionResponseAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountGetSubscriptionResponseAllOf.md) + - [AdAccountGetSubscriptionResponseAllOf1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountGetSubscriptionResponseAllOf1.md) - [AdAccountOwner](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountOwner.md) - [AdAccountsCountryResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsCountryResponse.md) - [AdAccountsCountryResponseData](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdAccountsCountryResponseData.md) - [AdArrayResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdArrayResponse.md) - [AdArrayResponseElement](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdArrayResponseElement.md) - [AdCommon](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdCommon.md) + - [AdCountry](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdCountry.md) - [AdCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdCreateRequest.md) - [AdGroupArrayResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupArrayResponse.md) - [AdGroupArrayResponseElement](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupArrayResponseElement.md) + - [AdGroupAudienceSizingRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupAudienceSizingRequest.md) + - [AdGroupAudienceSizingRequestKeywords](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupAudienceSizingRequestKeywords.md) + - [AdGroupAudienceSizingResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupAudienceSizingResponse.md) - [AdGroupCommon](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupCommon.md) - [AdGroupCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupCreateRequest.md) - [AdGroupCreateRequestAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdGroupCreateRequestAllOf.md) @@ -294,6 +376,8 @@ Class | Method | HTTP request | Description - [AdResponseAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdResponseAllOf.md) - [AdUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdUpdateRequest.md) - [AdUpdateRequest1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdUpdateRequest1.md) + - [AdsAnalyticsAdTargetingType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsAnalyticsAdTargetingType.md) + - [AdsAnalyticsCampaignTargetingType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsAnalyticsCampaignTargetingType.md) - [AdsAnalyticsCreateAsyncRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsAnalyticsCreateAsyncRequest.md) - [AdsAnalyticsCreateAsyncRequestAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsAnalyticsCreateAsyncRequestAllOf.md) - [AdsAnalyticsCreateAsyncRequestAllOf1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsAnalyticsCreateAsyncRequestAllOf1.md) @@ -304,11 +388,38 @@ Class | Method | HTTP request | Description - [AdsAnalyticsMetricsFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsAnalyticsMetricsFilter.md) - [AdsAnalyticsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsAnalyticsResponse.md) - [AdsAnalyticsTargetingType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsAnalyticsTargetingType.md) + - [AdsCreditDiscountsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsCreditDiscountsResponse.md) + - [AdsCreditRedeemRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsCreditRedeemRequest.md) + - [AdsCreditRedeemResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdsCreditRedeemResponse.md) + - [AdvancedAuctionBidOptions](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionBidOptions.md) + - [AdvancedAuctionItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionItem.md) + - [AdvancedAuctionItemAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionItemAllOf.md) + - [AdvancedAuctionItems](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionItems.md) + - [AdvancedAuctionItemsGetRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionItemsGetRecord.md) + - [AdvancedAuctionItemsGetRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionItemsGetRequest.md) + - [AdvancedAuctionItemsSubmitDeleteRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionItemsSubmitDeleteRecord.md) + - [AdvancedAuctionItemsSubmitRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionItemsSubmitRecord.md) + - [AdvancedAuctionItemsSubmitRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionItemsSubmitRequest.md) + - [AdvancedAuctionItemsSubmitUpsertRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionItemsSubmitUpsertRecord.md) + - [AdvancedAuctionItemsSubmitUpsertRecordAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionItemsSubmitUpsertRecordAllOf.md) + - [AdvancedAuctionKey](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionKey.md) + - [AdvancedAuctionOperation](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionOperation.md) + - [AdvancedAuctionOperationError](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionOperationError.md) + - [AdvancedAuctionProcessedItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionProcessedItem.md) + - [AdvancedAuctionProcessedItemAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionProcessedItemAllOf.md) + - [AdvancedAuctionProcessedItems](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AdvancedAuctionProcessedItems.md) - [AgeBucketList](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AgeBucketList.md) - [AnalyticsDailyMetrics](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AnalyticsDailyMetrics.md) - [AnalyticsMetricsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AnalyticsMetricsResponse.md) - [AnalyticsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AnalyticsResponse.md) + - [AppTypeMultipliers](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AppTypeMultipliers.md) + - [AssetGroupBinding](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AssetGroupBinding.md) + - [AssetGroupType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AssetGroupType.md) + - [AssetGroupTypes](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AssetGroupTypes.md) + - [AssetIdPermissions](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AssetIdPermissions.md) + - [AssetIdToPermissions](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AssetIdToPermissions.md) - [Audience](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Audience.md) + - [AudienceAccountType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceAccountType.md) - [AudienceCategory](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceCategory.md) - [AudienceCommon](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceCommon.md) - [AudienceCreateCustomRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceCreateCustomRequest.md) @@ -325,17 +436,25 @@ Class | Method | HTTP request | Description - [AudienceInsightType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceInsightType.md) - [AudienceInsightsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceInsightsResponse.md) - [AudienceRule](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceRule.md) + - [AudienceShareType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceShareType.md) - [AudienceSharingType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceSharingType.md) + - [AudienceSubcategory](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceSubcategory.md) - [AudienceType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceType.md) - [AudienceUpdateOperationType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceUpdateOperationType.md) - [AudienceUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceUpdateRequest.md) - [AudienceUpdateRequest1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AudienceUpdateRequest1.md) + - [AuthRespondInvitesBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AuthRespondInvitesBody.md) + - [AuthRespondInvitesBodyAction](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AuthRespondInvitesBodyAction.md) + - [AuthRespondInvitesBodyInvites](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AuthRespondInvitesBodyInvites.md) - [AvailabilityFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/AvailabilityFilter.md) + - [BaseInviteDataResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BaseInviteDataResponse.md) + - [BaseInviteDataResponseInviteData](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BaseInviteDataResponseInviteData.md) - [BatchOperation](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BatchOperation.md) - [BatchOperationStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BatchOperationStatus.md) - [BidFloor](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BidFloor.md) - [BidFloorRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BidFloorRequest.md) - [BidFloorSpec](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BidFloorSpec.md) + - [BillingProfilesResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BillingProfilesResponse.md) - [Board](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Board.md) - [BoardMedia](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BoardMedia.md) - [BoardOwner](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BoardOwner.md) @@ -349,6 +468,7 @@ Class | Method | HTTP request | Description - [BulkDownloadResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkDownloadResponse.md) - [BulkEntityType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkEntityType.md) - [BulkOutputFormat](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkOutputFormat.md) + - [BulkPinAnalyticsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkPinAnalyticsResponse.md) - [BulkReportingJobStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkReportingJobStatus.md) - [BulkUpsertRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkUpsertRequest.md) - [BulkUpsertRequestCreate](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkUpsertRequestCreate.md) @@ -356,6 +476,20 @@ Class | Method | HTTP request | Description - [BulkUpsertResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkUpsertResponse.md) - [BulkUpsertStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkUpsertStatus.md) - [BulkUpsertStatusResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BulkUpsertStatusResponse.md) + - [BusinessAccessError](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessError.md) + - [BusinessAccessRole](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessRole.md) + - [BusinessAccessUserSummary](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessAccessUserSummary.md) + - [BusinessMemberAssetsSummary](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessMemberAssetsSummary.md) + - [BusinessMemberAssetsSummaryAdAccounts](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessMemberAssetsSummaryAdAccounts.md) + - [BusinessMemberAssetsSummaryProfiles](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessMemberAssetsSummaryProfiles.md) + - [BusinessRole](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessRole.md) + - [BusinessRoleCheckMode](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessRoleCheckMode.md) + - [BusinessRoleForMembers](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessRoleForMembers.md) + - [BusinessSharedAudience](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessSharedAudience.md) + - [BusinessSharedAudience1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessSharedAudience1.md) + - [BusinessSharedAudienceResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessSharedAudienceResponse.md) + - [BusinessSharedAudienceResponse1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessSharedAudienceResponse1.md) + - [BusinessesBusinessIdMembersAssetsAccessAccesses](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/BusinessesBusinessIdMembersAssetsAccessAccesses.md) - [CampaignCommon](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignCommon.md) - [CampaignCreateCommon](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignCreateCommon.md) - [CampaignCreateCommonAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignCreateCommonAllOf.md) @@ -373,13 +507,48 @@ Class | Method | HTTP request | Description - [CampaignUpdateRequestAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignUpdateRequestAllOf.md) - [CampaignUpdateResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignUpdateResponse.md) - [CampaignsAnalyticsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CampaignsAnalyticsResponse.md) - - [CatalogProductGroup](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogProductGroup.md) + - [CancelInvitesBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CancelInvitesBody.md) + - [Catalog](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Catalog.md) + - [CatalogAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogAllOf.md) + - [CatalogsCreateCreativeAssetsItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreateCreativeAssetsItem.md) + - [CatalogsCreateHotelItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreateHotelItem.md) + - [CatalogsCreateReportResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreateReportResponse.md) + - [CatalogsCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreateRequest.md) + - [CatalogsCreateRetailItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreateRetailItem.md) + - [CatalogsCreativeAssetsAttributes](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsAttributes.md) + - [CatalogsCreativeAssetsAttributesAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsAttributesAllOf.md) + - [CatalogsCreativeAssetsBatchItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsBatchItem.md) + - [CatalogsCreativeAssetsBatchRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsBatchRequest.md) + - [CatalogsCreativeAssetsFeed](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsFeed.md) + - [CatalogsCreativeAssetsFeedsCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsFeedsCreateRequest.md) + - [CatalogsCreativeAssetsFeedsUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsFeedsUpdateRequest.md) + - [CatalogsCreativeAssetsItemErrorResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsItemErrorResponse.md) + - [CatalogsCreativeAssetsItemResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsItemResponse.md) + - [CatalogsCreativeAssetsItemsBatch](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsItemsBatch.md) + - [CatalogsCreativeAssetsItemsFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsItemsFilter.md) + - [CatalogsCreativeAssetsItemsPostFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsItemsPostFilter.md) + - [CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest.md) + - [CatalogsCreativeAssetsProduct](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsProduct.md) + - [CatalogsCreativeAssetsProductGroup](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsProductGroup.md) + - [CatalogsCreativeAssetsProductGroupCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsProductGroupCreateRequest.md) + - [CatalogsCreativeAssetsProductGroupFilterKeys](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsProductGroupFilterKeys.md) + - [CatalogsCreativeAssetsProductGroupFilters](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsProductGroupFilters.md) + - [CatalogsCreativeAssetsProductGroupFiltersAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsProductGroupFiltersAllOf.md) + - [CatalogsCreativeAssetsProductGroupFiltersAnyOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsProductGroupFiltersAnyOf.md) + - [CatalogsCreativeAssetsProductGroupProductCounts](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsProductGroupProductCounts.md) + - [CatalogsCreativeAssetsProductGroupUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsProductGroupUpdateRequest.md) + - [CatalogsCreativeAssetsProductMetadata](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsCreativeAssetsProductMetadata.md) - [CatalogsDbItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsDbItem.md) + - [CatalogsDeleteCreativeAssetsItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsDeleteCreativeAssetsItem.md) + - [CatalogsDeleteHotelItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsDeleteHotelItem.md) + - [CatalogsDeleteRetailItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsDeleteRetailItem.md) - [CatalogsFeed](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeed.md) - [CatalogsFeedCredentials](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedCredentials.md) + - [CatalogsFeedIngestion](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedIngestion.md) - [CatalogsFeedIngestionDetails](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedIngestionDetails.md) - [CatalogsFeedIngestionErrors](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedIngestionErrors.md) - [CatalogsFeedIngestionInfo](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedIngestionInfo.md) + - [CatalogsFeedIngestionWarnings](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedIngestionWarnings.md) - [CatalogsFeedProcessingResult](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedProcessingResult.md) - [CatalogsFeedProcessingResultFields](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedProcessingResultFields.md) - [CatalogsFeedProcessingSchedule](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedProcessingSchedule.md) @@ -391,6 +560,33 @@ Class | Method | HTTP request | Description - [CatalogsFeedsCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedsCreateRequest.md) - [CatalogsFeedsUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFeedsUpdateRequest.md) - [CatalogsFormat](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsFormat.md) + - [CatalogsHotelAddress](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelAddress.md) + - [CatalogsHotelAttributes](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelAttributes.md) + - [CatalogsHotelAttributesAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelAttributesAllOf.md) + - [CatalogsHotelAttributesAllOfMainImage](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelAttributesAllOfMainImage.md) + - [CatalogsHotelBatchItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelBatchItem.md) + - [CatalogsHotelBatchRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelBatchRequest.md) + - [CatalogsHotelFeed](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelFeed.md) + - [CatalogsHotelFeedsCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelFeedsCreateRequest.md) + - [CatalogsHotelFeedsUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelFeedsUpdateRequest.md) + - [CatalogsHotelGuestRatings](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelGuestRatings.md) + - [CatalogsHotelItemErrorResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelItemErrorResponse.md) + - [CatalogsHotelItemResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelItemResponse.md) + - [CatalogsHotelItemsBatch](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelItemsBatch.md) + - [CatalogsHotelItemsFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelItemsFilter.md) + - [CatalogsHotelItemsPostFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelItemsPostFilter.md) + - [CatalogsHotelListProductsByCatalogBasedFilterRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelListProductsByCatalogBasedFilterRequest.md) + - [CatalogsHotelProduct](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelProduct.md) + - [CatalogsHotelProductGroup](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelProductGroup.md) + - [CatalogsHotelProductGroupCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelProductGroupCreateRequest.md) + - [CatalogsHotelProductGroupFilterKeys](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelProductGroupFilterKeys.md) + - [CatalogsHotelProductGroupFilters](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelProductGroupFilters.md) + - [CatalogsHotelProductGroupFiltersAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelProductGroupFiltersAllOf.md) + - [CatalogsHotelProductGroupFiltersAnyOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelProductGroupFiltersAnyOf.md) + - [CatalogsHotelProductGroupProductCounts](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelProductGroupProductCounts.md) + - [CatalogsHotelProductGroupUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelProductGroupUpdateRequest.md) + - [CatalogsHotelProductMetadata](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelProductMetadata.md) + - [CatalogsHotelReportParameters](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsHotelReportParameters.md) - [CatalogsItemValidationDetails](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemValidationDetails.md) - [CatalogsItemValidationErrors](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemValidationErrors.md) - [CatalogsItemValidationIssue](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemValidationIssue.md) @@ -402,15 +598,17 @@ Class | Method | HTTP request | Description - [CatalogsItemsCreateBatchRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemsCreateBatchRequest.md) - [CatalogsItemsDeleteBatchRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemsDeleteBatchRequest.md) - [CatalogsItemsDeleteDiscontinuedBatchRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemsDeleteDiscontinuedBatchRequest.md) + - [CatalogsItemsFilters](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemsFilters.md) + - [CatalogsItemsPostFilters](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemsPostFilters.md) + - [CatalogsItemsRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemsRequest.md) - [CatalogsItemsUpdateBatchRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemsUpdateBatchRequest.md) + - [CatalogsItemsUpsertBatchRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsItemsUpsertBatchRequest.md) + - [CatalogsListProductsByFeedBasedFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsListProductsByFeedBasedFilter.md) - [CatalogsListProductsByFilterRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsListProductsByFilterRequest.md) - - [CatalogsListProductsByFilterRequestOneOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsListProductsByFilterRequestOneOf.md) - [CatalogsLocale](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsLocale.md) - [CatalogsProduct](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProduct.md) - - [CatalogsProductGroup](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroup.md) - [CatalogsProductGroupCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupCreateRequest.md) - [CatalogsProductGroupCurrencyCriteria](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupCurrencyCriteria.md) - - [CatalogsProductGroupFeedBasedCase](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupFeedBasedCase.md) - [CatalogsProductGroupFilterKeys](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupFilterKeys.md) - [CatalogsProductGroupFilters](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupFilters.md) - [CatalogsProductGroupFiltersAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupFiltersAllOf.md) @@ -418,17 +616,58 @@ Class | Method | HTTP request | Description - [CatalogsProductGroupFiltersRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupFiltersRequest.md) - [CatalogsProductGroupFiltersRequestAnyOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupFiltersRequestAnyOf.md) - [CatalogsProductGroupFiltersRequestAnyOf1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupFiltersRequestAnyOf1.md) - - [CatalogsProductGroupMerchantBasedCase](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupMerchantBasedCase.md) + - [CatalogsProductGroupMultipleCountriesCriteria](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupMultipleCountriesCriteria.md) - [CatalogsProductGroupMultipleGenderCriteria](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupMultipleGenderCriteria.md) + - [CatalogsProductGroupMultipleMediaTypesCriteria](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupMultipleMediaTypesCriteria.md) - [CatalogsProductGroupMultipleStringCriteria](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupMultipleStringCriteria.md) - [CatalogsProductGroupMultipleStringListCriteria](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupMultipleStringListCriteria.md) - [CatalogsProductGroupPricingCriteria](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupPricingCriteria.md) - - [CatalogsProductGroupProductCounts](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupProductCounts.md) + - [CatalogsProductGroupPricingCurrencyCriteria](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupPricingCurrencyCriteria.md) + - [CatalogsProductGroupProductCountsVertical](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupProductCountsVertical.md) - [CatalogsProductGroupStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupStatus.md) - [CatalogsProductGroupType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupType.md) - [CatalogsProductGroupUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductGroupUpdateRequest.md) - - [CatalogsProductMetadata](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsProductMetadata.md) + - [CatalogsReport](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsReport.md) + - [CatalogsReportDistributionIssueFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsReportDistributionIssueFilter.md) + - [CatalogsReportDistributionStats](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsReportDistributionStats.md) + - [CatalogsReportFeedIngestionFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsReportFeedIngestionFilter.md) + - [CatalogsReportFeedIngestionStats](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsReportFeedIngestionStats.md) + - [CatalogsReportParameters](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsReportParameters.md) + - [CatalogsReportStats](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsReportStats.md) + - [CatalogsRetailBatchRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailBatchRequest.md) + - [CatalogsRetailFeed](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailFeed.md) + - [CatalogsRetailFeedsCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailFeedsCreateRequest.md) + - [CatalogsRetailFeedsUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailFeedsUpdateRequest.md) + - [CatalogsRetailItemErrorResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailItemErrorResponse.md) + - [CatalogsRetailItemResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailItemResponse.md) + - [CatalogsRetailItemsBatch](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailItemsBatch.md) + - [CatalogsRetailItemsFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailItemsFilter.md) + - [CatalogsRetailItemsPostFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailItemsPostFilter.md) + - [CatalogsRetailListProductsByCatalogBasedFilterRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailListProductsByCatalogBasedFilterRequest.md) + - [CatalogsRetailProduct](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailProduct.md) + - [CatalogsRetailProductGroup](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailProductGroup.md) + - [CatalogsRetailProductGroupCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailProductGroupCreateRequest.md) + - [CatalogsRetailProductGroupProductCounts](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailProductGroupProductCounts.md) + - [CatalogsRetailProductGroupUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailProductGroupUpdateRequest.md) + - [CatalogsRetailProductMetadata](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailProductMetadata.md) + - [CatalogsRetailReportParameters](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsRetailReportParameters.md) - [CatalogsStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsStatus.md) + - [CatalogsType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsType.md) + - [CatalogsUpdatableCreativeAssetsAttributes](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsUpdatableCreativeAssetsAttributes.md) + - [CatalogsUpdatableHotelAttributes](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsUpdatableHotelAttributes.md) + - [CatalogsUpdateCreativeAssetsItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsUpdateCreativeAssetsItem.md) + - [CatalogsUpdateHotelItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsUpdateHotelItem.md) + - [CatalogsUpdateRetailItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsUpdateRetailItem.md) + - [CatalogsUpsertCreativeAssetsItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsUpsertCreativeAssetsItem.md) + - [CatalogsUpsertHotelItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsUpsertHotelItem.md) + - [CatalogsUpsertRetailItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsUpsertRetailItem.md) + - [CatalogsVerticalBatchRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsVerticalBatchRequest.md) + - [CatalogsVerticalFeedsCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsVerticalFeedsCreateRequest.md) + - [CatalogsVerticalFeedsUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsVerticalFeedsUpdateRequest.md) + - [CatalogsVerticalProductGroup](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsVerticalProductGroup.md) + - [CatalogsVerticalProductGroupCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsVerticalProductGroupCreateRequest.md) + - [CatalogsVerticalProductGroupUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsVerticalProductGroupUpdateRequest.md) + - [CatalogsVerticalsListProductsByCatalogBasedFilterRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CatalogsVerticalsListProductsByCatalogBasedFilterRequest.md) - [ConditionFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ConditionFilter.md) - [ConversionApiResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ConversionApiResponse.md) - [ConversionApiResponseEvents](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ConversionApiResponseEvents.md) @@ -452,10 +691,26 @@ Class | Method | HTTP request | Description - [ConversionTagType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ConversionTagType.md) - [ConversionTagsOcpmEligibleResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ConversionTagsOcpmEligibleResponse.md) - [Country](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Country.md) + - [CountryFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CountryFilter.md) + - [CreateAssetAccessRequestBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateAssetAccessRequestBody.md) + - [CreateAssetAccessRequestBodyAssetRequests](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateAssetAccessRequestBodyAssetRequests.md) + - [CreateAssetAccessRequestErrorMessage](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateAssetAccessRequestErrorMessage.md) + - [CreateAssetAccessRequestResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateAssetAccessRequestResponse.md) + - [CreateAssetGroupBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateAssetGroupBody.md) + - [CreateAssetGroupResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateAssetGroupResponse.md) + - [CreateAssetInvitesRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateAssetInvitesRequest.md) + - [CreateAssetInvitesRequestItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateAssetInvitesRequestItem.md) + - [CreateInvitesResultsResponseArray](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateInvitesResultsResponseArray.md) + - [CreateInvitesResultsResponseArrayInvite](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateInvitesResultsResponseArrayInvite.md) + - [CreateInvitesResultsResponseArrayItems](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateInvitesResultsResponseArrayItems.md) - [CreateMMMReportRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateMMMReportRequest.md) - [CreateMMMReportRequestAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateMMMReportRequestAllOf.md) - [CreateMMMReportResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateMMMReportResponse.md) - [CreateMMMReportResponseData](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateMMMReportResponseData.md) + - [CreateMembershipOrPartnershipInvitesBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreateMembershipOrPartnershipInvitesBody.md) + - [CreativeAssetsIdFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreativeAssetsIdFilter.md) + - [CreativeAssetsProcessingRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreativeAssetsProcessingRecord.md) + - [CreativeAssetsVisibilityType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreativeAssetsVisibilityType.md) - [CreativeType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CreativeType.md) - [Currency](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Currency.md) - [CurrencyFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CurrencyFilter.md) @@ -469,20 +724,41 @@ Class | Method | HTTP request | Description - [CustomerListUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/CustomerListUpdateRequest.md) - [DataOutputFormat](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DataOutputFormat.md) - [DataStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DataStatus.md) + - [DeleteAssetGroupBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeleteAssetGroupBody.md) + - [DeleteAssetGroupResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeleteAssetGroupResponse.md) + - [DeleteAssetGroupResponseExceptions](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeleteAssetGroupResponseExceptions.md) + - [DeleteInvitesResultsResponseArray](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeleteInvitesResultsResponseArray.md) + - [DeleteInvitesResultsResponseArrayException](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeleteInvitesResultsResponseArrayException.md) + - [DeleteInvitesResultsResponseArrayItems](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeleteInvitesResultsResponseArrayItems.md) + - [DeleteMemberAccessResult](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeleteMemberAccessResult.md) + - [DeleteMemberAccessResultsResponseArray](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeleteMemberAccessResultsResponseArray.md) + - [DeletePartnerAssetAccessBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeletePartnerAssetAccessBody.md) + - [DeletePartnerAssetAccessBodyAccesses](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeletePartnerAssetAccessBodyAccesses.md) + - [DeletePartnerAssetsResult](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeletePartnerAssetsResult.md) + - [DeletePartnerAssetsResultsResponseArray](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeletePartnerAssetsResultsResponseArray.md) + - [DeletePartnersRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeletePartnersRequest.md) + - [DeletePartnersResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeletePartnersResponse.md) + - [DeletedMembersResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeletedMembersResponse.md) - [DeliveryMetricsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeliveryMetricsResponse.md) - [DeliveryMetricsResponseItems](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DeliveryMetricsResponseItems.md) + - [DetailedError](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/DetailedError.md) - [EnhancedMatchStatusType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/EnhancedMatchStatusType.md) - [EntityStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/EntityStatus.md) - [Error](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Error.md) - [Exception](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Exception.md) - [FeedFields](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/FeedFields.md) + - [FeedFields1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/FeedFields1.md) + - [FeedFields2](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/FeedFields2.md) - [FollowUserRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/FollowUserRequest.md) - [Gender](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Gender.md) - [GenderFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GenderFilter.md) - [GenderList](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GenderList.md) - [GetAudiencesOrderBy](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GetAudiencesOrderBy.md) + - [GetBusinessAssetTypeResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GetBusinessAssetTypeResponse.md) + - [GetBusinessAssetsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GetBusinessAssetsResponse.md) - [GetMMMReportResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GetMMMReportResponse.md) - [GetMMMReportResponseData](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GetMMMReportResponseData.md) + - [GetPartnerAssetsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GetPartnerAssetsResponse.md) - [GoogleProductCategory0Filter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GoogleProductCategory0Filter.md) - [GoogleProductCategory1Filter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GoogleProductCategory1Filter.md) - [GoogleProductCategory2Filter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GoogleProductCategory2Filter.md) @@ -491,16 +767,38 @@ Class | Method | HTTP request | Description - [GoogleProductCategory5Filter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GoogleProductCategory5Filter.md) - [GoogleProductCategory6Filter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GoogleProductCategory6Filter.md) - [Granularity](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Granularity.md) + - [GridClickType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/GridClickType.md) + - [HotelIdFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/HotelIdFilter.md) + - [HotelProcessingRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/HotelProcessingRecord.md) - [ImageDetails](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ImageDetails.md) - [ImageMetadata](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ImageMetadata.md) + - [ImageMetadataImages](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ImageMetadataImages.md) - [InlineObject](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InlineObject.md) + - [InlineObject1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InlineObject1.md) + - [IntegrationLog](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationLog.md) + - [IntegrationLogClientError](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationLogClientError.md) + - [IntegrationLogClientRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationLogClientRequest.md) + - [IntegrationLogsInvalidLogResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationLogsInvalidLogResponse.md) + - [IntegrationLogsInvalidLogResponseRejectedLogs](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationLogsInvalidLogResponseRejectedLogs.md) + - [IntegrationLogsRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationLogsRequest.md) + - [IntegrationLogsSuccessResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationLogsSuccessResponse.md) - [IntegrationMetadata](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationMetadata.md) - [IntegrationRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationRecord.md) - [IntegrationRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationRequest.md) - [IntegrationRequestPatch](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/IntegrationRequestPatch.md) - [Interest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Interest.md) + - [InviteAssetsSummary](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InviteAssetsSummary.md) + - [InviteAssetsSummaryAdAccounts](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InviteAssetsSummaryAdAccounts.md) + - [InviteAssetsSummaryProfiles](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InviteAssetsSummaryProfiles.md) + - [InviteBusinessRoleBinding](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InviteBusinessRoleBinding.md) + - [InviteExceptionResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InviteExceptionResponse.md) + - [InviteResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InviteResponse.md) + - [InviteStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InviteStatus.md) + - [InviteType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/InviteType.md) - [ItemAttributes](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemAttributes.md) - [ItemAttributesAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemAttributesAllOf.md) + - [ItemAttributesRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemAttributesRequest.md) + - [ItemAttributesRequestAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemAttributesRequestAllOf.md) - [ItemBatchRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemBatchRecord.md) - [ItemCreateBatchRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemCreateBatchRecord.md) - [ItemDeleteBatchRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemDeleteBatchRecord.md) @@ -513,9 +811,12 @@ Class | Method | HTTP request | Description - [ItemResponseAnyOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemResponseAnyOf.md) - [ItemResponseAnyOf1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemResponseAnyOf1.md) - [ItemUpdateBatchRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemUpdateBatchRecord.md) + - [ItemUpsertBatchRecord](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemUpsertBatchRecord.md) - [ItemValidationEvent](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ItemValidationEvent.md) - [Keyword](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Keyword.md) + - [KeywordAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordAllOf.md) - [KeywordError](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordError.md) + - [KeywordList](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordList.md) - [KeywordMetrics](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordMetrics.md) - [KeywordMetricsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordMetricsResponse.md) - [KeywordUpdate](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordUpdate.md) @@ -526,18 +827,34 @@ Class | Method | HTTP request | Description - [KeywordsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/KeywordsResponse.md) - [L1InterestList](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/L1InterestList.md) - [Language](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Language.md) + - [LeadFormArrayResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormArrayResponse.md) + - [LeadFormArrayResponseItems](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormArrayResponseItems.md) - [LeadFormCommon](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormCommon.md) + - [LeadFormCommonPolicyLinks](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormCommonPolicyLinks.md) + - [LeadFormCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormCreateRequest.md) - [LeadFormQuestion](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormQuestion.md) - [LeadFormQuestionFieldType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormQuestionFieldType.md) - [LeadFormQuestionType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormQuestionType.md) - [LeadFormResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormResponse.md) - [LeadFormResponseAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormResponseAllOf.md) - [LeadFormStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormStatus.md) + - [LeadFormTestRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormTestRequest.md) + - [LeadFormTestResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormTestResponse.md) + - [LeadFormUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormUpdateRequest.md) + - [LeadFormUpdateRequestAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadFormUpdateRequestAllOf.md) + - [LeadsExportCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadsExportCreateRequest.md) + - [LeadsExportCreateResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadsExportCreateResponse.md) + - [LeadsExportResponseData](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadsExportResponseData.md) + - [LeadsExportStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LeadsExportStatus.md) - [LineItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LineItem.md) - [LinkedBusiness](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/LinkedBusiness.md) + - [MMMReportingColumn](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MMMReportingColumn.md) + - [MMMReportingTargetingType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MMMReportingTargetingType.md) - [MatchType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MatchType.md) - [MatchTypeResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MatchTypeResponse.md) - [MaxPriceFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MaxPriceFilter.md) + - [MediaType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaType.md) + - [MediaTypeFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaTypeFilter.md) - [MediaUpload](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaUpload.md) - [MediaUploadAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaUploadAllOf.md) - [MediaUploadAllOfUploadParameters](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaUploadAllOfUploadParameters.md) @@ -545,6 +862,9 @@ Class | Method | HTTP request | Description - [MediaUploadRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaUploadRequest.md) - [MediaUploadStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaUploadStatus.md) - [MediaUploadType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MediaUploadType.md) + - [MemberBusinessRole](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MemberBusinessRole.md) + - [MembersToDeleteBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MembersToDeleteBody.md) + - [MembersToDeleteBodyMembers](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MembersToDeleteBodyMembers.md) - [Metrics](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Metrics.md) - [MetricsReportingLevel](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MetricsReportingLevel.md) - [MetricsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/MetricsResponse.md) @@ -553,16 +873,23 @@ Class | Method | HTTP request | Description - [NonNullableProductAvailabilityType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/NonNullableProductAvailabilityType.md) - [NullableCatalogsItemFieldType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/NullableCatalogsItemFieldType.md) - [NullableCurrency](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/NullableCurrency.md) + - [OauthAccessTokenRequestClientCredentials](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenRequestClientCredentials.md) + - [OauthAccessTokenRequestClientCredentialsAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenRequestClientCredentialsAllOf.md) - [OauthAccessTokenRequestCode](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenRequestCode.md) - [OauthAccessTokenRequestCodeAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenRequestCodeAllOf.md) - [OauthAccessTokenRequestRefresh](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenRequestRefresh.md) - [OauthAccessTokenRequestRefreshAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenRequestRefreshAllOf.md) - [OauthAccessTokenResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenResponse.md) + - [OauthAccessTokenResponseClientCredentials](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenResponseClientCredentials.md) - [OauthAccessTokenResponseCode](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenResponseCode.md) - [OauthAccessTokenResponseCodeAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenResponseCodeAllOf.md) + - [OauthAccessTokenResponseEverlastingRefresh](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenResponseEverlastingRefresh.md) + - [OauthAccessTokenResponseEverlastingRefreshAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenResponseEverlastingRefreshAllOf.md) - [OauthAccessTokenResponseIntegrationRefresh](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenResponseIntegrationRefresh.md) - [OauthAccessTokenResponseRefresh](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenResponseRefresh.md) + - [OauthAccessTokenResponseRefreshAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OauthAccessTokenResponseRefreshAllOf.md) - [ObjectiveType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ObjectiveType.md) + - [OperationType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OperationType.md) - [OptimizationGoalMetadata](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OptimizationGoalMetadata.md) - [OptimizationGoalMetadataConversionTagV3GoalMetadata](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OptimizationGoalMetadataConversionTagV3GoalMetadata.md) - [OptimizationGoalMetadataConversionTagV3GoalMetadataAttributionWindows](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OptimizationGoalMetadataConversionTagV3GoalMetadataAttributionWindows.md) @@ -579,8 +906,13 @@ Class | Method | HTTP request | Description - [OrderLinesArrayResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/OrderLinesArrayResponse.md) - [PacingDeliveryType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PacingDeliveryType.md) - [Paginated](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Paginated.md) + - [PartnerType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PartnerType.md) + - [Permissions](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Permissions.md) + - [PermissionsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PermissionsResponse.md) + - [PermissionsWithOwner](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PermissionsWithOwner.md) - [Pin](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Pin.md) - [PinAnalyticsMetricsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinAnalyticsMetricsResponse.md) + - [PinAnalyticsMetricsResponseDailyMetrics](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinAnalyticsMetricsResponseDailyMetrics.md) - [PinAnalyticsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinAnalyticsResponse.md) - [PinCreate](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinCreate.md) - [PinMedia](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinMedia.md) @@ -609,27 +941,74 @@ Class | Method | HTTP request | Description - [PinUpdateCarouselSlots](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinUpdateCarouselSlots.md) - [PinterestTagEventData](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PinterestTagEventData.md) - [PlacementGroupType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PlacementGroupType.md) + - [PlacementMultipliers](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PlacementMultipliers.md) + - [PriceFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/PriceFilter.md) - [ProductAvailabilityType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductAvailabilityType.md) - [ProductGroupAnalyticsResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupAnalyticsResponse.md) - [ProductGroupPromotion](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotion.md) - [ProductGroupPromotionCreateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotionCreateRequest.md) + - [ProductGroupPromotionCreateRequestElement](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotionCreateRequestElement.md) + - [ProductGroupPromotionCreateRequestElementAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotionCreateRequestElementAllOf.md) - [ProductGroupPromotionResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotionResponse.md) + - [ProductGroupPromotionResponseElement](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotionResponseElement.md) - [ProductGroupPromotionResponseItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotionResponseItem.md) - [ProductGroupPromotionUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupPromotionUpdateRequest.md) + - [ProductGroupReferenceFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupReferenceFilter.md) - [ProductGroupSummaryStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupSummaryStatus.md) - - [ProductGroupsCreateRequestFeedBaseCase](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductGroupsCreateRequestFeedBaseCase.md) - [ProductType0Filter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductType0Filter.md) - [ProductType1Filter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductType1Filter.md) - [ProductType2Filter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductType2Filter.md) - [ProductType3Filter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductType3Filter.md) - [ProductType4Filter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ProductType4Filter.md) + - [QuizPinData](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/QuizPinData.md) + - [QuizPinOption](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/QuizPinOption.md) + - [QuizPinQuestion](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/QuizPinQuestion.md) + - [QuizPinResult](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/QuizPinResult.md) - [RelatedTerms](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/RelatedTerms.md) - [RelatedTermsRelatedTermsList](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/RelatedTermsRelatedTermsList.md) - [ReportingColumnAsync](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/ReportingColumnAsync.md) + - [RespondToInvitesResponseArray](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/RespondToInvitesResponseArray.md) + - [RespondToInvitesResponseArrayItems](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/RespondToInvitesResponseArrayItems.md) + - [Role](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/Role.md) + - [SSIOAccountAddress](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOAccountAddress.md) + - [SSIOAccountItem](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOAccountItem.md) + - [SSIOAccountPMPName](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOAccountPMPName.md) + - [SSIOAccountResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOAccountResponse.md) + - [SSIOCreateInsertionOrderRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOCreateInsertionOrderRequest.md) + - [SSIOCreateInsertionOrderRequestAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOCreateInsertionOrderRequestAllOf.md) + - [SSIOCreateInsertionOrderResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOCreateInsertionOrderResponse.md) + - [SSIOEditInsertionOrderRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOEditInsertionOrderRequest.md) + - [SSIOEditInsertionOrderRequestAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOEditInsertionOrderRequestAllOf.md) + - [SSIOEditInsertionOrderResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOEditInsertionOrderResponse.md) + - [SSIOInsertionOrderCommon](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOInsertionOrderCommon.md) + - [SSIOInsertionOrderStatus](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOInsertionOrderStatus.md) + - [SSIOInsertionOrderStatusResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOInsertionOrderStatusResponse.md) + - [SSIOOrderLine](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SSIOOrderLine.md) + - [SharedAudience](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SharedAudience.md) + - [SharedAudience1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SharedAudience1.md) + - [SharedAudienceAccount](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SharedAudienceAccount.md) + - [SharedAudienceCommon](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SharedAudienceCommon.md) + - [SharedAudienceResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SharedAudienceResponse.md) + - [SharedAudienceResponse1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SharedAudienceResponse1.md) + - [SharedAudienceResponseCommon](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SharedAudienceResponseCommon.md) - [SingleInterestTargetingOptionResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SingleInterestTargetingOptionResponse.md) + - [SummaryPin](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/SummaryPin.md) + - [TargetingAdvertiserCountry](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingAdvertiserCountry.md) - [TargetingOptionResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingOptionResponse.md) - [TargetingSpec](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingSpec.md) + - [TargetingSpecAppType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingSpecAppType.md) - [TargetingSpecSHOPPINGRETARGETING](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingSpecSHOPPINGRETARGETING.md) + - [TargetingTemplateAudienceSizing](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateAudienceSizing.md) + - [TargetingTemplateAudienceSizingReachEstimate](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateAudienceSizingReachEstimate.md) + - [TargetingTemplateCommon](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateCommon.md) + - [TargetingTemplateCreate](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateCreate.md) + - [TargetingTemplateCreateAllOf](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateCreateAllOf.md) + - [TargetingTemplateGetResponseData](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateGetResponseData.md) + - [TargetingTemplateGetResponseData1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateGetResponseData1.md) + - [TargetingTemplateKeyword](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateKeyword.md) + - [TargetingTemplateResponseData](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateResponseData.md) + - [TargetingTemplateResponseData1](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateResponseData1.md) + - [TargetingTemplateUpdateRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTemplateUpdateRequest.md) - [TargetingTypeFilter](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TargetingTypeFilter.md) - [TemplateResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TemplateResponse.md) - [TemplateResponseDateRange](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TemplateResponseDateRange.md) @@ -649,13 +1028,37 @@ Class | Method | HTTP request | Description - [TrendingKeywordsResponseTrends](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TrendingKeywordsResponseTrends.md) - [TrendsSupportedRegion](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/TrendsSupportedRegion.md) - [UpdatableItemAttributes](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdatableItemAttributes.md) + - [UpdateAssetGroupBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateAssetGroupBody.md) + - [UpdateAssetGroupBodyAssetGroupsToUpdate](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateAssetGroupBodyAssetGroupsToUpdate.md) + - [UpdateAssetGroupResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateAssetGroupResponse.md) + - [UpdateAssetGroupResponseExceptions](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateAssetGroupResponseExceptions.md) + - [UpdateInvitesResultsResponseArray](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateInvitesResultsResponseArray.md) + - [UpdateInvitesResultsResponseArrayItems](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateInvitesResultsResponseArrayItems.md) + - [UpdateMaskBidOptionField](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateMaskBidOptionField.md) + - [UpdateMaskFieldType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateMaskFieldType.md) + - [UpdateMemberAssetAccessBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateMemberAssetAccessBody.md) + - [UpdateMemberAssetAccessBodyAccesses](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateMemberAssetAccessBodyAccesses.md) + - [UpdateMemberAssetsResultsResponseArray](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateMemberAssetsResultsResponseArray.md) + - [UpdateMemberAssetsResultsResponseArrayItems](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateMemberAssetsResultsResponseArrayItems.md) + - [UpdateMemberBusinessRoleBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateMemberBusinessRoleBody.md) + - [UpdateMemberResult](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateMemberResult.md) + - [UpdateMemberResultsResponseArray](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdateMemberResultsResponseArray.md) + - [UpdatePartnerAssetAccessBody](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdatePartnerAssetAccessBody.md) + - [UpdatePartnerAssetAccessBodyAccesses](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdatePartnerAssetAccessBodyAccesses.md) + - [UpdatePartnerAssetsResult](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdatePartnerAssetsResult.md) + - [UpdatePartnerAssetsResultsResponseArray](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdatePartnerAssetsResultsResponseArray.md) + - [UpdatePartnerResultsResponseArray](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdatePartnerResultsResponseArray.md) + - [UpdatePartnerResultsResponseArrayItems](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UpdatePartnerResultsResponseArrayItems.md) + - [UserBusinessRoleBinding](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserBusinessRoleBinding.md) - [UserFollowingFeedType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserFollowingFeedType.md) - [UserListOperationType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserListOperationType.md) - [UserListType](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserListType.md) + - [UserSingleAssetBinding](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserSingleAssetBinding.md) - [UserSummary](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserSummary.md) - [UserWebsiteSummary](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserWebsiteSummary.md) - [UserWebsiteVerificationCode](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserWebsiteVerificationCode.md) - [UserWebsiteVerifyRequest](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UserWebsiteVerifyRequest.md) + - [UsersForIndividualAssetResponse](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/UsersForIndividualAssetResponse.md) - [VideoMetadata](https://github.com/pinterest/pinterest-python-generated-api-client/blob/main/docs/VideoMetadata.md) @@ -667,6 +1070,32 @@ Class | Method | HTTP request | Description - **Type**: HTTP basic authentication +## client_credentials + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: + - **ads:read**: See all of your advertising data, including ads, ad groups, campaigns etc. + - **ads:write**: Create, update, or delete ads, ad groups, campaigns etc. + - **billing:read**: See all of your billing data, billing profile, etc. + - **billing:write**: Create, update, or delete billing data, billing profiles, etc. + - **biz_access:read**: See business access data + - **biz_access:write**: Create, update, or delete business access data + - **boards:read**: See your public boards, including group boards you join + - **boards:read_secret**: See your secret boards + - **boards:write**: Create, update, or delete your public boards + - **boards:write_secret**: Create, update, or delete your secret boards + - **catalogs:read**: See all of your catalogs data + - **catalogs:write**: Create, update, or delete your catalogs data + - **pins:read**: See your public Pins + - **pins:read_secret**: See your secret Pins + - **pins:write**: Create, update, or delete your public Pins + - **pins:write_secret**: Create, update, or delete your secret Pins + - **user_accounts:read**: See your user accounts and followers + - **user_accounts:write**: Update your user accounts and followers + + ## conversion_token - **Type**: Bearer authentication @@ -680,6 +1109,10 @@ Class | Method | HTTP request | Description - **Scopes**: - **ads:read**: See all of your advertising data, including ads, ad groups, campaigns etc. - **ads:write**: Create, update, or delete ads, ad groups, campaigns etc. + - **billing:read**: See all of your billing data, billing profile, etc. + - **billing:write**: Create, update, or delete billing data, billing profiles, etc. + - **biz_access:read**: See business access data + - **biz_access:write**: Create, update, or delete business access data - **boards:read**: See your public boards, including group boards you join - **boards:read_secret**: See your secret boards - **boards:write**: Create, update, or delete your public boards diff --git a/docs/ActionType.md b/docs/ActionType.md index ad3605f..6ad065c 100644 --- a/docs/ActionType.md +++ b/docs/ActionType.md @@ -1,11 +1,11 @@ # ActionType -Ad group billable event type. +Ad group billable event type. For update, only draft ad groups may update billable event. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Ad group billable event type. | must be one of ["CLICKTHROUGH", "IMPRESSION", "VIDEO_V_50_MRC", ] +**value** | **str** | Ad group billable event type. For update, only draft ad groups may update billable event. | must be one of ["CLICKTHROUGH", "IMPRESSION", "VIDEO_V_50_MRC", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdAccount.md b/docs/AdAccount.md index 3d89bc9..bad085b 100644 --- a/docs/AdAccount.md +++ b/docs/AdAccount.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **owner** | [**AdAccountOwner**](AdAccountOwner.md) | | [optional] **country** | [**Country**](Country.md) | | [optional] **currency** | [**Currency**](Currency.md) | | [optional] -**permissions** | **[str, none_type]** | | [optional] +**permissions** | [**[BusinessAccessRole]**](BusinessAccessRole.md) | | [optional] **created_time** | **int, none_type** | Creation time. Unix timestamp in seconds. | [optional] **updated_time** | **int, none_type** | Last update time. Unix timestamp in seconds. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/AdAccountCreateSubscriptionRequest.md b/docs/AdAccountCreateSubscriptionRequest.md new file mode 100644 index 0000000..43e25f8 --- /dev/null +++ b/docs/AdAccountCreateSubscriptionRequest.md @@ -0,0 +1,16 @@ +# AdAccountCreateSubscriptionRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhook_url** | **str** | Standard HTTPS webhook URL. | +**lead_form_id** | **str** | Lead form ID. | [optional] +**partner_access_token** | **str** | Partner access token. Only for clients that requires authentication. We recommend to avoid this param. | [optional] +**partner_refresh_token** | **str** | Partner refresh token. Only for clients that requires authentication. We recommend to avoid this param. | [optional] +**partner_metadata** | [**AdAccountCreateSubscriptionRequestPartnerMetadata**](AdAccountCreateSubscriptionRequestPartnerMetadata.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdAccountCreateSubscriptionRequestPartnerMetadata.md b/docs/AdAccountCreateSubscriptionRequestPartnerMetadata.md new file mode 100644 index 0000000..117ca9a --- /dev/null +++ b/docs/AdAccountCreateSubscriptionRequestPartnerMetadata.md @@ -0,0 +1,13 @@ +# AdAccountCreateSubscriptionRequestPartnerMetadata + +Partner metadata. Only for clients that requires special handling. We recommend to avoid this param. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subscriber_key** | **str** | Text field value that uniquely identifies a subscriber. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdAccountCreateSubscriptionResponse.md b/docs/AdAccountCreateSubscriptionResponse.md new file mode 100644 index 0000000..3947842 --- /dev/null +++ b/docs/AdAccountCreateSubscriptionResponse.md @@ -0,0 +1,15 @@ +# AdAccountCreateSubscriptionResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Subscription ID. | [optional] +**cryptographic_key** | **str, none_type** | Base64 encoded key for client to decrypt lead data. | [optional] +**cryptographic_algorithm** | **str, none_type** | Lead data encryption algorithm. | [optional] +**created_time** | **int** | Subscription creation time. Unix timestamp in milliseconds. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdAccountGetSubscriptionResponse.md b/docs/AdAccountGetSubscriptionResponse.md new file mode 100644 index 0000000..fc5022b --- /dev/null +++ b/docs/AdAccountGetSubscriptionResponse.md @@ -0,0 +1,20 @@ +# AdAccountGetSubscriptionResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lead_form_id** | **str, none_type** | Lead form ID. | [optional] +**webhook_url** | **str** | Standard HTTPS webhook URL. | [optional] +**id** | **str** | Subscription ID. | [optional] +**user_account_id** | **str** | User account used to subscribe lead data. | [optional] +**ad_account_id** | **str** | The Ad Account ID that this lead form belongs to. | [optional] +**api_version** | **str** | API version. | [optional] +**cryptographic_key** | **str, none_type** | Base64 encoded key for client to decrypt lead data. | [optional] +**cryptographic_algorithm** | **str, none_type** | Lead data encryption algorithm. | [optional] +**created_time** | **int** | Lead form creation time. Unix timestamp in milliseconds. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdAccountGetSubscriptionResponseAllOf.md b/docs/AdAccountGetSubscriptionResponseAllOf.md new file mode 100644 index 0000000..cebb092 --- /dev/null +++ b/docs/AdAccountGetSubscriptionResponseAllOf.md @@ -0,0 +1,14 @@ +# AdAccountGetSubscriptionResponseAllOf + +Lead ads subscription response common fields. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lead_form_id** | **str, none_type** | Lead form ID. | [optional] +**webhook_url** | **str** | Standard HTTPS webhook URL. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdAccountGetSubscriptionResponseAllOf1.md b/docs/AdAccountGetSubscriptionResponseAllOf1.md new file mode 100644 index 0000000..9bd9508 --- /dev/null +++ b/docs/AdAccountGetSubscriptionResponseAllOf1.md @@ -0,0 +1,18 @@ +# AdAccountGetSubscriptionResponseAllOf1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Subscription ID. | [optional] +**user_account_id** | **str** | User account used to subscribe lead data. | [optional] +**ad_account_id** | **str** | The Ad Account ID that this lead form belongs to. | [optional] +**api_version** | **str** | API version. | [optional] +**cryptographic_key** | **str, none_type** | Base64 encoded key for client to decrypt lead data. | [optional] +**cryptographic_algorithm** | **str, none_type** | Lead data encryption algorithm. | [optional] +**created_time** | **int** | Lead form creation time. Unix timestamp in milliseconds. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdAccountsApi.md b/docs/AdAccountsApi.md index 10b81e4..539a8ec 100644 --- a/docs/AdAccountsApi.md +++ b/docs/AdAccountsApi.md @@ -9,8 +9,10 @@ Method | HTTP request | Description [**ad_accounts_create**](AdAccountsApi.md#ad_accounts_create) | **POST** /ad_accounts | Create ad account [**ad_accounts_get**](AdAccountsApi.md#ad_accounts_get) | **GET** /ad_accounts/{ad_account_id} | Get ad account [**ad_accounts_list**](AdAccountsApi.md#ad_accounts_list) | **GET** /ad_accounts | List ad accounts +[**analytics_create_mmm_report**](AdAccountsApi.md#analytics_create_mmm_report) | **POST** /ad_accounts/{ad_account_id}/mmm_reports | Create a request for a Marketing Mix Modeling (MMM) report [**analytics_create_report**](AdAccountsApi.md#analytics_create_report) | **POST** /ad_accounts/{ad_account_id}/reports | Create async request for an account analytics report [**analytics_create_template_report**](AdAccountsApi.md#analytics_create_template_report) | **POST** /ad_accounts/{ad_account_id}/templates/{template_id}/reports | Create async request for an analytics report using a template +[**analytics_get_mmm_report**](AdAccountsApi.md#analytics_get_mmm_report) | **GET** /ad_accounts/{ad_account_id}/mmm_reports | Get advertiser Marketing Mix Modeling (MMM) report. [**analytics_get_report**](AdAccountsApi.md#analytics_get_report) | **GET** /ad_accounts/{ad_account_id}/reports | Get the account analytics report created by the async call [**sandbox_delete**](AdAccountsApi.md#sandbox_delete) | **DELETE** /ad_accounts/{ad_account_id}/sandbox | Delete ads data for ad account in API Sandbox [**templates_list**](AdAccountsApi.md#templates_list) | **GET** /ad_accounts/{ad_account_id}/templates | List templates @@ -172,7 +174,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: end_date = dateutil_parser('1970-01-01').date() # date | Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. targeting_types = [ AdsAnalyticsTargetingType("APPTYPE"), - ] # [AdsAnalyticsTargetingType] | Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. + ] # [AdsAnalyticsTargetingType] | Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. columns = [ "TOTAL_CONVERSIONS", ] # [str] | Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.
For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned @@ -209,7 +211,7 @@ Name | Type | Description | Notes **ad_account_id** | **str**| Unique identifier of an ad account. | **start_date** | **date**| Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. | **end_date** | **date**| Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. | - **targeting_types** | [**[AdsAnalyticsTargetingType]**](AdsAnalyticsTargetingType.md)| Targeting type breakdowns for the report. The reporting per targeting type <br> is independent from each other. | + **targeting_types** | [**[AdsAnalyticsTargetingType]**](AdsAnalyticsTargetingType.md)| Targeting type breakdowns for the report. The reporting per targeting type <br> is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. | **columns** | **[str]**| Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned | **granularity** | **Granularity**| TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly | **click_window_days** | **int**| Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional] if omitted the server will use the default value of 30 @@ -423,6 +425,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import ad_accounts_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.ad_account import AdAccount from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -446,7 +449,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ad_accounts_api.AdAccountsApi(api_client) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 include_shared_accounts = True # bool | Include shared ad accounts (optional) if omitted the server will use the default value of True # example passing only required values which don't have defaults set @@ -465,7 +468,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **include_shared_accounts** | **bool**| Include shared ad accounts | [optional] if omitted the server will use the default value of True ### Return type @@ -491,12 +494,108 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **analytics_create_mmm_report** +> CreateMMMReportResponse analytics_create_mmm_report(ad_account_id, create_mmm_report_request) + +Create a request for a Marketing Mix Modeling (MMM) report + +This creates an asynchronous mmm report based on the given request. It returns a token that you can use to download the report when it is ready. NOTE: An additional limit of 5 queries per minute per advertiser applies to this endpoint while it's in beta release. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import ad_accounts_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.create_mmm_report_response import CreateMMMReportResponse +from openapi_generated.pinterest_client.model.create_mmm_report_request import CreateMMMReportRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = ad_accounts_api.AdAccountsApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + create_mmm_report_request = CreateMMMReportRequest( + report_name="report_name_example", + start_date="2020-12-20", + end_date="2020-12-20", + granularity="DAY", + level="CAMPAIGN_TARGETING", + targeting_types=[ + MMMReportingTargetingType("["GENDER"]"), + ], + columns=[ + MMMReportingColumn("SPEND_IN_DOLLAR"), + ], + ) # CreateMMMReportRequest | + + # example passing only required values which don't have defaults set + try: + # Create a request for a Marketing Mix Modeling (MMM) report + api_response = api_instance.analytics_create_mmm_report(ad_account_id, create_mmm_report_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AdAccountsApi->analytics_create_mmm_report: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **create_mmm_report_request** | [**CreateMMMReportRequest**](CreateMMMReportRequest.md)| | + +### Return type + +[**CreateMMMReportResponse**](CreateMMMReportResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account ads analytics mmm parameters | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **analytics_create_report** > AdsAnalyticsCreateAsyncResponse analytics_create_report(ad_account_id, ads_analytics_create_async_request) Create async request for an account analytics report -This returns a token that you can use to download the report when it is ready. Note that this endpoint requires the parameters to be passed as JSON-formatted in the request body. This endpoint does not support URL query parameters. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. - If granularity is not HOUR, the furthest back you can are allowed to pull data is 914 days before the current date in UTC time and the max time range supported is 186 days. - If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days. - If level is PRODUCT_ITEM, the furthest back you can are allowed to pull data is 92 days before the current date in UTC time and the max time range supported is 31 days. +This returns a token that you can use to download the report when it is ready. Note that this endpoint requires the parameters to be passed as JSON-formatted in the request body. This endpoint does not support URL query parameters. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. - If granularity is not HOUR, the furthest back you can are allowed to pull data is 914 days before the current date in UTC time and the max time range supported is 186 days. - If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days. - If level is PRODUCT_ITEM, the furthest back you can are allowed to pull data is 92 days before the current date in UTC time and the max time range supported is 31 days. - If level is PRODUCT_ITEM, ad_ids and ad_statuses parameters are not allowed. Any columns related to pin promotion and ad is not allowed either. ### Example @@ -674,12 +773,95 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **analytics_get_mmm_report** +> GetMMMReportResponse analytics_get_mmm_report(ad_account_id, token) + +Get advertiser Marketing Mix Modeling (MMM) report. + +Get an mmm report for an ad account. This returns a URL to an mmm metrics report given a token returned from the create mmm report endpoint. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import ad_accounts_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.get_mmm_report_response import GetMMMReportResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = ad_accounts_api.AdAccountsApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + token = "token_example" # str | Token returned from the post request creation call + + # example passing only required values which don't have defaults set + try: + # Get advertiser Marketing Mix Modeling (MMM) report. + api_response = api_instance.analytics_get_mmm_report(ad_account_id, token) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AdAccountsApi->analytics_get_mmm_report: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **token** | **str**| Token returned from the post request creation call | + +### Return type + +[**GetMMMReportResponse**](GetMMMReportResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account ads analytics parameters. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **analytics_get_report** > AdsAnalyticsGetAsyncResponse analytics_get_report(ad_account_id, token) Get the account analytics report created by the async call -This returns a URL to an analytics report given a token returned from the post request report creation call. You can use the URL to download the report and it's valid for an hour. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. +This returns a URL to an analytics report given a token returned from the post request report creation call. You can use the URL to download the report. The link is valid for five minutes and the report is valid for one hour. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. ### Example @@ -762,7 +944,7 @@ Name | Type | Description | Notes Delete ads data for ad account in API Sandbox -Delete an ad account and all the ads data associated with that account. A string message is returned indicating the status of the delete operation. Note: This endpoint is only allowed in the Pinterest API Sandbox (https://api-sandbox.pinterest.com/v5). Go to https://developers.pinterest.com/docs/dev-tools/sandbox/ for more information. +Delete an ad account and all the ads data associated with that account. A string message is returned indicating the status of the delete operation. Note: This endpoint is only allowed in the Pinterest API Sandbox (https://api-sandbox.pinterest.com/v5). Go to /docs/developer-tools/sandbox/ for more information. ### Example @@ -854,6 +1036,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import ad_accounts_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.template_response import TemplateResponse from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -877,7 +1060,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = ad_accounts_api.AdAccountsApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) @@ -905,7 +1088,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ad_account_id** | **str**| Unique identifier of an ad account. | - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] diff --git a/docs/AdAccountsCountryResponseData.md b/docs/AdAccountsCountryResponseData.md index 863f927..49c8a40 100644 --- a/docs/AdAccountsCountryResponseData.md +++ b/docs/AdAccountsCountryResponseData.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | [**Country**](Country.md) | | [optional] +**code** | [**AdCountry**](AdCountry.md) | | [optional] **currency** | **str** | Country currency. | [optional] **index** | **float** | Country index | [optional] **name** | **str** | Country name | [optional] diff --git a/docs/AdCommon.md b/docs/AdCommon.md index 32c9f2f..dc7a0b1 100644 --- a/docs/AdCommon.md +++ b/docs/AdCommon.md @@ -6,20 +6,24 @@ Creation fields Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ad_group_id** | **str** | ID of the ad group that contains the ad. | [optional] -**android_deep_link** | **str, none_type** | Deep link URL for Android devices. Not currently available. Using this field will generate an error. | [optional] +**android_deep_link** | **str, none_type** | Deep link URL for Android devices. | [optional] **carousel_android_deep_links** | **[str], none_type** | Comma-separated deep links for the carousel pin on Android. | [optional] **carousel_destination_urls** | **[str], none_type** | Comma-separated destination URLs for the carousel pin to promote. | [optional] **carousel_ios_deep_links** | **[str], none_type** | Comma-separated deep links for the carousel pin on iOS. | [optional] **click_tracking_url** | **str, none_type** | Tracking url for the ad clicks. | [optional] **creative_type** | [**CreativeType**](CreativeType.md) | | [optional] **destination_url** | **str, none_type** | Destination URL. | [optional] -**ios_deep_link** | **str, none_type** | Deep link URL for iOS devices. Not currently available. Using this field will generate an error. | [optional] +**ios_deep_link** | **str, none_type** | Deep link URL for iOS devices. | [optional] **is_pin_deleted** | **bool** | Is original pin deleted? | [optional] **is_removable** | **bool** | Is pin repinnable? | [optional] **name** | **str, none_type** | Name of the ad - 255 chars max. | [optional] **status** | [**EntityStatus**](EntityStatus.md) | | [optional] **tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **view_tracking_url** | **str, none_type** | Tracking URL for ad impressions. | [optional] +**lead_form_id** | **str, none_type** | Lead form ID for lead ad generation. | [optional] +**grid_click_type** | [**GridClickType**](GridClickType.md) | | [optional] +**customizable_cta_type** | **str, none_type** | Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only) | [optional] +**quiz_pin_data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdCountry.md b/docs/AdCountry.md new file mode 100644 index 0000000..01f9549 --- /dev/null +++ b/docs/AdCountry.md @@ -0,0 +1,12 @@ +# AdCountry + +Country ID from ISO 3166-1 alpha-2. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Country ID from ISO 3166-1 alpha-2. | must be one of ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdCreateRequest.md b/docs/AdCreateRequest.md index e10fdfa..d1e9294 100644 --- a/docs/AdCreateRequest.md +++ b/docs/AdCreateRequest.md @@ -7,19 +7,23 @@ Name | Type | Description | Notes **ad_group_id** | **str** | ID of the ad group that contains the ad. | **creative_type** | [**CreativeType**](CreativeType.md) | | **pin_id** | **str** | Pin ID. | -**android_deep_link** | **str, none_type** | Deep link URL for Android devices. Not currently available. Using this field will generate an error. | [optional] +**android_deep_link** | **str, none_type** | Deep link URL for Android devices. | [optional] **carousel_android_deep_links** | **[str], none_type** | Comma-separated deep links for the carousel pin on Android. | [optional] **carousel_destination_urls** | **[str], none_type** | Comma-separated destination URLs for the carousel pin to promote. | [optional] **carousel_ios_deep_links** | **[str], none_type** | Comma-separated deep links for the carousel pin on iOS. | [optional] **click_tracking_url** | **str, none_type** | Tracking url for the ad clicks. | [optional] **destination_url** | **str, none_type** | Destination URL. | [optional] -**ios_deep_link** | **str, none_type** | Deep link URL for iOS devices. Not currently available. Using this field will generate an error. | [optional] +**ios_deep_link** | **str, none_type** | Deep link URL for iOS devices. | [optional] **is_pin_deleted** | **bool** | Is original pin deleted? | [optional] **is_removable** | **bool** | Is pin repinnable? | [optional] **name** | **str, none_type** | Name of the ad - 255 chars max. | [optional] **status** | [**EntityStatus**](EntityStatus.md) | | [optional] **tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **view_tracking_url** | **str, none_type** | Tracking URL for ad impressions. | [optional] +**lead_form_id** | **str, none_type** | Lead form ID for lead ad generation. | [optional] +**grid_click_type** | [**GridClickType**](GridClickType.md) | | [optional] +**customizable_cta_type** | **str, none_type** | Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only) | [optional] +**quiz_pin_data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdGroupAudienceSizingRequest.md b/docs/AdGroupAudienceSizingRequest.md new file mode 100644 index 0000000..61c2b0f --- /dev/null +++ b/docs/AdGroupAudienceSizingRequest.md @@ -0,0 +1,17 @@ +# AdGroupAudienceSizingRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auto_targeting_enabled** | **bool** | Enable auto-targeting for ad group. Also known as <a href=\"https://help.pinterest.com/en/business/article/expanded-targeting\" target=\"_blank\">\"expanded targeting\"</a>. | [optional] if omitted the server will use the default value of True +**placement_group** | **str** | <a href=\"/docs/redoc/#section/Placement-group\">Placement group</a>. | [optional] if omitted the server will use the default value of "ALL" +**creative_types** | **[str], none_type** | Pin creative types filter. </p><strong>Note:</strong> SHOP_THE_PIN has been deprecated. Please use COLLECTION instead. | [optional] +**targeting_spec** | [**TargetingSpec**](TargetingSpec.md) | | [optional] +**product_group_ids** | **[str], none_type** | Targeted product group IDs. </p><strong>Note:</strong> This can only be combined with shopping/catalog sales campaigns. For more information, <a href=\"https://help.pinterest.com/en/business/article/shopping-ads#section-14571\" target=\"_blank\">click here</a>. SHOPPING_RETARGETING must be included in targeting_spec object or this field will be ignored. | [optional] +**keywords** | [**[AdGroupAudienceSizingRequestKeywords], none_type**](AdGroupAudienceSizingRequestKeywords.md) | Array of keyword objects. If the keywords field is missing, all keywords will be targeted. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdGroupAudienceSizingRequestKeywords.md b/docs/AdGroupAudienceSizingRequestKeywords.md new file mode 100644 index 0000000..38425eb --- /dev/null +++ b/docs/AdGroupAudienceSizingRequestKeywords.md @@ -0,0 +1,13 @@ +# AdGroupAudienceSizingRequestKeywords + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**match_type** | [**MatchTypeResponse**](MatchTypeResponse.md) | | +**value** | **str** | Keyword value (120 chars max). | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdGroupAudienceSizingResponse.md b/docs/AdGroupAudienceSizingResponse.md new file mode 100644 index 0000000..819d2a6 --- /dev/null +++ b/docs/AdGroupAudienceSizingResponse.md @@ -0,0 +1,13 @@ +# AdGroupAudienceSizingResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audience_size_lower_bound** | **float** | The lower confidence bound of the estimated potential audience size. \"Potential audience size\" estimates the number of people you may be able to reach per month with your campaign. It is based on historical advertising data and the targeting criteria you select. It does not guarantee results or take into account factors such as bid, budget, schedule, seasonality or product experiments. | [optional] +**audience_size_upper_bound** | **float** | The upper confidence bound of the estimated potential audience size. \"Potential audience size\" estimates the number of people you may be able to reach per month with your campaign. It is based on historical advertising data and the targeting criteria you select. It does not guarantee results or take into account factors such as bid, budget, schedule, seasonality or product experiments. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdGroupCommon.md b/docs/AdGroupCommon.md index 477fdf9..505d0a9 100644 --- a/docs/AdGroupCommon.md +++ b/docs/AdGroupCommon.md @@ -13,14 +13,15 @@ Name | Type | Description | Notes **start_time** | **int, none_type** | Ad group start time. Unix timestamp in seconds. Defaults to current time. | [optional] **end_time** | **int, none_type** | Ad group end time. Unix timestamp in seconds. | [optional] **targeting_spec** | [**TargetingSpec**](TargetingSpec.md) | | [optional] -**lifetime_frequency_cap** | **int** | Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION <a href=\"https://developers.pinterest.com/docs/redoc/#section/Billable-event\">billable_event</a> value. This field **REQUIRES** the `end_time` field. | [optional] -**tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Third-party tracking URLs.<br> JSON object with the format: {\"<a href=\"https://developers.pinterest.com/docs/redoc/#section/Tracking-URL-event\">Tracking event enum</a>\":[URL string array],...}<br> For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.<br>Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.<br><br> For more information, see <a href=\"https://help.pinterest.com/en/business/article/third-party-and-dynamic-tracking\" target=\"_blank\">Third-party and dynamic tracking</a>. | [optional] +**lifetime_frequency_cap** | **int** | Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION <a href=\"/docs/redoc/#section/Billable-event\">billable_event</a> value. This field **REQUIRES** the `end_time` field. | [optional] +**tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Third-party tracking URLs.<br> JSON object with the format: {\"<a href=\"/docs/redoc/#section/Tracking-URL-event\">Tracking event enum</a>\":[URL string array],...}<br> For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.<br>Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.<br><br> For more information, see <a href=\"https://help.pinterest.com/en/business/article/third-party-and-dynamic-tracking\" target=\"_blank\">Third-party and dynamic tracking</a>. | [optional] **auto_targeting_enabled** | **bool, none_type** | Enable auto-targeting for ad group. Also known as <a href=\"https://help.pinterest.com/en/business/article/expanded-targeting\" target=\"_blank\">\"expanded targeting\"</a>. | [optional] -**placement_group** | **str** | <a href=\"https://developers.pinterest.com/docs/redoc/#section/Placement-group\">Placement group</a>. | [optional] +**placement_group** | **str** | <a href=\"/docs/redoc/#section/Placement-group\">Placement group</a>. | [optional] **pacing_delivery_type** | **str** | | [optional] **campaign_id** | **str** | Campaign ID of the ad group. | [optional] **billable_event** | [**ActionType**](ActionType.md) | | [optional] -**bid_strategy_type** | **str, none_type** | Bid strategy type | [optional] +**bid_strategy_type** | **str, none_type** | Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID. | [optional] +**targeting_template_ids** | **[str], none_type** | Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0']. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdGroupCreateRequest.md b/docs/AdGroupCreateRequest.md index ea4f453..bc92ed4 100644 --- a/docs/AdGroupCreateRequest.md +++ b/docs/AdGroupCreateRequest.md @@ -15,12 +15,13 @@ Name | Type | Description | Notes **start_time** | **int, none_type** | Ad group start time. Unix timestamp in seconds. Defaults to current time. | [optional] **end_time** | **int, none_type** | Ad group end time. Unix timestamp in seconds. | [optional] **targeting_spec** | [**TargetingSpec**](TargetingSpec.md) | | [optional] -**lifetime_frequency_cap** | **int** | Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION <a href=\"https://developers.pinterest.com/docs/redoc/#section/Billable-event\">billable_event</a> value. This field **REQUIRES** the `end_time` field. | [optional] -**tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Third-party tracking URLs.<br> JSON object with the format: {\"<a href=\"https://developers.pinterest.com/docs/redoc/#section/Tracking-URL-event\">Tracking event enum</a>\":[URL string array],...}<br> For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.<br>Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.<br><br> For more information, see <a href=\"https://help.pinterest.com/en/business/article/third-party-and-dynamic-tracking\" target=\"_blank\">Third-party and dynamic tracking</a>. | [optional] -**auto_targeting_enabled** | **bool** | | [optional] if omitted the server will use the default value of True -**placement_group** | **str** | <a href=\"https://developers.pinterest.com/docs/redoc/#section/Placement-group\">Placement group</a>. | [optional] +**lifetime_frequency_cap** | **int** | Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION <a href=\"/docs/redoc/#section/Billable-event\">billable_event</a> value. This field **REQUIRES** the `end_time` field. | [optional] +**tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Third-party tracking URLs.<br> JSON object with the format: {\"<a href=\"/docs/redoc/#section/Tracking-URL-event\">Tracking event enum</a>\":[URL string array],...}<br> For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.<br>Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.<br><br> For more information, see <a href=\"https://help.pinterest.com/en/business/article/third-party-and-dynamic-tracking\" target=\"_blank\">Third-party and dynamic tracking</a>. | [optional] +**auto_targeting_enabled** | **bool** | | [optional] +**placement_group** | **str** | <a href=\"/docs/redoc/#section/Placement-group\">Placement group</a>. | [optional] **pacing_delivery_type** | **str** | | [optional] if omitted the server will use the default value of "STANDARD" -**bid_strategy_type** | **str, none_type** | Bid strategy type | [optional] +**bid_strategy_type** | **str, none_type** | Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID. | [optional] +**targeting_template_ids** | **[str], none_type** | Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0']. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdGroupCreateRequestAllOf.md b/docs/AdGroupCreateRequestAllOf.md index 976c22e..182f723 100644 --- a/docs/AdGroupCreateRequestAllOf.md +++ b/docs/AdGroupCreateRequestAllOf.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pacing_delivery_type** | **str** | | [optional] if omitted the server will use the default value of "STANDARD" -**auto_targeting_enabled** | **bool** | | [optional] if omitted the server will use the default value of True +**auto_targeting_enabled** | **bool** | | [optional] **budget_type** | **str** | | [optional] if omitted the server will use the default value of "DAILY" **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/AdGroupResponse.md b/docs/AdGroupResponse.md index 93ac91a..dac8650 100644 --- a/docs/AdGroupResponse.md +++ b/docs/AdGroupResponse.md @@ -13,14 +13,15 @@ Name | Type | Description | Notes **start_time** | **int, none_type** | Ad group start time. Unix timestamp in seconds. Defaults to current time. | [optional] **end_time** | **int, none_type** | Ad group end time. Unix timestamp in seconds. | [optional] **targeting_spec** | [**TargetingSpec**](TargetingSpec.md) | | [optional] -**lifetime_frequency_cap** | **int** | Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION <a href=\"https://developers.pinterest.com/docs/redoc/#section/Billable-event\">billable_event</a> value. This field **REQUIRES** the `end_time` field. | [optional] -**tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Third-party tracking URLs.<br> JSON object with the format: {\"<a href=\"https://developers.pinterest.com/docs/redoc/#section/Tracking-URL-event\">Tracking event enum</a>\":[URL string array],...}<br> For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.<br>Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.<br><br> For more information, see <a href=\"https://help.pinterest.com/en/business/article/third-party-and-dynamic-tracking\" target=\"_blank\">Third-party and dynamic tracking</a>. | [optional] +**lifetime_frequency_cap** | **int** | Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION <a href=\"/docs/redoc/#section/Billable-event\">billable_event</a> value. This field **REQUIRES** the `end_time` field. | [optional] +**tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Third-party tracking URLs.<br> JSON object with the format: {\"<a href=\"/docs/redoc/#section/Tracking-URL-event\">Tracking event enum</a>\":[URL string array],...}<br> For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.<br>Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.<br><br> For more information, see <a href=\"https://help.pinterest.com/en/business/article/third-party-and-dynamic-tracking\" target=\"_blank\">Third-party and dynamic tracking</a>. | [optional] **auto_targeting_enabled** | **bool, none_type** | Enable auto-targeting for ad group. Also known as <a href=\"https://help.pinterest.com/en/business/article/expanded-targeting\" target=\"_blank\">\"expanded targeting\"</a>. | [optional] -**placement_group** | **str** | <a href=\"https://developers.pinterest.com/docs/redoc/#section/Placement-group\">Placement group</a>. | [optional] +**placement_group** | **str** | <a href=\"/docs/redoc/#section/Placement-group\">Placement group</a>. | [optional] **pacing_delivery_type** | **str** | | [optional] **campaign_id** | **str** | Campaign ID of the ad group. | [optional] **billable_event** | [**ActionType**](ActionType.md) | | [optional] -**bid_strategy_type** | **str, none_type** | Bid strategy type | [optional] +**bid_strategy_type** | **str, none_type** | Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID. | [optional] +**targeting_template_ids** | **[str], none_type** | Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0']. | [optional] **id** | **str** | Ad group ID. | [optional] **ad_account_id** | **str** | Advertiser ID. | [optional] **created_time** | **int** | Ad group creation time. Unix timestamp in seconds. | [optional] diff --git a/docs/AdGroupSummaryStatus.md b/docs/AdGroupSummaryStatus.md index d800c56..584ddee 100644 --- a/docs/AdGroupSummaryStatus.md +++ b/docs/AdGroupSummaryStatus.md @@ -5,7 +5,7 @@ Summary status for ad group ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Summary status for ad group | must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", ] +**value** | **str** | Summary status for ad group | must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdGroupUpdateRequest.md b/docs/AdGroupUpdateRequest.md index f82f56a..7c2850a 100644 --- a/docs/AdGroupUpdateRequest.md +++ b/docs/AdGroupUpdateRequest.md @@ -14,14 +14,15 @@ Name | Type | Description | Notes **start_time** | **int, none_type** | Ad group start time. Unix timestamp in seconds. Defaults to current time. | [optional] **end_time** | **int, none_type** | Ad group end time. Unix timestamp in seconds. | [optional] **targeting_spec** | [**TargetingSpec**](TargetingSpec.md) | | [optional] -**lifetime_frequency_cap** | **int** | Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION <a href=\"https://developers.pinterest.com/docs/redoc/#section/Billable-event\">billable_event</a> value. This field **REQUIRES** the `end_time` field. | [optional] -**tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Third-party tracking URLs.<br> JSON object with the format: {\"<a href=\"https://developers.pinterest.com/docs/redoc/#section/Tracking-URL-event\">Tracking event enum</a>\":[URL string array],...}<br> For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.<br>Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.<br><br> For more information, see <a href=\"https://help.pinterest.com/en/business/article/third-party-and-dynamic-tracking\" target=\"_blank\">Third-party and dynamic tracking</a>. | [optional] +**lifetime_frequency_cap** | **int** | Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION <a href=\"/docs/redoc/#section/Billable-event\">billable_event</a> value. This field **REQUIRES** the `end_time` field. | [optional] +**tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Third-party tracking URLs.<br> JSON object with the format: {\"<a href=\"/docs/redoc/#section/Tracking-URL-event\">Tracking event enum</a>\":[URL string array],...}<br> For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.<br>Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.<br><br> For more information, see <a href=\"https://help.pinterest.com/en/business/article/third-party-and-dynamic-tracking\" target=\"_blank\">Third-party and dynamic tracking</a>. | [optional] **auto_targeting_enabled** | **bool, none_type** | Enable auto-targeting for ad group. Also known as <a href=\"https://help.pinterest.com/en/business/article/expanded-targeting\" target=\"_blank\">\"expanded targeting\"</a>. | [optional] -**placement_group** | **str** | <a href=\"https://developers.pinterest.com/docs/redoc/#section/Placement-group\">Placement group</a>. | [optional] +**placement_group** | **str** | <a href=\"/docs/redoc/#section/Placement-group\">Placement group</a>. | [optional] **pacing_delivery_type** | **str** | | [optional] **campaign_id** | **str** | Campaign ID of the ad group. | [optional] **billable_event** | [**ActionType**](ActionType.md) | | [optional] -**bid_strategy_type** | **str, none_type** | Bid strategy type | [optional] +**bid_strategy_type** | **str, none_type** | Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID. | [optional] +**targeting_template_ids** | **[str], none_type** | Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0']. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdGroupsApi.md b/docs/AdGroupsApi.md index 70efebf..ca0c730 100644 --- a/docs/AdGroupsApi.md +++ b/docs/AdGroupsApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.pinterest.com/v5* Method | HTTP request | Description ------------- | ------------- | ------------- [**ad_groups_analytics**](AdGroupsApi.md#ad_groups_analytics) | **GET** /ad_accounts/{ad_account_id}/ad_groups/analytics | Get ad group analytics +[**ad_groups_audience_sizing**](AdGroupsApi.md#ad_groups_audience_sizing) | **POST** /ad_accounts/{ad_account_id}/ad_groups/audience_sizing | Get audience sizing [**ad_groups_bid_floor_get**](AdGroupsApi.md#ad_groups_bid_floor_get) | **POST** /ad_accounts/{ad_account_id}/bid_floor | Get bid floors [**ad_groups_create**](AdGroupsApi.md#ad_groups_create) | **POST** /ad_accounts/{ad_account_id}/ad_groups | Create ad groups [**ad_groups_get**](AdGroupsApi.md#ad_groups_get) | **GET** /ad_accounts/{ad_account_id}/ad_groups/{ad_group_id} | Get ad group @@ -126,6 +127,150 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **ad_groups_audience_sizing** +> AdGroupAudienceSizingResponse ad_groups_audience_sizing(ad_account_id) + +Get audience sizing + +Get potential audience size for an ad group with given targeting criteria. Potential audience size estimates the number of people you may be able to reach per month with your campaign. It is based on historical advertising data and the targeting criteria you select. It does not guarantee results or take into account factors such as bid, budget, schedule, seasonality or product experiments. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import ad_groups_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.ad_group_audience_sizing_request import AdGroupAudienceSizingRequest +from openapi_generated.pinterest_client.model.ad_group_audience_sizing_response import AdGroupAudienceSizingResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = ad_groups_api.AdGroupsApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + ad_group_audience_sizing_request = AdGroupAudienceSizingRequest( + auto_targeting_enabled=True, + placement_group="placement_group_example", + creative_types=[ + "REGULAR", + ], + targeting_spec=TargetingSpec( + age_bucket=["35-44","50-54"], + apptype=["ipad","iphone"], + audience_exclude=[ + "4", + ], + audience_include=[ + "4", + ], + gender=[ + "unknown", + ], + geo=[ + "geo_example", + ], + interest=[ + "interest_example", + ], + locale=[ + "locale_example", + ], + location=[ + "location_example", + ], + shopping_retargeting=[ + TargetingSpecSHOPPINGRETARGETING( + lookback_window=30, + tag_types=[0,6], + exclusion_window=14, + ), + ], + targeting_strategy=[ + "CHOOSE_YOUR_OWN", + ], + ), + product_group_ids=[ + "23423422123", + ], + keywords=[ + AdGroupAudienceSizingRequestKeywords( + match_type=MatchTypeResponse("BROAD"), + value="value_example", + ), + ], + ) # AdGroupAudienceSizingRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Get audience sizing + api_response = api_instance.ad_groups_audience_sizing(ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AdGroupsApi->ad_groups_audience_sizing: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get audience sizing + api_response = api_instance.ad_groups_audience_sizing(ad_account_id, ad_group_audience_sizing_request=ad_group_audience_sizing_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AdGroupsApi->ad_groups_audience_sizing: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **ad_group_audience_sizing_request** | [**AdGroupAudienceSizingRequest**](AdGroupAudienceSizingRequest.md)| | [optional] + +### Return type + +[**AdGroupAudienceSizingResponse**](AdGroupAudienceSizingResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad group audience sizing parameters. | - | +**403** | No access to requested audience list or product group. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **ad_groups_bid_floor_get** > BidFloor ad_groups_bid_floor_get(ad_account_id, bid_floor_request) @@ -319,7 +464,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: api_instance = ad_groups_api.AdGroupsApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. ad_group_create_request = [ - AdGroupCreateRequest(None), + AdGroupCreateRequest(), ] # [AdGroupCreateRequest] | List of ad groups to create, size limit [1, 30]. # example passing only required values which don't have defaults set @@ -461,6 +606,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import ad_groups_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.ad_group_response import AdGroupResponse from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -491,7 +637,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: "4", ] # [str] | List of Ad group Ids to use to filter the results. (optional) entity_statuses = ["ACTIVE","PAUSED"] # [str] | Entity status (optional) if omitted the server will use the default value of ["ACTIVE","PAUSED"] - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) translate_interests_to_names = False # bool | Return interests as text names (if value is true) rather than topic IDs. (optional) if omitted the server will use the default value of False @@ -523,7 +669,7 @@ Name | Type | Description | Notes **campaign_ids** | **[str]**| List of Campaign Ids to use to filter the results. | [optional] **ad_group_ids** | **[str]**| List of Ad group Ids to use to filter the results. | [optional] **entity_statuses** | **[str]**| Entity status | [optional] if omitted the server will use the default value of ["ACTIVE","PAUSED"] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] **translate_interests_to_names** | **bool**| Return interests as text names (if value is true) rather than topic IDs. | [optional] if omitted the server will use the default value of False @@ -602,7 +748,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: end_date = dateutil_parser('1970-01-01').date() # date | Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. targeting_types = [ AdsAnalyticsTargetingType("APPTYPE"), - ] # [AdsAnalyticsTargetingType] | Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. + ] # [AdsAnalyticsTargetingType] | Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. columns = [ "TOTAL_CONVERSIONS", ] # [str] | Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.
For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned @@ -640,7 +786,7 @@ Name | Type | Description | Notes **ad_group_ids** | **[str]**| List of Ad group Ids to use to filter the results. | **start_date** | **date**| Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. | **end_date** | **date**| Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. | - **targeting_types** | [**[AdsAnalyticsTargetingType]**](AdsAnalyticsTargetingType.md)| Targeting type breakdowns for the report. The reporting per targeting type <br> is independent from each other. | + **targeting_types** | [**[AdsAnalyticsTargetingType]**](AdsAnalyticsTargetingType.md)| Targeting type breakdowns for the report. The reporting per targeting type <br> is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. | **columns** | **[str]**| Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned | **granularity** | **Granularity**| TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly | **click_window_days** | **int**| Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional] if omitted the server will use the default value of 30 @@ -714,7 +860,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: api_instance = ad_groups_api.AdGroupsApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. ad_group_update_request = [ - AdGroupUpdateRequest(None), + AdGroupUpdateRequest(), ] # [AdGroupUpdateRequest] | List of ad groups to update, size limit [1, 30]. # example passing only required values which don't have defaults set diff --git a/docs/AdPreviewURLResponse.md b/docs/AdPreviewURLResponse.md index 0a8f4b3..71f83ec 100644 --- a/docs/AdPreviewURLResponse.md +++ b/docs/AdPreviewURLResponse.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **str** | 'Preview URL, expires in 24 hours. Can be used in an iframe. For example: https://ads.pinterest.com/ad-preview/74667c814dd2b19/ The preview object ID/key is the last param - 74667c814dd2b19' | [optional] +**url** | **str** | 'Preview URL, expires in 7 days. Can be used in an iframe. For example: https://ads.pinterest.com/ad-preview/74667c814dd2b19/ The preview object ID/key is the last param - 74667c814dd2b19' | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdResponse.md b/docs/AdResponse.md index e9b5585..5f4de11 100644 --- a/docs/AdResponse.md +++ b/docs/AdResponse.md @@ -5,20 +5,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ad_group_id** | **str** | ID of the ad group that contains the ad. | [optional] -**android_deep_link** | **str, none_type** | Deep link URL for Android devices. Not currently available. Using this field will generate an error. | [optional] +**android_deep_link** | **str, none_type** | Deep link URL for Android devices. | [optional] **carousel_android_deep_links** | **[str], none_type** | Comma-separated deep links for the carousel pin on Android. | [optional] **carousel_destination_urls** | **[str], none_type** | Comma-separated destination URLs for the carousel pin to promote. | [optional] **carousel_ios_deep_links** | **[str], none_type** | Comma-separated deep links for the carousel pin on iOS. | [optional] **click_tracking_url** | **str, none_type** | Tracking url for the ad clicks. | [optional] **creative_type** | [**CreativeType**](CreativeType.md) | | [optional] **destination_url** | **str, none_type** | Destination URL. | [optional] -**ios_deep_link** | **str, none_type** | Deep link URL for iOS devices. Not currently available. Using this field will generate an error. | [optional] +**ios_deep_link** | **str, none_type** | Deep link URL for iOS devices. | [optional] **is_pin_deleted** | **bool** | Is original pin deleted? | [optional] **is_removable** | **bool** | Is pin repinnable? | [optional] **name** | **str, none_type** | Name of the ad - 255 chars max. | [optional] **status** | [**EntityStatus**](EntityStatus.md) | | [optional] **tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **view_tracking_url** | **str, none_type** | Tracking URL for ad impressions. | [optional] +**lead_form_id** | **str, none_type** | Lead form ID for lead ad generation. | [optional] +**grid_click_type** | [**GridClickType**](GridClickType.md) | | [optional] +**customizable_cta_type** | **str, none_type** | Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only) | [optional] +**quiz_pin_data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved. | [optional] **pin_id** | **str** | Pin ID. | [optional] **ad_account_id** | **str** | The ID of the advertiser that this ad belongs to. | [optional] **campaign_id** | **str** | ID of the ad campaign that contains this ad. | [optional] diff --git a/docs/AdUpdateRequest.md b/docs/AdUpdateRequest.md index 2c34028..8c866d6 100644 --- a/docs/AdUpdateRequest.md +++ b/docs/AdUpdateRequest.md @@ -6,20 +6,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The ID of this ad. | **ad_group_id** | **str** | ID of the ad group that contains the ad. | [optional] -**android_deep_link** | **str, none_type** | Deep link URL for Android devices. Not currently available. Using this field will generate an error. | [optional] +**android_deep_link** | **str, none_type** | Deep link URL for Android devices. | [optional] **carousel_android_deep_links** | **[str], none_type** | Comma-separated deep links for the carousel pin on Android. | [optional] **carousel_destination_urls** | **[str], none_type** | Comma-separated destination URLs for the carousel pin to promote. | [optional] **carousel_ios_deep_links** | **[str], none_type** | Comma-separated deep links for the carousel pin on iOS. | [optional] **click_tracking_url** | **str, none_type** | Tracking url for the ad clicks. | [optional] **creative_type** | [**CreativeType**](CreativeType.md) | | [optional] **destination_url** | **str, none_type** | Destination URL. | [optional] -**ios_deep_link** | **str, none_type** | Deep link URL for iOS devices. Not currently available. Using this field will generate an error. | [optional] +**ios_deep_link** | **str, none_type** | Deep link URL for iOS devices. | [optional] **is_pin_deleted** | **bool** | Is original pin deleted? | [optional] **is_removable** | **bool** | Is pin repinnable? | [optional] **name** | **str, none_type** | Name of the ad - 255 chars max. | [optional] **status** | [**EntityStatus**](EntityStatus.md) | | [optional] **tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **view_tracking_url** | **str, none_type** | Tracking URL for ad impressions. | [optional] +**lead_form_id** | **str, none_type** | Lead form ID for lead ad generation. | [optional] +**grid_click_type** | [**GridClickType**](GridClickType.md) | | [optional] +**customizable_cta_type** | **str, none_type** | Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only) | [optional] +**quiz_pin_data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved. | [optional] +**pin_id** | **str, none_type** | Pin ID. This field may only be updated for draft ads. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdUpdateRequest1.md b/docs/AdUpdateRequest1.md index e306bcb..be8f4bc 100644 --- a/docs/AdUpdateRequest1.md +++ b/docs/AdUpdateRequest1.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The ID of this ad. | +**pin_id** | **str, none_type** | Pin ID. This field may only be updated for draft ads. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdsAnalyticsAdTargetingType.md b/docs/AdsAnalyticsAdTargetingType.md new file mode 100644 index 0000000..97f685a --- /dev/null +++ b/docs/AdsAnalyticsAdTargetingType.md @@ -0,0 +1,12 @@ +# AdsAnalyticsAdTargetingType + +Reporting targeting type for ads + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Reporting targeting type for ads | must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "QUIZ_RESULT", "AGE_BUCKET_AND_GENDER", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdsAnalyticsCampaignTargetingType.md b/docs/AdsAnalyticsCampaignTargetingType.md new file mode 100644 index 0000000..07f4e3c --- /dev/null +++ b/docs/AdsAnalyticsCampaignTargetingType.md @@ -0,0 +1,12 @@ +# AdsAnalyticsCampaignTargetingType + +Reporting targeting type for campaigns + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Reporting targeting type for campaigns | must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "CREATIVE_TYPE", "AGE_BUCKET_AND_GENDER", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdsAnalyticsCreateAsyncRequest.md b/docs/AdsAnalyticsCreateAsyncRequest.md index f9c7446..b25cd57 100644 --- a/docs/AdsAnalyticsCreateAsyncRequest.md +++ b/docs/AdsAnalyticsCreateAsyncRequest.md @@ -7,25 +7,28 @@ Name | Type | Description | Notes **start_date** | **str** | Metric report start date (UTC). Format: YYYY-MM-DD | **end_date** | **str** | Metric report end date (UTC). Format: YYYY-MM-DD | **granularity** | **str** | TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly | -**columns** | [**[ReportingColumnAsync]**](ReportingColumnAsync.md) | Metric and entity columns | +**columns** | [**[ReportingColumnAsync]**](ReportingColumnAsync.md) | Metric and entity columns. Pin promotion and ad related columns are not supported for the Product Item level reports. | **level** | **str** | Level of the report | **click_window_days** | **int** | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional] if omitted the server will use the default value of 30 **engagement_window_days** | **int** | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional] if omitted the server will use the default value of 30 **view_window_days** | **int** | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day. | [optional] if omitted the server will use the default value of 1 **conversion_report_time** | **str** | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event. | [optional] if omitted the server will use the default value of "TIME_OF_AD_ACTION" **attribution_types** | [**[ConversionReportAttributionType]**](ConversionReportAttributionType.md) | List of types of attribution for the conversion report | [optional] -**report_format** | **str** | Specification for formatting report data | [optional] if omitted the server will use the default value of "JSON" +**report_format** | **str** | Specification for formatting the report data. Reports in JSON will not zero-fill metrics, whereas reports in CSV will. Both report formats will omit rows where all the columns are equal to 0. | [optional] if omitted the server will use the default value of "JSON" +**primary_sort** | **str** | | [optional] if omitted the server will use the default value of "BY_ID" +**start_hour** | **int** | Which hour of the start date to begin the report. The entire day will be included if no start hour is provided. Only allowed for hourly reports. | [optional] +**end_hour** | **int** | Which hour of the end date to stop the report (inclusive). For example, with an end_date of '2020-01-01' and end_hour of '15', the report will contain metrics up to '2020-01-01 14:59:59'. The entire day will be included if no end hour is provided. Only allowed for hourly reports. | [optional] **campaign_ids** | **[str]** | List of campaign ids | [optional] **campaign_statuses** | [**[CampaignSummaryStatus]**](CampaignSummaryStatus.md) | List of status values for filtering | [optional] **campaign_objective_types** | [**[ObjectiveType]**](ObjectiveType.md) | List of values for filtering. [\"WEB_SESSIONS\"] in BETA. | [optional] **ad_group_ids** | **[str]** | List of ad group ids | [optional] **ad_group_statuses** | [**[AdGroupSummaryStatus]**](AdGroupSummaryStatus.md) | List of values for filtering | [optional] -**ad_ids** | **[str]** | List of ad ids | [optional] -**ad_statuses** | [**[PinPromotionSummaryStatus]**](PinPromotionSummaryStatus.md) | List of values for filtering | [optional] +**ad_ids** | **[str]** | List of ad ids [This parameter is no supported for Product Item Level Reports] | [optional] +**ad_statuses** | [**[PinPromotionSummaryStatus]**](PinPromotionSummaryStatus.md) | List of values for filtering [This parameter is not supported for Product Item Level Reports] | [optional] **product_group_ids** | **[str]** | List of product group ids | [optional] **product_group_statuses** | [**[ProductGroupSummaryStatus]**](ProductGroupSummaryStatus.md) | List of values for filtering | [optional] **product_item_ids** | **[str]** | List of product item ids | [optional] -**targeting_types** | [**[AdsAnalyticsTargetingType]**](AdsAnalyticsTargetingType.md) | List of targeting types. Requires `level` to be a value ending in `_TARGETING`. | [optional] +**targeting_types** | [**[AdsAnalyticsTargetingType]**](AdsAnalyticsTargetingType.md) | List of targeting types. Requires `level` to be a value ending in `_TARGETING`. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. | [optional] **metrics_filters** | [**[AdsAnalyticsMetricsFilter]**](AdsAnalyticsMetricsFilter.md) | List of metrics filters | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/AdsAnalyticsCreateAsyncRequestAllOf1.md b/docs/AdsAnalyticsCreateAsyncRequestAllOf1.md index 9e6325b..6b6a94e 100644 --- a/docs/AdsAnalyticsCreateAsyncRequestAllOf1.md +++ b/docs/AdsAnalyticsCreateAsyncRequestAllOf1.md @@ -4,9 +4,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**columns** | [**[ReportingColumnAsync]**](ReportingColumnAsync.md) | Metric and entity columns | +**columns** | [**[ReportingColumnAsync]**](ReportingColumnAsync.md) | Metric and entity columns. Pin promotion and ad related columns are not supported for the Product Item level reports. | **level** | **str** | Level of the report | -**report_format** | **str** | Specification for formatting report data | [optional] if omitted the server will use the default value of "JSON" +**report_format** | **str** | Specification for formatting the report data. Reports in JSON will not zero-fill metrics, whereas reports in CSV will. Both report formats will omit rows where all the columns are equal to 0. | [optional] if omitted the server will use the default value of "JSON" +**primary_sort** | **str** | | [optional] if omitted the server will use the default value of "BY_ID" +**start_hour** | **int** | Which hour of the start date to begin the report. The entire day will be included if no start hour is provided. Only allowed for hourly reports. | [optional] +**end_hour** | **int** | Which hour of the end date to stop the report (inclusive). For example, with an end_date of '2020-01-01' and end_hour of '15', the report will contain metrics up to '2020-01-01 14:59:59'. The entire day will be included if no end hour is provided. Only allowed for hourly reports. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdsAnalyticsTargetingType.md b/docs/AdsAnalyticsTargetingType.md index a7360f3..08154fd 100644 --- a/docs/AdsAnalyticsTargetingType.md +++ b/docs/AdsAnalyticsTargetingType.md @@ -5,7 +5,7 @@ Reporting targeting type ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Reporting targeting type | must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", ] +**value** | **str** | Reporting targeting type | must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "AGE_BUCKET_AND_GENDER", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdsApi.md b/docs/AdsApi.md index 62304af..705f5cf 100644 --- a/docs/AdsApi.md +++ b/docs/AdsApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description Create ad preview with pin or image -Create an ad preview given an ad account ID and either an existing organic pin ID or the URL for an image to be used to create the Pin and the ad.

If you are creating a preview from an existing Pin, that Pin must be promotable: that is, it must have a clickthrough link and meet other requirements. (See Ads Overview.)

You can view the returned preview URL on a webpage or iframe for 7 days, after which the URL expires. +Create an ad preview given an ad account ID and either an existing organic pin ID or the URL for an image to be used to create the Pin and the ad.

If you are creating a preview from an existing Pin, that Pin must be promotable: that is, it must have a clickthrough link and meet other requirements. (See Ads Overview.)

You can view the returned preview URL on a webpage or iframe for 7 days, after which the URL expires. Collection ads are not currently supported ad preview. ### Example @@ -114,7 +114,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import ads_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.granularity import Granularity -from openapi_generated.pinterest_client.model.ads_analytics_targeting_type import AdsAnalyticsTargetingType +from openapi_generated.pinterest_client.model.ads_analytics_ad_targeting_type import AdsAnalyticsAdTargetingType from openapi_generated.pinterest_client.model.conversion_report_attribution_type import ConversionReportAttributionType from openapi_generated.pinterest_client.model.metrics_response import MetricsResponse from pprint import pprint @@ -146,8 +146,8 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: start_date = dateutil_parser('1970-01-01').date() # date | Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. end_date = dateutil_parser('1970-01-01').date() # date | Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. targeting_types = [ - AdsAnalyticsTargetingType("APPTYPE"), - ] # [AdsAnalyticsTargetingType] | Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. + AdsAnalyticsAdTargetingType("APPTYPE"), + ] # [AdsAnalyticsAdTargetingType] | Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. columns = [ "TOTAL_CONVERSIONS", ] # [str] | Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.
For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned @@ -185,7 +185,7 @@ Name | Type | Description | Notes **ad_ids** | **[str]**| List of Ad Ids to use to filter the results. | **start_date** | **date**| Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. | **end_date** | **date**| Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. | - **targeting_types** | [**[AdsAnalyticsTargetingType]**](AdsAnalyticsTargetingType.md)| Targeting type breakdowns for the report. The reporting per targeting type <br> is independent from each other. | + **targeting_types** | [**[AdsAnalyticsAdTargetingType]**](AdsAnalyticsAdTargetingType.md)| Targeting type breakdowns for the report. The reporting per targeting type <br> is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. | **columns** | **[str]**| Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned | **granularity** | **Granularity**| TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly | **click_window_days** | **int**| Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional] if omitted the server will use the default value of 30 @@ -218,11 +218,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **ads_analytics** -> AdsAnalyticsResponse ads_analytics(ad_account_id, start_date, end_date, ad_ids, columns, granularity) +> AdsAnalyticsResponse ads_analytics(ad_account_id, start_date, end_date, columns, granularity) Get ad analytics -Get analytics for the specified ads in the specified ad_account_id, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. - If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days. - If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days. +Get analytics for the specified ads in the specified ad_account_id, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. - The request must contain either ad_ids or both campaign_ids and pin_ids. - If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days. - If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days. ### Example @@ -260,22 +260,28 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: ad_account_id = "4" # str | Unique identifier of an ad account. start_date = dateutil_parser('1970-01-01').date() # date | Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. end_date = dateutil_parser('1970-01-01').date() # date | Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. - ad_ids = [ - "4", - ] # [str] | List of Ad Ids to use to filter the results. columns = [ "TOTAL_CONVERSIONS", ] # [str] | Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.
For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned granularity = Granularity("DAY") # Granularity | TOTAL - metrics are aggregated over the specified date range.
DAY - metrics are broken down daily.
HOUR - metrics are broken down hourly.
WEEKLY - metrics are broken down weekly.
MONTHLY - metrics are broken down monthly + ad_ids = [ + "4", + ] # [str] | List of Ad Ids to use to filter the results. (optional) click_window_days = 1 # int | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. (optional) if omitted the server will use the default value of 30 engagement_window_days = 30 # int | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. (optional) if omitted the server will use the default value of 30 view_window_days = 1 # int | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day. (optional) if omitted the server will use the default value of 1 conversion_report_time = "TIME_OF_AD_ACTION" # str | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event. (optional) if omitted the server will use the default value of "TIME_OF_AD_ACTION" + pin_ids = [ + "4", + ] # [str] | List of Pin IDs. (optional) + campaign_ids = [ + "4", + ] # [str] | List of Campaign Ids to use to filter the results. (optional) # example passing only required values which don't have defaults set try: # Get ad analytics - api_response = api_instance.ads_analytics(ad_account_id, start_date, end_date, ad_ids, columns, granularity) + api_response = api_instance.ads_analytics(ad_account_id, start_date, end_date, columns, granularity) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling AdsApi->ads_analytics: %s\n" % e) @@ -284,7 +290,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # and optional values try: # Get ad analytics - api_response = api_instance.ads_analytics(ad_account_id, start_date, end_date, ad_ids, columns, granularity, click_window_days=click_window_days, engagement_window_days=engagement_window_days, view_window_days=view_window_days, conversion_report_time=conversion_report_time) + api_response = api_instance.ads_analytics(ad_account_id, start_date, end_date, columns, granularity, ad_ids=ad_ids, click_window_days=click_window_days, engagement_window_days=engagement_window_days, view_window_days=view_window_days, conversion_report_time=conversion_report_time, pin_ids=pin_ids, campaign_ids=campaign_ids) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling AdsApi->ads_analytics: %s\n" % e) @@ -298,13 +304,15 @@ Name | Type | Description | Notes **ad_account_id** | **str**| Unique identifier of an ad account. | **start_date** | **date**| Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. | **end_date** | **date**| Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. | - **ad_ids** | **[str]**| List of Ad Ids to use to filter the results. | **columns** | **[str]**| Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned | **granularity** | **Granularity**| TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly | + **ad_ids** | **[str]**| List of Ad Ids to use to filter the results. | [optional] **click_window_days** | **int**| Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional] if omitted the server will use the default value of 30 **engagement_window_days** | **int**| Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional] if omitted the server will use the default value of 30 **view_window_days** | **int**| Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day. | [optional] if omitted the server will use the default value of 1 **conversion_report_time** | **str**| The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event. | [optional] if omitted the server will use the default value of "TIME_OF_AD_ACTION" + **pin_ids** | **[str]**| List of Pin IDs. | [optional] + **campaign_ids** | **[str]**| List of Campaign Ids to use to filter the results. | [optional] ### Return type @@ -372,7 +380,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: api_instance = ads_api.AdsApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. ad_create_request = [ - AdCreateRequest(None), + AdCreateRequest(), ] # [AdCreateRequest] | List of ads to create, size limit [1, 30]. # example passing only required values which don't have defaults set @@ -514,6 +522,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import ads_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.ad_response import AdResponse from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -547,7 +556,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: "4", ] # [str] | List of Ad Ids to use to filter the results. (optional) entity_statuses = ["ACTIVE","PAUSED"] # [str] | Entity status (optional) if omitted the server will use the default value of ["ACTIVE","PAUSED"] - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) @@ -579,7 +588,7 @@ Name | Type | Description | Notes **ad_group_ids** | **[str]**| List of Ad group Ids to use to filter the results. | [optional] **ad_ids** | **[str]**| List of Ad Ids to use to filter the results. | [optional] **entity_statuses** | **[str]**| Entity status | [optional] if omitted the server will use the default value of ["ACTIVE","PAUSED"] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] @@ -649,7 +658,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: api_instance = ads_api.AdsApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. ad_update_request = [ - AdUpdateRequest(None), + AdUpdateRequest(), ] # [AdUpdateRequest] | List of ads to update, size limit [1, 30] # example passing only required values which don't have defaults set diff --git a/docs/AdsCreditDiscountsResponse.md b/docs/AdsCreditDiscountsResponse.md new file mode 100644 index 0000000..d8c6733 --- /dev/null +++ b/docs/AdsCreditDiscountsResponse.md @@ -0,0 +1,18 @@ +# AdsCreditDiscountsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | True if the offer code is currently active. | [optional] +**advertiser_id** | **str** | Advertiser ID the offer was applied to. | [optional] +**discount_type** | **str, none_type** | The type of discount of this credit | [optional] +**discount_in_micro_currency** | **float, none_type** | The discount applied in the offer’s currency value. | [optional] +**discount_currency** | **str, none_type** | Currency value for the discount. | [optional] +**title** | **str, none_type** | Human readable title of the offer code. | [optional] +**remaining_discount_in_micro_currency** | **float, none_type** | The credits left to spend. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdsCreditRedeemRequest.md b/docs/AdsCreditRedeemRequest.md new file mode 100644 index 0000000..ce4aa40 --- /dev/null +++ b/docs/AdsCreditRedeemRequest.md @@ -0,0 +1,13 @@ +# AdsCreditRedeemRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**offer_code_hash** | **str** | Takes in a SHA256 hash of the offerCode. | +**validate_only** | **bool** | If true, only validate if we can redeem offer code. Otherwise it will actually apply the offer code to the account | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdsCreditRedeemResponse.md b/docs/AdsCreditRedeemResponse.md new file mode 100644 index 0000000..8d4ce67 --- /dev/null +++ b/docs/AdsCreditRedeemResponse.md @@ -0,0 +1,14 @@ +# AdsCreditRedeemResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Returns true if the offer code was successfully applied(validateOnly=false) or can be applied(validateOnly=true). | [optional] +**error_code** | **int, none_type** | Error code type if error occurs | [optional] +**error_message** | **str, none_type** | Reason for failure | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionApi.md b/docs/AdvancedAuctionApi.md new file mode 100644 index 0000000..0cafe07 --- /dev/null +++ b/docs/AdvancedAuctionApi.md @@ -0,0 +1,214 @@ +# openapi_generated.pinterest_client.AdvancedAuctionApi + +All URIs are relative to *https://api.pinterest.com/v5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**advanced_auction_items_get_post**](AdvancedAuctionApi.md#advanced_auction_items_get_post) | **POST** /advanced_auction/items/get | Get item bid options (POST) +[**advanced_auction_items_submit_post**](AdvancedAuctionApi.md#advanced_auction_items_submit_post) | **POST** /advanced_auction/items/submit | Operate on item level bid options + + +# **advanced_auction_items_get_post** +> AdvancedAuctionItems advanced_auction_items_get_post(advanced_auction_items_get_request) + +Get item bid options (POST) + +Get the bid options for a batch of retail catalog items. The catalog must be owned by the \"operation user_account\". See detailed documentation here. By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: `Owner`, `Admin`. This endpoint is not available to all users. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import advanced_auction_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.advanced_auction_items_get_request import AdvancedAuctionItemsGetRequest +from openapi_generated.pinterest_client.model.advanced_auction_items import AdvancedAuctionItems +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = advanced_auction_api.AdvancedAuctionApi(api_client) + advanced_auction_items_get_request = AdvancedAuctionItemsGetRequest( + catalog_id="2680059592705", + items=[ + AdvancedAuctionItemsGetRecord(None), + ], + ) # AdvancedAuctionItemsGetRequest | Request object used to get bid options values for a batch of retail catalog items + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + + # example passing only required values which don't have defaults set + try: + # Get item bid options (POST) + api_response = api_instance.advanced_auction_items_get_post(advanced_auction_items_get_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AdvancedAuctionApi->advanced_auction_items_get_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get item bid options (POST) + api_response = api_instance.advanced_auction_items_get_post(advanced_auction_items_get_request, ad_account_id=ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AdvancedAuctionApi->advanced_auction_items_get_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **advanced_auction_items_get_request** | [**AdvancedAuctionItemsGetRequest**](AdvancedAuctionItemsGetRequest.md)| Request object used to get bid options values for a batch of retail catalog items | + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + +### Return type + +[**AdvancedAuctionItems**](AdvancedAuctionItems.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response containing the bid option values for the requested retail catalog items. Items that don't exist or do not have bid options set won't be present in the response. | - | +**400** | Invalid request parameters. | - | +**401** | Not authenticated to get item bid options | - | +**403** | Not authorized to get item bid options | - | +**500** | Internal error | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **advanced_auction_items_submit_post** +> AdvancedAuctionProcessedItems advanced_auction_items_submit_post(advanced_auction_items_submit_request) + +Operate on item level bid options + +This endpoint supports multiple operations on a set of one or more bid options (bid price and bid adjustments for targeting categories) for retail catalog items. These advanced auction settings are applied in campaigns using objective_type `CATALOG_SALES` and ad groups using bid_strategy_type `MAX_BID`. The catalog must be owned by the \"operation user_account\". See detailed documentation here. By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: `Owner`, `Admin`. This endpoint is not available to all users. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import advanced_auction_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.advanced_auction_processed_items import AdvancedAuctionProcessedItems +from openapi_generated.pinterest_client.model.advanced_auction_items_submit_request import AdvancedAuctionItemsSubmitRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = advanced_auction_api.AdvancedAuctionApi(api_client) + advanced_auction_items_submit_request = AdvancedAuctionItemsSubmitRequest( + catalog_id="2680059592705", + items=[ + AdvancedAuctionItemsSubmitRecord( + operation=AdvancedAuctionOperation("UPSERT"), + ), + ], + ) # AdvancedAuctionItemsSubmitRequest | Request object used to upsert or delete bid options for a batch of retail catalog items + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + + # example passing only required values which don't have defaults set + try: + # Operate on item level bid options + api_response = api_instance.advanced_auction_items_submit_post(advanced_auction_items_submit_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AdvancedAuctionApi->advanced_auction_items_submit_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Operate on item level bid options + api_response = api_instance.advanced_auction_items_submit_post(advanced_auction_items_submit_request, ad_account_id=ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AdvancedAuctionApi->advanced_auction_items_submit_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **advanced_auction_items_submit_request** | [**AdvancedAuctionItemsSubmitRequest**](AdvancedAuctionItemsSubmitRequest.md)| Request object used to upsert or delete bid options for a batch of retail catalog items | + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + +### Return type + +[**AdvancedAuctionProcessedItems**](AdvancedAuctionProcessedItems.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response containing the results of the item bid options operations | - | +**400** | Invalid request parameters. | - | +**401** | Not authenticated to post item bid options | - | +**403** | Not authorized to post item bid options | - | +**500** | Internal error | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AdvancedAuctionBidOptions.md b/docs/AdvancedAuctionBidOptions.md new file mode 100644 index 0000000..463dd46 --- /dev/null +++ b/docs/AdvancedAuctionBidOptions.md @@ -0,0 +1,15 @@ +# AdvancedAuctionBidOptions + +Object describing a retail catalog item's bid options (bid price and bid multipliers). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bid_in_micro_currency** | **int, none_type** | Bid price in micro currency. A value of 0 will stop distribution for this item in `MAX_BID` ad groups in `CATALOG_SALES` campaigns. A value of `null` will fallback to the ad group's `bid_in_micro_currency`. | [optional] +**app_type_multipliers** | [**AppTypeMultipliers**](AppTypeMultipliers.md) | | [optional] +**placement_multipliers** | [**PlacementMultipliers**](PlacementMultipliers.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionItem.md b/docs/AdvancedAuctionItem.md new file mode 100644 index 0000000..5732d03 --- /dev/null +++ b/docs/AdvancedAuctionItem.md @@ -0,0 +1,15 @@ +# AdvancedAuctionItem + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog retail item id in the merchant namespace | +**country** | [**Country**](Country.md) | | +**language** | [**Language**](Language.md) | | +**bid_options** | [**AdvancedAuctionBidOptions**](AdvancedAuctionBidOptions.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionItemAllOf.md b/docs/AdvancedAuctionItemAllOf.md new file mode 100644 index 0000000..b18b4d3 --- /dev/null +++ b/docs/AdvancedAuctionItemAllOf.md @@ -0,0 +1,12 @@ +# AdvancedAuctionItemAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bid_options** | [**AdvancedAuctionBidOptions**](AdvancedAuctionBidOptions.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionItems.md b/docs/AdvancedAuctionItems.md new file mode 100644 index 0000000..3a87fd4 --- /dev/null +++ b/docs/AdvancedAuctionItems.md @@ -0,0 +1,14 @@ +# AdvancedAuctionItems + +Response object containing item bid options + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_id** | **str** | Response object of item bid options | [optional] +**items** | [**[AdvancedAuctionItem]**](AdvancedAuctionItem.md) | Array with item bid options | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionItemsGetRecord.md b/docs/AdvancedAuctionItemsGetRecord.md new file mode 100644 index 0000000..064b081 --- /dev/null +++ b/docs/AdvancedAuctionItemsGetRecord.md @@ -0,0 +1,15 @@ +# AdvancedAuctionItemsGetRecord + +Object uniquely identifying a retail catalog item + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog retail item id in the merchant namespace | +**country** | [**Country**](Country.md) | | +**language** | [**Language**](Language.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionItemsGetRequest.md b/docs/AdvancedAuctionItemsGetRequest.md new file mode 100644 index 0000000..4892bf3 --- /dev/null +++ b/docs/AdvancedAuctionItemsGetRequest.md @@ -0,0 +1,13 @@ +# AdvancedAuctionItemsGetRequest + +Request object used to get bid options values for a batch of retail catalog items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_id** | **str** | Catalog id pertaining to the retail item | +**items** | [**[AdvancedAuctionItemsGetRecord]**](AdvancedAuctionItemsGetRecord.md) | A list of retail catalog items to fetch bid options for | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionItemsSubmitDeleteRecord.md b/docs/AdvancedAuctionItemsSubmitDeleteRecord.md new file mode 100644 index 0000000..d7df5e0 --- /dev/null +++ b/docs/AdvancedAuctionItemsSubmitDeleteRecord.md @@ -0,0 +1,15 @@ +# AdvancedAuctionItemsSubmitDeleteRecord + +Object describing an item bid option deletion operation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog retail item id in the merchant namespace | +**country** | [**Country**](Country.md) | | +**language** | [**Language**](Language.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionItemsSubmitRecord.md b/docs/AdvancedAuctionItemsSubmitRecord.md new file mode 100644 index 0000000..c21dd57 --- /dev/null +++ b/docs/AdvancedAuctionItemsSubmitRecord.md @@ -0,0 +1,18 @@ +# AdvancedAuctionItemsSubmitRecord + +Object describing an item bid option operation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operation** | [**AdvancedAuctionOperation**](AdvancedAuctionOperation.md) | | +**item_id** | **str** | The catalog retail item id in the merchant namespace | +**country** | [**Country**](Country.md) | | +**language** | [**Language**](Language.md) | | +**bid_options** | [**AdvancedAuctionBidOptions**](AdvancedAuctionBidOptions.md) | | +**update_mask** | [**[UpdateMaskBidOptionField], none_type**](UpdateMaskBidOptionField.md) | The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionItemsSubmitRequest.md b/docs/AdvancedAuctionItemsSubmitRequest.md new file mode 100644 index 0000000..4a6fc16 --- /dev/null +++ b/docs/AdvancedAuctionItemsSubmitRequest.md @@ -0,0 +1,13 @@ +# AdvancedAuctionItemsSubmitRequest + +Request containing operations to perform on bid prices and bid multipliers for a batch of retail catalog items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_id** | **str** | Catalog id pertaining to all items | +**items** | [**[AdvancedAuctionItemsSubmitRecord]**](AdvancedAuctionItemsSubmitRecord.md) | Array of item bid option operations | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionItemsSubmitUpsertRecord.md b/docs/AdvancedAuctionItemsSubmitUpsertRecord.md new file mode 100644 index 0000000..1ea6a6a --- /dev/null +++ b/docs/AdvancedAuctionItemsSubmitUpsertRecord.md @@ -0,0 +1,17 @@ +# AdvancedAuctionItemsSubmitUpsertRecord + +Object describing an item bid option upsert operation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog retail item id in the merchant namespace | +**country** | [**Country**](Country.md) | | +**language** | [**Language**](Language.md) | | +**bid_options** | [**AdvancedAuctionBidOptions**](AdvancedAuctionBidOptions.md) | | +**update_mask** | [**[UpdateMaskBidOptionField], none_type**](UpdateMaskBidOptionField.md) | The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionItemsSubmitUpsertRecordAllOf.md b/docs/AdvancedAuctionItemsSubmitUpsertRecordAllOf.md new file mode 100644 index 0000000..fd5542d --- /dev/null +++ b/docs/AdvancedAuctionItemsSubmitUpsertRecordAllOf.md @@ -0,0 +1,12 @@ +# AdvancedAuctionItemsSubmitUpsertRecordAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**update_mask** | [**[UpdateMaskBidOptionField], none_type**](UpdateMaskBidOptionField.md) | The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionKey.md b/docs/AdvancedAuctionKey.md new file mode 100644 index 0000000..938ccd9 --- /dev/null +++ b/docs/AdvancedAuctionKey.md @@ -0,0 +1,15 @@ +# AdvancedAuctionKey + +Object uniquely identifying a retail catalog item + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog retail item id in the merchant namespace | +**country** | [**Country**](Country.md) | | +**language** | [**Language**](Language.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionOperation.md b/docs/AdvancedAuctionOperation.md new file mode 100644 index 0000000..804df3f --- /dev/null +++ b/docs/AdvancedAuctionOperation.md @@ -0,0 +1,11 @@ +# AdvancedAuctionOperation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | must be one of ["UPSERT", "DELETE", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionOperationError.md b/docs/AdvancedAuctionOperationError.md new file mode 100644 index 0000000..ca49e14 --- /dev/null +++ b/docs/AdvancedAuctionOperationError.md @@ -0,0 +1,14 @@ +# AdvancedAuctionOperationError + +Error which occurred when applying a bid options operation to a specific item. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | The error code for the item bid option operation validation error | [optional] +**message** | **str** | Message describing the item bid option operation validation error | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionProcessedItem.md b/docs/AdvancedAuctionProcessedItem.md new file mode 100644 index 0000000..bd11c45 --- /dev/null +++ b/docs/AdvancedAuctionProcessedItem.md @@ -0,0 +1,18 @@ +# AdvancedAuctionProcessedItem + +Object describing the result of an operation on an item bid option + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog retail item id in the merchant namespace | +**country** | [**Country**](Country.md) | | +**language** | [**Language**](Language.md) | | +**bid_options** | [**AdvancedAuctionBidOptions**](AdvancedAuctionBidOptions.md) | | +**update_mask** | [**[UpdateMaskBidOptionField], none_type**](UpdateMaskBidOptionField.md) | The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. | +**errors** | [**[AdvancedAuctionOperationError]**](AdvancedAuctionOperationError.md) | Array with validation errors for the supplied item bid option modification operation. A non empty errors list means this single item operation was not applied. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionProcessedItemAllOf.md b/docs/AdvancedAuctionProcessedItemAllOf.md new file mode 100644 index 0000000..612ee90 --- /dev/null +++ b/docs/AdvancedAuctionProcessedItemAllOf.md @@ -0,0 +1,12 @@ +# AdvancedAuctionProcessedItemAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[AdvancedAuctionOperationError]**](AdvancedAuctionOperationError.md) | Array with validation errors for the supplied item bid option modification operation. A non empty errors list means this single item operation was not applied. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdvancedAuctionProcessedItems.md b/docs/AdvancedAuctionProcessedItems.md new file mode 100644 index 0000000..7261688 --- /dev/null +++ b/docs/AdvancedAuctionProcessedItems.md @@ -0,0 +1,14 @@ +# AdvancedAuctionProcessedItems + +Response object containing the results of an operation on an item bid option + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_id** | **str** | Catalog id pertaining to all items | [optional] +**items** | [**[AdvancedAuctionProcessedItem]**](AdvancedAuctionProcessedItem.md) | Array of advanced auction processed items | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalyticsMetricsResponse.md b/docs/AnalyticsMetricsResponse.md index de6230e..768fb76 100644 --- a/docs/AnalyticsMetricsResponse.md +++ b/docs/AnalyticsMetricsResponse.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**daily_metrics** | [**[AnalyticsDailyMetrics]**](AnalyticsDailyMetrics.md) | Array with the requested daily metric records | [optional] **summary_metrics** | **{str: (float,)}** | The metric name and value over the requested period for each requested metric | [optional] +**daily_metrics** | [**[AnalyticsDailyMetrics]**](AnalyticsDailyMetrics.md) | Array with the requested daily metric records | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AppTypeMultipliers.md b/docs/AppTypeMultipliers.md new file mode 100644 index 0000000..d24f1d9 --- /dev/null +++ b/docs/AppTypeMultipliers.md @@ -0,0 +1,13 @@ +# AppTypeMultipliers + +This represents a mapping from app type targeting criteria to a bid price adjustment. Multiplier values must be between 0 and 10. A value of 10 represents a 900% increase in bid price (from $1 to $10 for example). A value of 0 will stop distribution for this item on the specified app type in `MAX_BID` ad groups in `CATALOG_SALES` campaigns. All app type multipliers must be set at the same time. If a multiplier is not provided it is assumed to be 1 (no bid adjustment). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_type** | [**TargetingSpecAppType**](TargetingSpecAppType.md) | | [optional] +**any string name** | **float** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetGroupBinding.md b/docs/AssetGroupBinding.md new file mode 100644 index 0000000..0a2b843 --- /dev/null +++ b/docs/AssetGroupBinding.md @@ -0,0 +1,21 @@ +# AssetGroupBinding + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Asset Group ID. | [optional] +**asset_group_name** | **str, none_type** | Asset Group name | [optional] +**asset_group_description** | **str, none_type** | Asset group description | [optional] +**asset_group_types** | **[str]** | Asset group types | [optional] +**ad_accounts_ids** | **[str], none_type** | A list of ad account IDs under the asset group | [optional] +**profiles_ids** | **[str], none_type** | A list of profile IDs under asset group | [optional] +**created_time** | **int, none_type** | The creation time of the asset group | [optional] +**updated_time** | **int, none_type** | The last update time of the asset group | [optional] +**owner** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | The data of the business that owns the asset group. | [optional] +**created_by** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | The data of the user that created the asset group. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetGroupType.md b/docs/AssetGroupType.md new file mode 100644 index 0000000..998e86f --- /dev/null +++ b/docs/AssetGroupType.md @@ -0,0 +1,12 @@ +# AssetGroupType + +Asset group type + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Asset group type | must be one of ["BRAND", "LOCATION_OR_LANGUAGE", "PRODUCT_LINE", "OTHER", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetGroupTypes.md b/docs/AssetGroupTypes.md new file mode 100644 index 0000000..b91a47f --- /dev/null +++ b/docs/AssetGroupTypes.md @@ -0,0 +1,12 @@ +# AssetGroupTypes + +Asset Group Types. Note: The asset group types are used for user reference and categorization purposes only and do not impact the functionality of the asset group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[AssetGroupType]**](AssetGroupType.md) | Asset Group Types. Note: The asset group types are used for user reference and categorization purposes only and do not impact the functionality of the asset group. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetIdPermissions.md b/docs/AssetIdPermissions.md new file mode 100644 index 0000000..6f7f8cb --- /dev/null +++ b/docs/AssetIdPermissions.md @@ -0,0 +1,16 @@ +# AssetIdPermissions + +An object containing the permissions a business member has on the asset. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_id** | **str** | Unique identifier of a business asset. | [optional] +**asset_type** | **str** | Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP. | [optional] +**permissions** | [**PermissionsResponse**](PermissionsResponse.md) | | [optional] +**asset_group_info** | [**AssetGroupBinding**](AssetGroupBinding.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetIdToPermissions.md b/docs/AssetIdToPermissions.md new file mode 100644 index 0000000..ffae3be --- /dev/null +++ b/docs/AssetIdToPermissions.md @@ -0,0 +1,12 @@ +# AssetIdToPermissions + +An object mapping asset ids to lists of business permissions. This can be used to setting/requesting permissions on various assets. If accepting an invite or request, this object would be used to grant asset permissions to the member or partner. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | [**[Permissions]**](Permissions.md) | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AudienceAccountType.md b/docs/AudienceAccountType.md new file mode 100644 index 0000000..9dc62c0 --- /dev/null +++ b/docs/AudienceAccountType.md @@ -0,0 +1,11 @@ +# AudienceAccountType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | defaults to "AD_ACCOUNT", must be one of ["AD_ACCOUNT", "BUSINESS_ACCOUNT", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AudienceCategory.md b/docs/AudienceCategory.md index 5041cc7..907e6a5 100644 --- a/docs/AudienceCategory.md +++ b/docs/AudienceCategory.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **ratio** | **float** | Interest's percent of category's total audience. | [optional] **index** | **float** | Interest affinity index. | [optional] **id** | **str** | Interest ID. | [optional] +**subcategories** | [**[AudienceSubcategory]**](AudienceSubcategory.md) | Subcategory interest distribution | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AudienceInsightsApi.md b/docs/AudienceInsightsApi.md index d89cf05..54d27b9 100644 --- a/docs/AudienceInsightsApi.md +++ b/docs/AudienceInsightsApi.md @@ -6,7 +6,6 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**audience_insights_get**](AudienceInsightsApi.md#audience_insights_get) | **GET** /ad_accounts/{ad_account_id}/audience_insights | Get audience insights [**audience_insights_scope_and_type_get**](AudienceInsightsApi.md#audience_insights_scope_and_type_get) | **GET** /ad_accounts/{ad_account_id}/insights/audiences | Get audience insights scope and type -[**audiences_insights_category_list**](AudienceInsightsApi.md#audiences_insights_category_list) | **GET** /ad_accounts/{ad_account_id}/insights/audiences/{scope}/{type}/{category_id} | Get category sub-interest (DEPRECATED) # **audience_insights_get** @@ -172,100 +171,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **audiences_insights_category_list** -> AudienceInsightCategoryArrayResponse audiences_insights_category_list(ad_account_id, scope, type, category_id) - -Get category sub-interest (DEPRECATED) - -Get information about a category's sub-level interests. For a list of interests, their IDs, and hierarchy, see the [list of interests](https://docs.google.com/spreadsheets/d/1HxL-0Z3p2fgxis9YBP2HWC3tvPrs1hAuHDRtH-NJTIM/edit#gid=118370875). Also, a category is a level-one (L1) interest. For example, in the interest hierarchy see **Animals** > **Mammals** > **Dogs**, **Animals** is the category. This endpoint has been deprecated. - -### Example - -* OAuth Authentication (pinterest_oauth2): - -```python -import time -import openapi_generated.pinterest_client -from openapi_generated.pinterest_client.api import audience_insights_api -from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.audience_insight_category_array_response import AudienceInsightCategoryArrayResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.pinterest.com/v5 -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_generated.pinterest_client.Configuration( - host = "https://api.pinterest.com/v5" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: pinterest_oauth2 -configuration = openapi_generated.pinterest_client.Configuration( - host = "https://api.pinterest.com/v5" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = audience_insights_api.AudienceInsightsApi(api_client) - ad_account_id = "4" # str | Unique identifier of an ad account. - scope = "scope_example" # str | Generated audience scope to request. - type = "type_example" # str | Generated audience type to request. - category_id = "4" # str | Category (L1 interest) numeric ID. - sort = "RATIO" # str | Sort method. Only RATIO is supported. (optional) if omitted the server will use the default value of "RATIO" - - # example passing only required values which don't have defaults set - try: - # Get category sub-interest (DEPRECATED) - api_response = api_instance.audiences_insights_category_list(ad_account_id, scope, type, category_id) - pprint(api_response) - except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling AudienceInsightsApi->audiences_insights_category_list: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Get category sub-interest (DEPRECATED) - api_response = api_instance.audiences_insights_category_list(ad_account_id, scope, type, category_id, sort=sort) - pprint(api_response) - except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling AudienceInsightsApi->audiences_insights_category_list: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ad_account_id** | **str**| Unique identifier of an ad account. | - **scope** | **str**| Generated audience scope to request. | - **type** | **str**| Generated audience type to request. | - **category_id** | **str**| Category (L1 interest) numeric ID. | - **sort** | **str**| Sort method. Only RATIO is supported. | [optional] if omitted the server will use the default value of "RATIO" - -### Return type - -[**AudienceInsightCategoryArrayResponse**](AudienceInsightCategoryArrayResponse.md) - -### Authorization - -[pinterest_oauth2](../README.md#pinterest_oauth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**0** | Unexpected error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/AudienceRule.md b/docs/AudienceRule.md index 259613d..b195199 100644 --- a/docs/AudienceRule.md +++ b/docs/AudienceRule.md @@ -1,6 +1,6 @@ # AudienceRule -JSON object defining targeted audience users. Example rule formats per audience type:
CUSTOMER_LIST: { \"customer_list_id\": \"<customer list ID>\"}
ACTALIKE: { \"seed_id\": [\"<audience ID>\"], \"country\": \"US\", \"percentage\": \"10\" }
(Valid countries include: \"US\", \"CA\", and \"GB\". Percentage should be 1-10.
The targeted audience should be this % size across Pinterest.)
VISITOR: { \"visitor_source_id\": [\"<conversion tag ID>\"], \"retention_days\": \"180\", \"event_source\": {\"=\": [\"web\", \"mobile\"]}, \"ingestion_source\": {\"=\": [\"tag\"]}}
(Retention days should be 1-540. Retention applies to specific customers.)
ENGAGEMENT: {\"engagement_domain\": [\"www.entomi.com\"], \"engager_type\": 1}
For more details on engagement audiences, see November 2021 changelog. +JSON object defining targeted audience users. Example rule formats per audience type:
CUSTOMER_LIST: { \"customer_list_id\": \"<customer list ID>\"}
ACTALIKE: { \"seed_id\": [\"<audience ID>\"], \"country\": \"US\", \"percentage\": \"10\" }
(Valid countries include: \"US\", \"CA\", and \"GB\". Percentage should be 1-10.
The targeted audience should be this % size across Pinterest.)
VISITOR: { \"visitor_source_id\": [\"<conversion tag ID>\"], \"retention_days\": \"180\", \"event_source\": {\"=\": [\"web\", \"mobile\"]}, \"ingestion_source\": {\"=\": [\"tag\"]}}
(Retention days should be 1-540. Retention applies to specific customers.)
ENGAGEMENT: {\"engagement_domain\": [\"www.entomi.com\"], \"engager_type\": 1}
For more details on engagement audiences, see November 2021 changelog. ## Properties Name | Type | Description | Notes diff --git a/docs/AudienceShareType.md b/docs/AudienceShareType.md new file mode 100644 index 0000000..f694117 --- /dev/null +++ b/docs/AudienceShareType.md @@ -0,0 +1,11 @@ +# AudienceShareType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | defaults to "SHARED", must be one of ["SHARED", "RECEIVED", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AudienceSharingApi.md b/docs/AudienceSharingApi.md new file mode 100644 index 0000000..32bf439 --- /dev/null +++ b/docs/AudienceSharingApi.md @@ -0,0 +1,650 @@ +# openapi_generated.pinterest_client.AudienceSharingApi + +All URIs are relative to *https://api.pinterest.com/v5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ad_accounts_audiences_shared_accounts_list**](AudienceSharingApi.md#ad_accounts_audiences_shared_accounts_list) | **GET** /ad_accounts/{ad_account_id}/audiences/shared/accounts | List accounts with access to an audience owned by an ad account +[**business_account_audiences_shared_accounts_list**](AudienceSharingApi.md#business_account_audiences_shared_accounts_list) | **GET** /businesses/{business_id}/audiences/shared/accounts | List accounts with access to an audience owned by a business +[**shared_audiences_for_business_list**](AudienceSharingApi.md#shared_audiences_for_business_list) | **GET** /businesses/{business_id}/audiences | List received audiences for a business +[**update_ad_account_to_ad_account_shared_audience**](AudienceSharingApi.md#update_ad_account_to_ad_account_shared_audience) | **PATCH** /ad_accounts/{ad_account_id}/audiences/ad_accounts/shared | Update audience sharing between ad accounts +[**update_ad_account_to_business_shared_audience**](AudienceSharingApi.md#update_ad_account_to_business_shared_audience) | **PATCH** /ad_accounts/{ad_account_id}/audiences/businesses/shared | Update audience sharing from an ad account to businesses +[**update_business_to_ad_account_shared_audience**](AudienceSharingApi.md#update_business_to_ad_account_shared_audience) | **PATCH** /businesses/{business_id}/audiences/ad_accounts/shared | Update audience sharing from a business to ad accounts +[**update_business_to_business_shared_audience**](AudienceSharingApi.md#update_business_to_business_shared_audience) | **PATCH** /businesses/{business_id}/audiences/businesses/shared | Update audience sharing between businesses + + +# **ad_accounts_audiences_shared_accounts_list** +> bool, date, datetime, dict, float, int, list, str, none_type ad_accounts_audiences_shared_accounts_list(ad_account_id, audience_id, account_type) + +List accounts with access to an audience owned by an ad account + +List all ad accounts and/or businesses that have access to a specific audience. The audience must be owned by the requesting ad account. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import audience_sharing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.shared_audience_account import SharedAudienceAccount +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.audience_account_type import AudienceAccountType +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = audience_sharing_api.AudienceSharingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + audience_id = "4" # str | Unique identifier of the audience to use to filter the results. + account_type = AudienceAccountType("AD_ACCOUNT") # AudienceAccountType | Filter accounts by account type. + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + + # example passing only required values which don't have defaults set + try: + # List accounts with access to an audience owned by an ad account + api_response = api_instance.ad_accounts_audiences_shared_accounts_list(ad_account_id, audience_id, account_type) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AudienceSharingApi->ad_accounts_audiences_shared_accounts_list: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List accounts with access to an audience owned by an ad account + api_response = api_instance.ad_accounts_audiences_shared_accounts_list(ad_account_id, audience_id, account_type, page_size=page_size, bookmark=bookmark) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AudienceSharingApi->ad_accounts_audiences_shared_accounts_list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **audience_id** | **str**| Unique identifier of the audience to use to filter the results. | + **account_type** | **AudienceAccountType**| Filter accounts by account type. | + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account audiences shared accounts parameters. | - | +**404** | Shared accounts not found. | - | +**0** | Unexpected error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **business_account_audiences_shared_accounts_list** +> bool, date, datetime, dict, float, int, list, str, none_type business_account_audiences_shared_accounts_list(business_id, audience_id, account_type) + +List accounts with access to an audience owned by a business + +List all ad accounts and/or businesses that have access to a specific audience. The audience must either be owned by an ad account in the requesting business, or it must have been shared with the requesting business. If the requesting business is not the owner of the audience, only ad accounts owned by the requesting business will be returned. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import audience_sharing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.shared_audience_account import SharedAudienceAccount +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.audience_account_type import AudienceAccountType +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = audience_sharing_api.AudienceSharingApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + audience_id = "4" # str | Unique identifier of the audience to use to filter the results. + account_type = AudienceAccountType("AD_ACCOUNT") # AudienceAccountType | Filter accounts by account type. + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + + # example passing only required values which don't have defaults set + try: + # List accounts with access to an audience owned by a business + api_response = api_instance.business_account_audiences_shared_accounts_list(business_id, audience_id, account_type) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AudienceSharingApi->business_account_audiences_shared_accounts_list: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List accounts with access to an audience owned by a business + api_response = api_instance.business_account_audiences_shared_accounts_list(business_id, audience_id, account_type, page_size=page_size, bookmark=bookmark) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AudienceSharingApi->business_account_audiences_shared_accounts_list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **audience_id** | **str**| Unique identifier of the audience to use to filter the results. | + **account_type** | **AudienceAccountType**| Filter accounts by account type. | + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid business audiences shared accounts parameters. | - | +**404** | Shared accounts not found. | - | +**0** | Unexpected error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **shared_audiences_for_business_list** +> bool, date, datetime, dict, float, int, list, str, none_type shared_audiences_for_business_list(business_id) + +List received audiences for a business + +Get a list of received audiences for the given business. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import audience_sharing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.audience import Audience +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = audience_sharing_api.AudienceSharingApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + try: + # List received audiences for a business + api_response = api_instance.shared_audiences_for_business_list(business_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AudienceSharingApi->shared_audiences_for_business_list: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List received audiences for a business + api_response = api_instance.shared_audiences_for_business_list(business_id, bookmark=bookmark, order=order, page_size=page_size) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AudienceSharingApi->shared_audiences_for_business_list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid parameters. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_ad_account_to_ad_account_shared_audience** +> SharedAudienceResponse update_ad_account_to_ad_account_shared_audience(ad_account_id, shared_audience) + +Update audience sharing between ad accounts + +From an ad account, share a specific audience with another ad account, or revoke access to a previously shared audience. Only the audience owner account can share the audience. The recipient ad account(s) must be in the same Pinterest Business Hierarchy as the business owner of the ad account.
This endpoint is not available to all apps.Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import audience_sharing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.shared_audience_response import SharedAudienceResponse +from openapi_generated.pinterest_client.model.shared_audience import SharedAudience +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = audience_sharing_api.AudienceSharingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + shared_audience = SharedAudience() # SharedAudience | + + # example passing only required values which don't have defaults set + try: + # Update audience sharing between ad accounts + api_response = api_instance.update_ad_account_to_ad_account_shared_audience(ad_account_id, shared_audience) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AudienceSharingApi->update_ad_account_to_ad_account_shared_audience: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **shared_audience** | [**SharedAudience**](SharedAudience.md)| | + +### Return type + +[**SharedAudienceResponse**](SharedAudienceResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account id. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_ad_account_to_business_shared_audience** +> BusinessSharedAudienceResponse update_ad_account_to_business_shared_audience(ad_account_id, business_shared_audience) + +Update audience sharing from an ad account to businesses + +From an ad account, share a specific audience with a business account, or revoke access to a previously shared audience. Only the audience owner account can share the audience. The recipient business account must be in the same business hierarchy as the business owner of the ad account.
This endpoint is not available to all apps.Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import audience_sharing_api +from openapi_generated.pinterest_client.model.business_shared_audience import BusinessSharedAudience +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.business_shared_audience_response import BusinessSharedAudienceResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = audience_sharing_api.AudienceSharingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + business_shared_audience = BusinessSharedAudience() # BusinessSharedAudience | + + # example passing only required values which don't have defaults set + try: + # Update audience sharing from an ad account to businesses + api_response = api_instance.update_ad_account_to_business_shared_audience(ad_account_id, business_shared_audience) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AudienceSharingApi->update_ad_account_to_business_shared_audience: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **business_shared_audience** | [**BusinessSharedAudience**](BusinessSharedAudience.md)| | + +### Return type + +[**BusinessSharedAudienceResponse**](BusinessSharedAudienceResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account id. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_business_to_ad_account_shared_audience** +> SharedAudienceResponse update_business_to_ad_account_shared_audience(business_id, shared_audience) + +Update audience sharing from a business to ad accounts + +From a business, share a specific audience with other ad account(s), or revoke access to a previously shared audience.

This endpoint is not available to all apps.Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import audience_sharing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.shared_audience_response import SharedAudienceResponse +from openapi_generated.pinterest_client.model.shared_audience import SharedAudience +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = audience_sharing_api.AudienceSharingApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + shared_audience = SharedAudience() # SharedAudience | + + # example passing only required values which don't have defaults set + try: + # Update audience sharing from a business to ad accounts + api_response = api_instance.update_business_to_ad_account_shared_audience(business_id, shared_audience) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AudienceSharingApi->update_business_to_ad_account_shared_audience: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **shared_audience** | [**SharedAudience**](SharedAudience.md)| | + +### Return type + +[**SharedAudienceResponse**](SharedAudienceResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid parameters. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_business_to_business_shared_audience** +> BusinessSharedAudienceResponse update_business_to_business_shared_audience(business_id, business_shared_audience) + +Update audience sharing between businesses + +From a business, share a specific audience with another business account, or revoke access to a previously shared audience. Only the audience owner can share the audience with other businesses, and the recipient business must be within the same business hierarchy.
This endpoint is not available to all apps.Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import audience_sharing_api +from openapi_generated.pinterest_client.model.business_shared_audience import BusinessSharedAudience +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.business_shared_audience_response import BusinessSharedAudienceResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = audience_sharing_api.AudienceSharingApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + business_shared_audience = BusinessSharedAudience() # BusinessSharedAudience | + + # example passing only required values which don't have defaults set + try: + # Update audience sharing between businesses + api_response = api_instance.update_business_to_business_shared_audience(business_id, business_shared_audience) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling AudienceSharingApi->update_business_to_business_shared_audience: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **business_shared_audience** | [**BusinessSharedAudience**](BusinessSharedAudience.md)| | + +### Return type + +[**BusinessSharedAudienceResponse**](BusinessSharedAudienceResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid parameters. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AudienceSubcategory.md b/docs/AudienceSubcategory.md new file mode 100644 index 0000000..a0d4bb6 --- /dev/null +++ b/docs/AudienceSubcategory.md @@ -0,0 +1,16 @@ +# AudienceSubcategory + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **str** | Interest unique key (same as ID). | [optional] +**name** | **str** | Subinterest name. | [optional] +**ratio** | **float** | Subinterest's percent of category's total audience. | [optional] +**index** | **float** | Subinterest affinity index. | [optional] +**id** | **str** | Subinterest ID. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AudienceType.md b/docs/AudienceType.md index 66a829f..bbf99c2 100644 --- a/docs/AudienceType.md +++ b/docs/AudienceType.md @@ -5,7 +5,7 @@ Audience type ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Audience type | must be one of ["CUSTOMER_LIST", "VISITOR", "ENGAGEMENT", "ACTALIKE", ] +**value** | **str** | Audience type | must be one of ["CUSTOMER_LIST", "VISITOR", "ENGAGEMENT", "ACTALIKE", "PERSONA", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AudiencesApi.md b/docs/AudiencesApi.md index c46a867..bd92d48 100644 --- a/docs/AudiencesApi.md +++ b/docs/AudiencesApi.md @@ -277,6 +277,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import audiences_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.audience import Audience from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -301,8 +302,9 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: api_instance = audiences_api.AudiencesApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. For received audiences, it is sorted by sharing event time. Note that higher-value IDs are associated with more-recently added items. (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + ownership_type = "OWNED" # str | Filter audiences by ownership type. (optional) if omitted the server will use the default value of "OWNED" # example passing only required values which don't have defaults set try: @@ -316,7 +318,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # and optional values try: # List audiences - api_response = api_instance.audiences_list(ad_account_id, bookmark=bookmark, order=order, page_size=page_size) + api_response = api_instance.audiences_list(ad_account_id, bookmark=bookmark, order=order, page_size=page_size, ownership_type=ownership_type) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling AudiencesApi->audiences_list: %s\n" % e) @@ -329,8 +331,9 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ad_account_id** | **str**| Unique identifier of an ad account. | **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. For received audiences, it is sorted by sharing event time. Note that higher-value IDs are associated with more-recently added items. | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **ownership_type** | **str**| Filter audiences by ownership type. | [optional] if omitted the server will use the default value of "OWNED" ### Return type @@ -398,7 +401,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: api_instance = audiences_api.AudiencesApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. audience_id = "4" # str | Unique identifier of an audience - audience_update_request = AudienceUpdateRequest(None) # AudienceUpdateRequest | The audience to be updated. (optional) + audience_update_request = AudienceUpdateRequest() # AudienceUpdateRequest | The audience to be updated. (optional) # example passing only required values which don't have defaults set try: diff --git a/docs/AuthRespondInvitesBody.md b/docs/AuthRespondInvitesBody.md new file mode 100644 index 0000000..898170d --- /dev/null +++ b/docs/AuthRespondInvitesBody.md @@ -0,0 +1,13 @@ +# AuthRespondInvitesBody + +An object with a list of all the invites the user would like to respond to and the action to take. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invites** | [**[AuthRespondInvitesBodyInvites]**](AuthRespondInvitesBodyInvites.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthRespondInvitesBodyAction.md b/docs/AuthRespondInvitesBodyAction.md new file mode 100644 index 0000000..2baefd9 --- /dev/null +++ b/docs/AuthRespondInvitesBodyAction.md @@ -0,0 +1,13 @@ +# AuthRespondInvitesBodyAction + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accept_invite** | **bool** | Whether the invite/request is accepted. | +**asset_id_to_permissions** | [**AssetIdToPermissions**](AssetIdToPermissions.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthRespondInvitesBodyInvites.md b/docs/AuthRespondInvitesBodyInvites.md new file mode 100644 index 0000000..7fc621e --- /dev/null +++ b/docs/AuthRespondInvitesBodyInvites.md @@ -0,0 +1,13 @@ +# AuthRespondInvitesBodyInvites + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | [**AuthRespondInvitesBodyAction**](AuthRespondInvitesBodyAction.md) | | +**invite_id** | **str** | Unique identifier of an invite. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseInviteDataResponse.md b/docs/BaseInviteDataResponse.md new file mode 100644 index 0000000..f40c230 --- /dev/null +++ b/docs/BaseInviteDataResponse.md @@ -0,0 +1,15 @@ +# BaseInviteDataResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the invite/request. | [optional] +**invite_data** | [**BaseInviteDataResponseInviteData**](BaseInviteDataResponseInviteData.md) | | [optional] +**is_received_invite** | **bool** | Indicates whether the invite/request was received. | [optional] +**user** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Metadata for the member/partner that was sent the invite/request. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseInviteDataResponseInviteData.md b/docs/BaseInviteDataResponseInviteData.md new file mode 100644 index 0000000..75f39e9 --- /dev/null +++ b/docs/BaseInviteDataResponseInviteData.md @@ -0,0 +1,17 @@ +# BaseInviteDataResponseInviteData + +Metadata for the invite/request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_expiration** | **int** | The date and time when the invite/request will expire. Returned in milliseconds. | [optional] +**invite_status** | **str** | The current status of the invite. The invite can be in one of the following states PENDING, ACCEPTED, DECLINED, CANCELLED, EXPIRED. | [optional] +**invite_type** | **str** | The type of invite. <br>'MEMBER_INVITE' is to invite a member to access your business assets. <br>'PARTNER_INVITE' is to invite a partner to access your business assets. <br>'PARTNER_REQUEST' is to request access a partner's business assets. | [optional] +**last_updated_time** | **int** | The date and time the invite/request was last updated. Returned in milliseconds. | [optional] +**sent_at** | **int** | The date and time the invite/request was sent/created. Returned in milliseconds. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BatchOperation.md b/docs/BatchOperation.md index cffb308..af081d4 100644 --- a/docs/BatchOperation.md +++ b/docs/BatchOperation.md @@ -5,7 +5,7 @@ The operation performed by the batch. The DELETE_DISCONTINUED operation only upd ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The operation performed by the batch. The DELETE_DISCONTINUED operation only updates availablity to \"Out of Stock\". | must be one of ["UPDATE", "CREATE", "DELETE_DISCONTINUED", "DELETE", ] +**value** | **str** | The operation performed by the batch. The DELETE_DISCONTINUED operation only updates availablity to \"Out of Stock\". | must be one of ["UPDATE", "UPSERT", "CREATE", "DELETE_DISCONTINUED", "DELETE", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BatchOperationStatus.md b/docs/BatchOperationStatus.md index 2fa656a..22ce7fc 100644 --- a/docs/BatchOperationStatus.md +++ b/docs/BatchOperationStatus.md @@ -5,7 +5,7 @@ The status of the operation performed by the batch ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The status of the operation performed by the batch | must be one of ["PROCESSING", "COMPLETED", ] +**value** | **str** | The status of the operation performed by the batch | must be one of ["PROCESSING", "COMPLETED", "FAILED", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BillingApi.md b/docs/BillingApi.md new file mode 100644 index 0000000..841b40f --- /dev/null +++ b/docs/BillingApi.md @@ -0,0 +1,818 @@ +# openapi_generated.pinterest_client.BillingApi + +All URIs are relative to *https://api.pinterest.com/v5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ads_credit_redeem**](BillingApi.md#ads_credit_redeem) | **POST** /ad_accounts/{ad_account_id}/ads_credit/redeem | Redeem ad credits +[**ads_credits_discounts_get**](BillingApi.md#ads_credits_discounts_get) | **GET** /ad_accounts/{ad_account_id}/ads_credit/discounts | Get ads credit discounts +[**billing_profiles_get**](BillingApi.md#billing_profiles_get) | **GET** /ad_accounts/{ad_account_id}/billing_profiles | Get billing profiles +[**ssio_accounts_get**](BillingApi.md#ssio_accounts_get) | **GET** /ad_accounts/{ad_account_id}/ssio/accounts | Get Salesforce account details including bill-to information. +[**ssio_insertion_order_create**](BillingApi.md#ssio_insertion_order_create) | **POST** /ad_accounts/{ad_account_id}/ssio/insertion_orders | Create insertion order through SSIO. +[**ssio_insertion_order_edit**](BillingApi.md#ssio_insertion_order_edit) | **PATCH** /ad_accounts/{ad_account_id}/ssio/insertion_orders | Edit insertion order through SSIO. +[**ssio_insertion_orders_status_get_by_ad_account**](BillingApi.md#ssio_insertion_orders_status_get_by_ad_account) | **GET** /ad_accounts/{ad_account_id}/ssio/insertion_orders/status | Get insertion order status by ad account id. +[**ssio_insertion_orders_status_get_by_pin_order_id**](BillingApi.md#ssio_insertion_orders_status_get_by_pin_order_id) | **GET** /ad_accounts/{ad_account_id}/ssio/insertion_orders/{pin_order_id}/status | Get insertion order status by pin order id. +[**ssio_order_lines_get_by_ad_account**](BillingApi.md#ssio_order_lines_get_by_ad_account) | **GET** /ad_accounts/{ad_account_id}/ssio/order_lines | Get Salesforce order lines by ad account id. + + +# **ads_credit_redeem** +> AdsCreditRedeemResponse ads_credit_redeem(ad_account_id, ads_credit_redeem_request) + +Redeem ad credits + +Redeem ads credit on behalf of the ad account id and apply it towards billing. This endpoint might not be available to all apps. Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import billing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.ads_credit_redeem_request import AdsCreditRedeemRequest +from openapi_generated.pinterest_client.model.ads_credit_redeem_response import AdsCreditRedeemResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_api.BillingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + ads_credit_redeem_request = AdsCreditRedeemRequest( + offer_code_hash="138e9e0ff7e38cf511b880975eb574c09aa9d5e1657590ab0431040da68caa67", + validate_only=True, + ) # AdsCreditRedeemRequest | Redeem ad credits request. + + # example passing only required values which don't have defaults set + try: + # Redeem ad credits + api_response = api_instance.ads_credit_redeem(ad_account_id, ads_credit_redeem_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ads_credit_redeem: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **ads_credit_redeem_request** | [**AdsCreditRedeemRequest**](AdsCreditRedeemRequest.md)| Redeem ad credits request. | + +### Return type + +[**AdsCreditRedeemResponse**](AdsCreditRedeemResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully redeemed ad credits. | - | +**400** | Error thrown when unable to redeem offer code. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ads_credits_discounts_get** +> bool, date, datetime, dict, float, int, list, str, none_type ads_credits_discounts_get(ad_account_id) + +Get ads credit discounts + +Returns the list of discounts applied to the account. This endpoint might not be available to all apps. Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import billing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.ads_credit_discounts_response import AdsCreditDiscountsResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_api.BillingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + try: + # Get ads credit discounts + api_response = api_instance.ads_credits_discounts_get(ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ads_credits_discounts_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get ads credit discounts + api_response = api_instance.ads_credits_discounts_get(ad_account_id, bookmark=bookmark, page_size=page_size) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ads_credits_discounts_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **billing_profiles_get** +> bool, date, datetime, dict, float, int, list, str, none_type billing_profiles_get(ad_account_id, is_active) + +Get billing profiles + +Get billing profiles in the advertiser account. This endpoint might not be available to all apps. Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import billing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.billing_profiles_response import BillingProfilesResponse +from openapi_generated.pinterest_client.model.paginated import Paginated +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_api.BillingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + is_active = True # bool | Return active billing profiles, if false return all billing profiles. + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + try: + # Get billing profiles + api_response = api_instance.billing_profiles_get(ad_account_id, is_active) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->billing_profiles_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get billing profiles + api_response = api_instance.billing_profiles_get(ad_account_id, is_active, bookmark=bookmark, page_size=page_size) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->billing_profiles_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **is_active** | **bool**| Return active billing profiles, if false return all billing profiles. | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ssio_accounts_get** +> SSIOAccountResponse ssio_accounts_get(ad_account_id) + +Get Salesforce account details including bill-to information. + +Get Salesforce account details including bill-to information to be used in insertion orders process for ad_account_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import billing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.ssio_account_response import SSIOAccountResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_api.BillingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + + # example passing only required values which don't have defaults set + try: + # Get Salesforce account details including bill-to information. + api_response = api_instance.ssio_accounts_get(ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ssio_accounts_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + +### Return type + +[**SSIOAccountResponse**](SSIOAccountResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid request parameter. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ssio_insertion_order_create** +> SSIOCreateInsertionOrderResponse ssio_insertion_order_create(ad_account_id, ssio_create_insertion_order_request) + +Create insertion order through SSIO. + +Create insertion order through SSIO for ad_account_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import billing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.ssio_create_insertion_order_request import SSIOCreateInsertionOrderRequest +from openapi_generated.pinterest_client.model.ssio_create_insertion_order_response import SSIOCreateInsertionOrderResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_api.BillingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + ssio_create_insertion_order_request = SSIOCreateInsertionOrderRequest() # SSIOCreateInsertionOrderRequest | Order line to create. + + # example passing only required values which don't have defaults set + try: + # Create insertion order through SSIO. + api_response = api_instance.ssio_insertion_order_create(ad_account_id, ssio_create_insertion_order_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ssio_insertion_order_create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **ssio_create_insertion_order_request** | [**SSIOCreateInsertionOrderRequest**](SSIOCreateInsertionOrderRequest.md)| Order line to create. | + +### Return type + +[**SSIOCreateInsertionOrderResponse**](SSIOCreateInsertionOrderResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid request. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ssio_insertion_order_edit** +> SSIOEditInsertionOrderResponse ssio_insertion_order_edit(ad_account_id, ssio_edit_insertion_order_request) + +Edit insertion order through SSIO. + +Edit insertion order through SSIO for ad_account_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import billing_api +from openapi_generated.pinterest_client.model.ssio_edit_insertion_order_response import SSIOEditInsertionOrderResponse +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.ssio_edit_insertion_order_request import SSIOEditInsertionOrderRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_api.BillingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + ssio_edit_insertion_order_request = SSIOEditInsertionOrderRequest() # SSIOEditInsertionOrderRequest | Order line to create. + + # example passing only required values which don't have defaults set + try: + # Edit insertion order through SSIO. + api_response = api_instance.ssio_insertion_order_edit(ad_account_id, ssio_edit_insertion_order_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ssio_insertion_order_edit: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **ssio_edit_insertion_order_request** | [**SSIOEditInsertionOrderRequest**](SSIOEditInsertionOrderRequest.md)| Order line to create. | + +### Return type + +[**SSIOEditInsertionOrderResponse**](SSIOEditInsertionOrderResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid request. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ssio_insertion_orders_status_get_by_ad_account** +> bool, date, datetime, dict, float, int, list, str, none_type ssio_insertion_orders_status_get_by_ad_account(ad_account_id) + +Get insertion order status by ad account id. + +Get insertion order status for account id ad_account_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import billing_api +from openapi_generated.pinterest_client.model.ssio_insertion_order_status import SSIOInsertionOrderStatus +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_api.BillingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + try: + # Get insertion order status by ad account id. + api_response = api_instance.ssio_insertion_orders_status_get_by_ad_account(ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ssio_insertion_orders_status_get_by_ad_account: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get insertion order status by ad account id. + api_response = api_instance.ssio_insertion_orders_status_get_by_ad_account(ad_account_id, bookmark=bookmark, page_size=page_size) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ssio_insertion_orders_status_get_by_ad_account: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid request parameter. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ssio_insertion_orders_status_get_by_pin_order_id** +> SSIOInsertionOrderStatusResponse ssio_insertion_orders_status_get_by_pin_order_id(ad_account_id, pin_order_id) + +Get insertion order status by pin order id. + +Get insertion order status for pin order id pin_order_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import billing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.ssio_insertion_order_status_response import SSIOInsertionOrderStatusResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_api.BillingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + pin_order_id = "0Q01N0000015hekSVDFDC" # str | The pin order id associated with the ssio insertion order + + # example passing only required values which don't have defaults set + try: + # Get insertion order status by pin order id. + api_response = api_instance.ssio_insertion_orders_status_get_by_pin_order_id(ad_account_id, pin_order_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ssio_insertion_orders_status_get_by_pin_order_id: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **pin_order_id** | **str**| The pin order id associated with the ssio insertion order | + +### Return type + +[**SSIOInsertionOrderStatusResponse**](SSIOInsertionOrderStatusResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid request parameter. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ssio_order_lines_get_by_ad_account** +> bool, date, datetime, dict, float, int, list, str, none_type ssio_order_lines_get_by_ad_account(ad_account_id) + +Get Salesforce order lines by ad account id. + +Get Salesforce order lines for account id ad_account_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import billing_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.ssio_order_line import SSIOOrderLine +from openapi_generated.pinterest_client.model.paginated import Paginated +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_api.BillingApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + pin_order_id = "0Q01N0000015hekSVDFDC" # str | The pin order id associated with the ssio insertino order (optional) + + # example passing only required values which don't have defaults set + try: + # Get Salesforce order lines by ad account id. + api_response = api_instance.ssio_order_lines_get_by_ad_account(ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ssio_order_lines_get_by_ad_account: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get Salesforce order lines by ad account id. + api_response = api_instance.ssio_order_lines_get_by_ad_account(ad_account_id, bookmark=bookmark, page_size=page_size, pin_order_id=pin_order_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BillingApi->ssio_order_lines_get_by_ad_account: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **pin_order_id** | **str**| The pin order id associated with the ssio insertino order | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid request parameter. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BillingProfilesResponse.md b/docs/BillingProfilesResponse.md new file mode 100644 index 0000000..60d22b6 --- /dev/null +++ b/docs/BillingProfilesResponse.md @@ -0,0 +1,16 @@ +# BillingProfilesResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Billing ID. | [optional] +**card_type** | **str** | Type of the card. | [optional] +**status** | **str** | Status of the billing. | [optional] +**advertiser_id** | **str** | Advertiser ID of the billing. | [optional] +**payment_method_brand** | **str** | Brand of the payment method. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BoardSection.md b/docs/BoardSection.md index b331562..d8ab590 100644 --- a/docs/BoardSection.md +++ b/docs/BoardSection.md @@ -5,8 +5,8 @@ Sections help organize pins within a board. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**name** | **str** | | **id** | **str** | | [optional] [readonly] -**name** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BoardsApi.md b/docs/BoardsApi.md index 8b5451c..4b16f89 100644 --- a/docs/BoardsApi.md +++ b/docs/BoardsApi.md @@ -218,6 +218,7 @@ Get a list of all board sections from a board owned by the \"operation user_acco ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -226,6 +227,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import boards_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.board_section import BoardSection from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -238,6 +240,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -251,7 +259,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: board_id = "4" # str | Unique identifier of a board. ad_account_id = "4" # str | Unique identifier of an ad account. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set try: @@ -279,7 +287,7 @@ Name | Type | Description | Notes **board_id** | **str**| Unique identifier of a board. | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 ### Return type @@ -287,7 +295,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -313,6 +321,7 @@ Get a list of the Pins on a board section of a board owned by the \"operation us ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -320,6 +329,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import boards_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.pin import Pin from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -333,6 +343,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -347,7 +363,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: section_id = "4" # str | Unique identifier of a board section. ad_account_id = "4" # str | Unique identifier of an ad account. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set try: @@ -376,7 +392,7 @@ Name | Type | Description | Notes **section_id** | **str**| Unique identifier of a board section. | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 ### Return type @@ -384,7 +400,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -701,6 +717,7 @@ Get a board owned by the operation user_account - or a group board that has been ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -721,6 +738,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -766,7 +789,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -793,6 +816,7 @@ Get a list of the boards owned by the \"operation user_account\" + group boards ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -800,6 +824,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import boards_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.board import Board from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -813,6 +838,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -825,8 +856,8 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: api_instance = boards_api.BoardsApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 - privacy = "PUBLIC" # str | Privacy setting for a board. (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + privacy = "ALL" # str | Privacy setting for a board. (optional) # example passing only required values which don't have defaults set # and optional values @@ -845,7 +876,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **privacy** | **str**| Privacy setting for a board. | [optional] ### Return type @@ -854,7 +885,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -880,6 +911,7 @@ Get a list of the Pins on a board owned by the \"operation user_account\" - or o ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -887,6 +919,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import boards_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.pin import Pin from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -900,6 +933,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -912,11 +951,12 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: api_instance = boards_api.BoardsApi(api_client) board_id = "4" # str | Unique identifier of a board. bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 creative_types = [ "REGULAR", ] # [str] | Pin creative types filter.

Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead. (optional) ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + pin_metrics = False # bool | Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. (optional) if omitted the server will use the default value of False # example passing only required values which don't have defaults set try: @@ -930,7 +970,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # and optional values try: # List Pins on board - api_response = api_instance.boards_list_pins(board_id, bookmark=bookmark, page_size=page_size, creative_types=creative_types, ad_account_id=ad_account_id) + api_response = api_instance.boards_list_pins(board_id, bookmark=bookmark, page_size=page_size, creative_types=creative_types, ad_account_id=ad_account_id, pin_metrics=pin_metrics) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling BoardsApi->boards_list_pins: %s\n" % e) @@ -943,9 +983,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **board_id** | **str**| Unique identifier of a board. | **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **creative_types** | **[str]**| Pin creative types filter. </p><strong>Note:</strong> SHOP_THE_PIN has been deprecated. Please use COLLECTION instead. | [optional] **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + **pin_metrics** | **bool**| Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before <code>2023-03-20</code> lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. | [optional] if omitted the server will use the default value of False ### Return type @@ -953,7 +994,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers diff --git a/docs/BudgetType.md b/docs/BudgetType.md index 605b706..907af12 100644 --- a/docs/BudgetType.md +++ b/docs/BudgetType.md @@ -1,11 +1,11 @@ # BudgetType -Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed. +Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed. For update, only draft ad groups may update budget type. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed. | must be one of ["DAILY", "LIFETIME", "CBO_ADGROUP", ] +**value** | **str** | Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed. For update, only draft ad groups may update budget type. | must be one of ["DAILY", "LIFETIME", "CBO_ADGROUP", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BulkApi.md b/docs/BulkApi.md index 72d69e2..96e6640 100644 --- a/docs/BulkApi.md +++ b/docs/BulkApi.md @@ -151,6 +151,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: api_instance = bulk_api.BulkApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. bulk_request_id = "bulk_request_id_example" # str | Unique identifier of a bulk upsert request. + include_details = False # bool | if set to True then attach the errors/details to all the requests (optional) if omitted the server will use the default value of False # example passing only required values which don't have defaults set try: @@ -159,6 +160,15 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling BulkApi->bulk_request_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Download advertiser entities in bulk + api_response = api_instance.bulk_request_get(ad_account_id, bulk_request_id, include_details=include_details) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BulkApi->bulk_request_get: %s\n" % e) ``` @@ -168,6 +178,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ad_account_id** | **str**| Unique identifier of an ad account. | **bulk_request_id** | **str**| Unique identifier of a bulk upsert request. | + **include_details** | **bool**| if set to True then attach the errors/details to all the requests | [optional] if omitted the server will use the default value of False ### Return type @@ -239,34 +250,16 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: CampaignCreateRequest(), ], ad_groups=[ - AdGroupCreateRequest(None), + AdGroupCreateRequest(), ], ads=[ - AdCreateRequest(None), + AdCreateRequest(), ], product_groups=[ ProductGroupPromotionCreateRequest( ad_group_id="2680059592705", product_group_promotion=[ - ProductGroupPromotion( - id="2680059592705", - ad_group_id="2680059592705", - bid_in_micro_currency=14000000, - included=True, - definition="*/product_type_0='kitchen'/product_type_1='beverage appliances'", - relative_definition="product_type_1='beverage appliances'", - parent_id="1231234", - slideshow_collections_title="slideshow title", - slideshow_collections_description="slideshow description", - is_mdl=True, - status=EntityStatus("ACTIVE"), - tracking_url="https://www.pinterest.com", - catalog_product_group_id="1231235", - catalog_product_group_name="catalogProductGroupName", - creative_type=CreativeType("REGULAR"), - collections_hero_pin_id="123123", - collections_hero_destination_url="http://www.pinterest.com", - ), + ProductGroupPromotionCreateRequestElement(), ], ), ], @@ -274,7 +267,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: KeywordsRequest( keywords=[ KeywordsCommon( - bid=200000, + bid=1, match_type=MatchTypeResponse("BROAD"), value="value_example", ), @@ -288,10 +281,10 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: CampaignUpdateRequest(), ], ad_groups=[ - AdGroupUpdateRequest(None), + AdGroupUpdateRequest(), ], ads=[ - AdUpdateRequest(None), + AdUpdateRequest(), ], product_groups=[ ProductGroupPromotionUpdateRequest( @@ -312,9 +305,9 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: tracking_url="https://www.pinterest.com", catalog_product_group_id="1231235", catalog_product_group_name="catalogProductGroupName", - creative_type=CreativeType("REGULAR"), collections_hero_pin_id="123123", collections_hero_destination_url="http://www.pinterest.com", + grid_click_type=GridClickType("CLOSEUP"), ), ], ), @@ -323,7 +316,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: KeywordUpdate( id="2886364308355", archived=False, - bid=200000, + bid=1, ), ], ), diff --git a/docs/BulkPinAnalyticsResponse.md b/docs/BulkPinAnalyticsResponse.md new file mode 100644 index 0000000..d2ef60c --- /dev/null +++ b/docs/BulkPinAnalyticsResponse.md @@ -0,0 +1,11 @@ +# BulkPinAnalyticsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | [**PinAnalyticsResponse**](PinAnalyticsResponse.md) | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessAccessAssetsApi.md b/docs/BusinessAccessAssetsApi.md new file mode 100644 index 0000000..8bf69c7 --- /dev/null +++ b/docs/BusinessAccessAssetsApi.md @@ -0,0 +1,1169 @@ +# openapi_generated.pinterest_client.BusinessAccessAssetsApi + +All URIs are relative to *https://api.pinterest.com/v5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**asset_group_create**](BusinessAccessAssetsApi.md#asset_group_create) | **POST** /businesses/{business_id}/asset_groups | Create a new asset group. +[**asset_group_delete**](BusinessAccessAssetsApi.md#asset_group_delete) | **DELETE** /businesses/{business_id}/asset_groups | Delete asset groups. +[**asset_group_update**](BusinessAccessAssetsApi.md#asset_group_update) | **PATCH** /businesses/{business_id}/asset_groups | Update asset groups. +[**business_asset_members_get**](BusinessAccessAssetsApi.md#business_asset_members_get) | **GET** /businesses/{business_id}/assets/{asset_id}/members | Get members with access to asset +[**business_asset_partners_get**](BusinessAccessAssetsApi.md#business_asset_partners_get) | **GET** /businesses/{business_id}/assets/{asset_id}/partners | Get partners with access to asset +[**business_assets_get**](BusinessAccessAssetsApi.md#business_assets_get) | **GET** /businesses/{business_id}/assets | List business assets +[**business_member_assets_get**](BusinessAccessAssetsApi.md#business_member_assets_get) | **GET** /businesses/{business_id}/members/{member_id}/assets | Get assets assigned to a member +[**business_members_asset_access_delete**](BusinessAccessAssetsApi.md#business_members_asset_access_delete) | **DELETE** /businesses/{business_id}/members/assets/access | Delete member access to asset +[**business_members_asset_access_update**](BusinessAccessAssetsApi.md#business_members_asset_access_update) | **PATCH** /businesses/{business_id}/members/assets/access | Assign/Update member asset permissions +[**business_partner_asset_access_get**](BusinessAccessAssetsApi.md#business_partner_asset_access_get) | **GET** /businesses/{business_id}/partners/{partner_id}/assets | Get assets assigned to a partner or assets assigned by a partner +[**delete_partner_asset_access_handler_impl**](BusinessAccessAssetsApi.md#delete_partner_asset_access_handler_impl) | **DELETE** /businesses/{business_id}/partners/assets | Delete partner access to asset +[**update_partner_asset_access_handler_impl**](BusinessAccessAssetsApi.md#update_partner_asset_access_handler_impl) | **PATCH** /businesses/{business_id}/partners/assets | Assign/Update partner asset permissions + + +# **asset_group_create** +> CreateAssetGroupResponse asset_group_create(business_id, create_asset_group_body) + +Create a new asset group. + +Create a new asset group with the specified parameters. - An asset group is a custom group of assets based on how you’d like to manage your accounts. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.create_asset_group_response import CreateAssetGroupResponse +from openapi_generated.pinterest_client.model.create_asset_group_body import CreateAssetGroupBody +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + create_asset_group_body = CreateAssetGroupBody( + asset_group_name="Canada Ad Accounts", + asset_group_description="Asset groups that has ad accounts shared in Canada", + asset_group_types=AssetGroupTypes([ + AssetGroupType("["BRAND","LOCATION_OR_LANGUAGE","PRODUCT_LINE","OTHER"]"), + ]), + ) # CreateAssetGroupBody | + + # example passing only required values which don't have defaults set + try: + # Create a new asset group. + api_response = api_instance.asset_group_create(business_id, create_asset_group_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->asset_group_create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **create_asset_group_body** | [**CreateAssetGroupBody**](CreateAssetGroupBody.md)| | + +### Return type + +[**CreateAssetGroupResponse**](CreateAssetGroupResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid parameters. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **asset_group_delete** +> DeleteAssetGroupResponse asset_group_delete(business_id, delete_asset_group_body) + +Delete asset groups. + +Delete a batch of asset groups. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.delete_asset_group_body import DeleteAssetGroupBody +from openapi_generated.pinterest_client.model.delete_asset_group_response import DeleteAssetGroupResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + delete_asset_group_body = DeleteAssetGroupBody( + asset_groups_to_delete=["666791336903426391","666791336903426392"], + ) # DeleteAssetGroupBody | + + # example passing only required values which don't have defaults set + try: + # Delete asset groups. + api_response = api_instance.asset_group_delete(business_id, delete_asset_group_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->asset_group_delete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **delete_asset_group_body** | [**DeleteAssetGroupBody**](DeleteAssetGroupBody.md)| | + +### Return type + +[**DeleteAssetGroupResponse**](DeleteAssetGroupResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid parameters. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **asset_group_update** +> UpdateAssetGroupResponse asset_group_update(business_id, update_asset_group_body) + +Update asset groups. + +Update a batch of asset groups with the specified parameters. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.update_asset_group_body import UpdateAssetGroupBody +from openapi_generated.pinterest_client.model.update_asset_group_response import UpdateAssetGroupResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + update_asset_group_body = UpdateAssetGroupBody( + asset_groups_to_update=[ + UpdateAssetGroupBodyAssetGroupsToUpdate( + asset_group_id="666791336903426391", + name="Canada Ad Accounts", + description="Asset groups that has ad accounts shared in Canada", + asset_group_types=AssetGroupTypes([ + AssetGroupType("["BRAND","LOCATION_OR_LANGUAGE","PRODUCT_LINE","OTHER"]"), + ]), + assets_to_add=[ + "549755885175", + ], + assets_to_remove=[ + "549755885175", + ], + ), + ], + ) # UpdateAssetGroupBody | + + # example passing only required values which don't have defaults set + try: + # Update asset groups. + api_response = api_instance.asset_group_update(business_id, update_asset_group_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->asset_group_update: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **update_asset_group_body** | [**UpdateAssetGroupBody**](UpdateAssetGroupBody.md)| | + +### Return type + +[**UpdateAssetGroupResponse**](UpdateAssetGroupResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid parameters. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **business_asset_members_get** +> bool, date, datetime, dict, float, int, list, str, none_type business_asset_members_get(business_id, asset_id) + +Get members with access to asset + +Get all the members the requesting business has granted access to on the given asset. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.user_single_asset_binding import UserSingleAssetBinding +from openapi_generated.pinterest_client.model.paginated import Paginated +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + asset_id = "729090764583391194" # str | Unique identifier of a business asset. + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + start_index = 0 # int | An index to start fetching the results from. Only the results starting from this index will be returned. (optional) if omitted the server will use the default value of 0 + + # example passing only required values which don't have defaults set + try: + # Get members with access to asset + api_response = api_instance.business_asset_members_get(business_id, asset_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_asset_members_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get members with access to asset + api_response = api_instance.business_asset_members_get(business_id, asset_id, bookmark=bookmark, page_size=page_size, start_index=start_index) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_asset_members_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **asset_id** | **str**| Unique identifier of a business asset. | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **start_index** | **int**| An index to start fetching the results from. Only the results starting from this index will be returned. | [optional] if omitted the server will use the default value of 0 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sucess | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **business_asset_partners_get** +> bool, date, datetime, dict, float, int, list, str, none_type business_asset_partners_get(business_id, asset_id) + +Get partners with access to asset + +Get all the partners the requesting business has granted access to on the given asset. Note: If the asset has been shared with you, an empty array will be returned. This is because an asset shared with you cannot be shared with a different partner. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.user_single_asset_binding import UserSingleAssetBinding +from openapi_generated.pinterest_client.model.paginated import Paginated +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + asset_id = "729090764583391194" # str | Unique identifier of a business asset. + start_index = 0 # int | An index to start fetching the results from. Only the results starting from this index will be returned. (optional) if omitted the server will use the default value of 0 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + try: + # Get partners with access to asset + api_response = api_instance.business_asset_partners_get(business_id, asset_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_asset_partners_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get partners with access to asset + api_response = api_instance.business_asset_partners_get(business_id, asset_id, start_index=start_index, bookmark=bookmark, page_size=page_size) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_asset_partners_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **asset_id** | **str**| Unique identifier of a business asset. | + **start_index** | **int**| An index to start fetching the results from. Only the results starting from this index will be returned. | [optional] if omitted the server will use the default value of 0 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sucess | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **business_assets_get** +> bool, date, datetime, dict, float, int, list, str, none_type business_assets_get(business_id) + +List business assets + +Get all the assets the requesting business has access to. This includes assets the business owns and assets the business has access to through partnerships. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.permissions_with_owner import PermissionsWithOwner +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.get_business_assets_response import GetBusinessAssetsResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + permissions = [ + PermissionsWithOwner("ADMIN"), + ] # [PermissionsWithOwner] | A list of asset permissions used to filter the assets. Only assets where the requesting business has at least one of the specified permissions will be returned. (optional) + child_asset_id = "549764894835" # str | A child asset unique identifier. Used to fetch asset groups that contain the asset id as a child. (optional) + asset_group_id = "7078106104032" # str | An asset group unique identifier. Used to fetch assets contained within the specified asset group. (optional) + asset_type = "AD_ACCOUNT" # str | A resource type to filter the assets by. Only assets of the specified type will be returned. (optional) if omitted the server will use the default value of "AD_ACCOUNT" + start_index = 0 # int | An index to start fetching the results from. Only the results starting from this index will be returned. (optional) if omitted the server will use the default value of 0 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + try: + # List business assets + api_response = api_instance.business_assets_get(business_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_assets_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List business assets + api_response = api_instance.business_assets_get(business_id, permissions=permissions, child_asset_id=child_asset_id, asset_group_id=asset_group_id, asset_type=asset_type, start_index=start_index, bookmark=bookmark, page_size=page_size) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_assets_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **permissions** | [**[PermissionsWithOwner]**](PermissionsWithOwner.md)| A list of asset permissions used to filter the assets. Only assets where the requesting business has at least one of the specified permissions will be returned. | [optional] + **child_asset_id** | **str**| A child asset unique identifier. Used to fetch asset groups that contain the asset id as a child. | [optional] + **asset_group_id** | **str**| An asset group unique identifier. Used to fetch assets contained within the specified asset group. | [optional] + **asset_type** | **str**| A resource type to filter the assets by. Only assets of the specified type will be returned. | [optional] if omitted the server will use the default value of "AD_ACCOUNT" + **start_index** | **int**| An index to start fetching the results from. Only the results starting from this index will be returned. | [optional] if omitted the server will use the default value of 0 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **business_member_assets_get** +> bool, date, datetime, dict, float, int, list, str, none_type business_member_assets_get(business_id, member_id) + +Get assets assigned to a member + +Get assets on which you assigned asset permissions to the given member. Can be used to: - get all assets, regardless of asset type or - get assets of one asset type by using the asset_type query. The return response will include the permissions the member has to that asset and the asset type. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.asset_id_permissions import AssetIdPermissions +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + member_id = "729090764583391194" # str | The member id to fetch assets for. + asset_type = "AD_ACCOUNT" # str | A resource type to filter the assets by. Only assets of the specified type will be returned. (optional) if omitted the server will use the default value of "AD_ACCOUNT" + start_index = 0 # int | An index to start fetching the results from. Only the results starting from this index will be returned. (optional) if omitted the server will use the default value of 0 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + try: + # Get assets assigned to a member + api_response = api_instance.business_member_assets_get(business_id, member_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_member_assets_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get assets assigned to a member + api_response = api_instance.business_member_assets_get(business_id, member_id, asset_type=asset_type, start_index=start_index, bookmark=bookmark, page_size=page_size) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_member_assets_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **member_id** | **str**| The member id to fetch assets for. | + **asset_type** | **str**| A resource type to filter the assets by. Only assets of the specified type will be returned. | [optional] if omitted the server will use the default value of "AD_ACCOUNT" + **start_index** | **int**| An index to start fetching the results from. Only the results starting from this index will be returned. | [optional] if omitted the server will use the default value of 0 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **business_members_asset_access_delete** +> DeleteMemberAccessResultsResponseArray business_members_asset_access_delete(business_id, inline_object) + +Delete member access to asset + +Terminate multiple members' access to an asset. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.delete_member_access_results_response_array import DeleteMemberAccessResultsResponseArray +from openapi_generated.pinterest_client.model.inline_object import InlineObject +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + inline_object = InlineObject( + accesses=[ + BusinessesBusinessIdMembersAssetsAccessAccesses( + asset_id="549755885175", + member_id="140943737684417", + ), + ], + ) # InlineObject | + + # example passing only required values which don't have defaults set + try: + # Delete member access to asset + api_response = api_instance.business_members_asset_access_delete(business_id, inline_object) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_members_asset_access_delete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **inline_object** | [**InlineObject**](InlineObject.md)| | + +### Return type + +[**DeleteMemberAccessResultsResponseArray**](DeleteMemberAccessResultsResponseArray.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | response | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **business_members_asset_access_update** +> UpdateMemberAssetsResultsResponseArray business_members_asset_access_update(business_id, update_member_asset_access_body) + +Assign/Update member asset permissions + +Grant multiple members access to assets and/or update multiple member's exisiting permissions to an asset. Note: Not all listed permissions are applicable to each asset type. For example, PROFILE_PUBLISHER would not be applicable to an asset of type AD_ACCOUNT. The permission level PROFILE_PUBLISHER is only available to an asset of the type PROFILE. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.update_member_asset_access_body import UpdateMemberAssetAccessBody +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.update_member_assets_results_response_array import UpdateMemberAssetsResultsResponseArray +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + update_member_asset_access_body = UpdateMemberAssetAccessBody( + accesses=[ + UpdateMemberAssetAccessBodyAccesses( + asset_id="549755885175", + member_id="140943737684417", + permissions=[ + Permissions("["ANALYST","ADMIN"]"), + ], + ), + ], + ) # UpdateMemberAssetAccessBody | List of member asset permissions to create or update. + + # example passing only required values which don't have defaults set + try: + # Assign/Update member asset permissions + api_response = api_instance.business_members_asset_access_update(business_id, update_member_asset_access_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_members_asset_access_update: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **update_member_asset_access_body** | [**UpdateMemberAssetAccessBody**](UpdateMemberAssetAccessBody.md)| List of member asset permissions to create or update. | + +### Return type + +[**UpdateMemberAssetsResultsResponseArray**](UpdateMemberAssetsResultsResponseArray.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | response | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **business_partner_asset_access_get** +> bool, date, datetime, dict, float, int, list, str, none_type business_partner_asset_access_get(business_id, partner_id) + +Get assets assigned to a partner or assets assigned by a partner + +Can be used to get the business assets your partner has granted you access to or the business assets you have granted your partner access to. If you specify: - partner_type=INTERNAL, you will retrieve your business assets that the partner has access to. - partner_type=EXTERNAL, you will retrieve the partner's business assets that the partner has granted you access to. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.get_partner_assets_response import GetPartnerAssetsResponse +from openapi_generated.pinterest_client.model.paginated import Paginated +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + partner_id = "729090764583391194" # str | The partner id to be bound to the Business + partner_type = None # bool, date, datetime, dict, float, int, list, str, none_type | Specifies whether to fetch internal or external (shared) partners. If partner_type=INTERNAL, the asset being queried is for accesses the partner has to your business assets.
If partner_type=EXTERNAL, the asset being queried is for the accesses you have to the partner's business asset. (optional) + asset_type = "AD_ACCOUNT" # str | A resource type to filter the assets by. Only assets of the specified type will be returned. (optional) if omitted the server will use the default value of "AD_ACCOUNT" + start_index = 0 # int | An index to start fetching the results from. Only the results starting from this index will be returned. (optional) if omitted the server will use the default value of 0 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + + # example passing only required values which don't have defaults set + try: + # Get assets assigned to a partner or assets assigned by a partner + api_response = api_instance.business_partner_asset_access_get(business_id, partner_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_partner_asset_access_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get assets assigned to a partner or assets assigned by a partner + api_response = api_instance.business_partner_asset_access_get(business_id, partner_id, partner_type=partner_type, asset_type=asset_type, start_index=start_index, page_size=page_size, bookmark=bookmark) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->business_partner_asset_access_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **partner_id** | **str**| The partner id to be bound to the Business | + **partner_type** | **bool, date, datetime, dict, float, int, list, str, none_type**| Specifies whether to fetch internal or external (shared) partners. If partner_type=INTERNAL, the asset being queried is for accesses the partner has to your business assets.<br> If partner_type=EXTERNAL, the asset being queried is for the accesses you have to the partner's business asset. | [optional] + **asset_type** | **str**| A resource type to filter the assets by. Only assets of the specified type will be returned. | [optional] if omitted the server will use the default value of "AD_ACCOUNT" + **start_index** | **int**| An index to start fetching the results from. Only the results starting from this index will be returned. | [optional] if omitted the server will use the default value of 0 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_partner_asset_access_handler_impl** +> DeletePartnerAssetsResultsResponseArray delete_partner_asset_access_handler_impl(business_id, delete_partner_asset_access_body) + +Delete partner access to asset + +Terminate multiple partners' access to an asset. If - partner_type=INTERNAL: You will terminate a partner's asset access to your business assets. - partner_type=EXTERNAL: You will terminate your own access to your partner's business assets. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.delete_partner_assets_results_response_array import DeletePartnerAssetsResultsResponseArray +from openapi_generated.pinterest_client.model.delete_partner_asset_access_body import DeletePartnerAssetAccessBody +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + delete_partner_asset_access_body = DeletePartnerAssetAccessBody( + accesses=[ + DeletePartnerAssetAccessBodyAccesses( + partner_id="1234567890123", + asset_id="549755885175", + partner_type="INTERNAL", + ), + ], + ) # DeletePartnerAssetAccessBody | + + # example passing only required values which don't have defaults set + try: + # Delete partner access to asset + api_response = api_instance.delete_partner_asset_access_handler_impl(business_id, delete_partner_asset_access_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->delete_partner_asset_access_handler_impl: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **delete_partner_asset_access_body** | [**DeletePartnerAssetAccessBody**](DeletePartnerAssetAccessBody.md)| | + +### Return type + +[**DeletePartnerAssetsResultsResponseArray**](DeletePartnerAssetsResultsResponseArray.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_partner_asset_access_handler_impl** +> UpdatePartnerAssetsResultsResponseArray update_partner_asset_access_handler_impl(business_id, update_partner_asset_access_body) + +Assign/Update partner asset permissions + +Grant multiple partners access to assets and/or update multiple partner's exisiting permissions to an asset. If your partner already had permissions on the asset, they will be overriden with the new permissions you assign to them. To learn more about permission levels, visit https://help.pinterest.com/en/business/article/business-manager-overview Note: Not all listed permissions are applicable to each asset type. For example, PROFILE_PUBLISHER would not be applicable to an asset of type AD_ACCOUNT. The permission level PROFILE_PUBLISHER is only available to an asset of the type PROFILE. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_assets_api +from openapi_generated.pinterest_client.model.update_partner_asset_access_body import UpdatePartnerAssetAccessBody +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.update_partner_assets_results_response_array import UpdatePartnerAssetsResultsResponseArray +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_assets_api.BusinessAccessAssetsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + update_partner_asset_access_body = UpdatePartnerAssetAccessBody( + accesses=[ + UpdatePartnerAssetAccessBodyAccesses( + partner_id="1234567890123", + asset_id="549755885175", + permissions=[ + Permissions("["ANALYST","ADMIN"]"), + ], + ), + ], + ) # UpdatePartnerAssetAccessBody | A list of assets and permissions to assign to your partners. + + # example passing only required values which don't have defaults set + try: + # Assign/Update partner asset permissions + api_response = api_instance.update_partner_asset_access_handler_impl(business_id, update_partner_asset_access_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessAssetsApi->update_partner_asset_access_handler_impl: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **update_partner_asset_access_body** | [**UpdatePartnerAssetAccessBody**](UpdatePartnerAssetAccessBody.md)| A list of assets and permissions to assign to your partners. | + +### Return type + +[**UpdatePartnerAssetsResultsResponseArray**](UpdatePartnerAssetsResultsResponseArray.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BusinessAccessError.md b/docs/BusinessAccessError.md new file mode 100644 index 0000000..bf15ce0 --- /dev/null +++ b/docs/BusinessAccessError.md @@ -0,0 +1,13 @@ +# BusinessAccessError + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**message** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessAccessInviteApi.md b/docs/BusinessAccessInviteApi.md new file mode 100644 index 0000000..49948ce --- /dev/null +++ b/docs/BusinessAccessInviteApi.md @@ -0,0 +1,574 @@ +# openapi_generated.pinterest_client.BusinessAccessInviteApi + +All URIs are relative to *https://api.pinterest.com/v5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**asset_access_requests_create**](BusinessAccessInviteApi.md#asset_access_requests_create) | **POST** /businesses/{business_id}/requests/assets/access | Create a request to access an existing partner's assets. +[**cancel_invites_or_requests**](BusinessAccessInviteApi.md#cancel_invites_or_requests) | **DELETE** /businesses/{business_id}/invites | Cancel invites/requests +[**create_asset_invites**](BusinessAccessInviteApi.md#create_asset_invites) | **POST** /businesses/{business_id}/invites/assets/access | Update invite/request with an asset permission +[**create_membership_or_partnership_invites**](BusinessAccessInviteApi.md#create_membership_or_partnership_invites) | **POST** /businesses/{business_id}/invites | Create invites or requests +[**get_invites**](BusinessAccessInviteApi.md#get_invites) | **GET** /businesses/{business_id}/invites | Get invites/requests +[**respond_business_access_invites**](BusinessAccessInviteApi.md#respond_business_access_invites) | **PATCH** /businesses/invites | Accept or decline an invite/request + + +# **asset_access_requests_create** +> CreateAssetAccessRequestResponse asset_access_requests_create(business_id, create_asset_access_request_body) + +Create a request to access an existing partner's assets. + +Create a request to access an existing partner's assets with the specified permissions. The request will be sent to the partner for approval. The assets that can be requested are ad accounts and profiles. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_invite_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.create_asset_access_request_response import CreateAssetAccessRequestResponse +from openapi_generated.pinterest_client.model.create_asset_access_request_body import CreateAssetAccessRequestBody +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_invite_api.BusinessAccessInviteApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + create_asset_access_request_body = CreateAssetAccessRequestBody( + asset_requests=[ + CreateAssetAccessRequestBodyAssetRequests( + partner_id="809944451643622187", + asset_id_to_permissions=AssetIdToPermissions( + key=[ + Permissions("ADMIN"), + ], + ), + ), + ], + ) # CreateAssetAccessRequestBody | + + # example passing only required values which don't have defaults set + try: + # Create a request to access an existing partner's assets. + api_response = api_instance.asset_access_requests_create(business_id, create_asset_access_request_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessInviteApi->asset_access_requests_create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **create_asset_access_request_body** | [**CreateAssetAccessRequestBody**](CreateAssetAccessRequestBody.md)| | + +### Return type + +[**CreateAssetAccessRequestResponse**](CreateAssetAccessRequestResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_invites_or_requests** +> DeleteInvitesResultsResponseArray cancel_invites_or_requests(business_id, cancel_invites_body) + +Cancel invites/requests + +Cancel membership/partnership invites and/or requests. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_invite_api +from openapi_generated.pinterest_client.model.cancel_invites_body import CancelInvitesBody +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.delete_invites_results_response_array import DeleteInvitesResultsResponseArray +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_invite_api.BusinessAccessInviteApi(api_client) + business_id = "729090764583391194" # str | Business id + cancel_invites_body = CancelInvitesBody( + invite_ids=["1234567890123456789","1122334455667788991"], + ) # CancelInvitesBody | A list with invite ids + + # example passing only required values which don't have defaults set + try: + # Cancel invites/requests + api_response = api_instance.cancel_invites_or_requests(business_id, cancel_invites_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessInviteApi->cancel_invites_or_requests: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Business id | + **cancel_invites_body** | [**CancelInvitesBody**](CancelInvitesBody.md)| A list with invite ids | + +### Return type + +[**DeleteInvitesResultsResponseArray**](DeleteInvitesResultsResponseArray.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_asset_invites** +> UpdateInvitesResultsResponseArray create_asset_invites(business_id, create_asset_invites_request) + +Update invite/request with an asset permission + +Assign asset permissions information to an existing invite/request. Can be used to: - Request access to a partner's asset. Note: This is only for when no existing partnership exists. If an existing partnership exists, use \"Create a request to access an existing partner's assets\" to request access to your partner's assets. - invite_type=\"PARTNER_REQUEST\" - Invite a partner to access your business assets. Note: This is only for when there is no existing partnership. If there is an existing partnership, use \"Assign/Update partner asset permissions\" to assign a partner access to new assets. - invite_type=\"PARTNER_INVITE\" - Invite a member to access your business assets. Note: This is only for when there is no existing membership. If there is an existing membership, use \"Assign/Update member asset permissions\" to assign a member access to new assets. - invite_type=\"MEMBER_INVITE\" To learn more about permission levels, visit https://help.pinterest.com/en/business/article/business-manager-overview. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_invite_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.update_invites_results_response_array import UpdateInvitesResultsResponseArray +from openapi_generated.pinterest_client.model.create_asset_invites_request import CreateAssetInvitesRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_invite_api.BusinessAccessInviteApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + create_asset_invites_request = CreateAssetInvitesRequest( + invites=[ + CreateAssetInvitesRequestItem( + invite_id="1234567890123", + invite_type=InviteType("MEMBER_INVITE"), + asset_id_to_permissions=AssetIdToPermissions( + key=[ + Permissions("ADMIN"), + ], + ), + ), + ], + ) # CreateAssetInvitesRequest | A list of invites/requests together with the asset permissions to be assigned to the invite/request. + + # example passing only required values which don't have defaults set + try: + # Update invite/request with an asset permission + api_response = api_instance.create_asset_invites(business_id, create_asset_invites_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessInviteApi->create_asset_invites: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **create_asset_invites_request** | [**CreateAssetInvitesRequest**](CreateAssetInvitesRequest.md)| A list of invites/requests together with the asset permissions to be assigned to the invite/request. | + +### Return type + +[**UpdateInvitesResultsResponseArray**](UpdateInvitesResultsResponseArray.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_membership_or_partnership_invites** +> CreateInvitesResultsResponseArray create_membership_or_partnership_invites(business_id, create_membership_or_partnership_invites_body) + +Create invites or requests + +Create batch invites or requests. Can create batch invites or requests as described below. - Invite members to join the business. This would required specifying the following: - invite_type=\"MEMBER_INVITE\" - business_role=\"EMPLOYEE\" OR business_role=\"BIZ_ADMIN\" (To learn more about business roles, visit https://help.pinterest.com/en/business/article/profile-permissions-in-business-access.) - members - Invite partners to access your business assets. This would require specifying the following: - invite_type=\"PARTNER_INVITE\" - business_role=\"PARTNER\" - partners - Request to be a partner so you can access their assets. This would require specifying the following: - invite_type=\"PARTNER_REQUEST\" - business_role=\"PARTNER\" - partners + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_invite_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.create_membership_or_partnership_invites_body import CreateMembershipOrPartnershipInvitesBody +from openapi_generated.pinterest_client.model.create_invites_results_response_array import CreateInvitesResultsResponseArray +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_invite_api.BusinessAccessInviteApi(api_client) + business_id = "729090764583391194" # str | Business id + create_membership_or_partnership_invites_body = CreateMembershipOrPartnershipInvitesBody( + business_role="BIZ_ADMIN", + invite_type=InviteType("MEMBER_INVITE"), + members=["business0101","user@business.com"], + partners=["809944451643622187","766456567741825556"], + ) # CreateMembershipOrPartnershipInvitesBody | An object with the properties: invite_type, partners, members, business_role + + # example passing only required values which don't have defaults set + try: + # Create invites or requests + api_response = api_instance.create_membership_or_partnership_invites(business_id, create_membership_or_partnership_invites_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessInviteApi->create_membership_or_partnership_invites: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Business id | + **create_membership_or_partnership_invites_body** | [**CreateMembershipOrPartnershipInvitesBody**](CreateMembershipOrPartnershipInvitesBody.md)| An object with the properties: invite_type, partners, members, business_role | + +### Return type + +[**CreateInvitesResultsResponseArray**](CreateInvitesResultsResponseArray.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_invites** +> bool, date, datetime, dict, float, int, list, str, none_type get_invites(business_id) + +Get invites/requests + +Get the membership/partnership invites and/or requests for the authorized user. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_invite_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.invite_type import InviteType +from openapi_generated.pinterest_client.model.invite_response import InviteResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_invite_api.BusinessAccessInviteApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + is_member = True # bool | A boolean field to indicate whether the invite is to create a partnership or a membership. (optional) if omitted the server will use the default value of True + invite_status = [ + "PENDING", + ] # [str] | A list of invite statuses to filter invites by. Only invites whose status is in the provided statuses will be returned. (optional) + invite_type = InviteType("MEMBER_INVITE") # InviteType | Invite type to filter invites by. Only invites of the specified type will be returned. (optional) + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + try: + # Get invites/requests + api_response = api_instance.get_invites(business_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessInviteApi->get_invites: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get invites/requests + api_response = api_instance.get_invites(business_id, is_member=is_member, invite_status=invite_status, invite_type=invite_type, bookmark=bookmark, page_size=page_size) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessInviteApi->get_invites: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **is_member** | **bool**| A boolean field to indicate whether the invite is to create a partnership or a membership. | [optional] if omitted the server will use the default value of True + **invite_status** | **[str]**| A list of invite statuses to filter invites by. Only invites whose status is in the provided statuses will be returned. | [optional] + **invite_type** | **InviteType**| Invite type to filter invites by. Only invites of the specified type will be returned. | [optional] + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **respond_business_access_invites** +> RespondToInvitesResponseArray respond_business_access_invites(auth_respond_invites_body) + +Accept or decline an invite/request + +Accept or decline invites or requests. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_invite_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.auth_respond_invites_body import AuthRespondInvitesBody +from openapi_generated.pinterest_client.model.respond_to_invites_response_array import RespondToInvitesResponseArray +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_invite_api.BusinessAccessInviteApi(api_client) + auth_respond_invites_body = AuthRespondInvitesBody( + invites=[ + AuthRespondInvitesBodyInvites( + action=AuthRespondInvitesBodyAction( + accept_invite=True, + asset_id_to_permissions=AssetIdToPermissions( + key=[ + Permissions("ADMIN"), + ], + ), + ), + invite_id="4", + ), + ], + ) # AuthRespondInvitesBody | + + # example passing only required values which don't have defaults set + try: + # Accept or decline an invite/request + api_response = api_instance.respond_business_access_invites(auth_respond_invites_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessInviteApi->respond_business_access_invites: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **auth_respond_invites_body** | [**AuthRespondInvitesBody**](AuthRespondInvitesBody.md)| | + +### Return type + +[**RespondToInvitesResponseArray**](RespondToInvitesResponseArray.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BusinessAccessRelationshipsApi.md b/docs/BusinessAccessRelationshipsApi.md new file mode 100644 index 0000000..fc35265 --- /dev/null +++ b/docs/BusinessAccessRelationshipsApi.md @@ -0,0 +1,573 @@ +# openapi_generated.pinterest_client.BusinessAccessRelationshipsApi + +All URIs are relative to *https://api.pinterest.com/v5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_business_membership**](BusinessAccessRelationshipsApi.md#delete_business_membership) | **DELETE** /businesses/{business_id}/members | Terminate business memberships +[**delete_business_partners**](BusinessAccessRelationshipsApi.md#delete_business_partners) | **DELETE** /businesses/{business_id}/partners | Terminate business partnerships +[**get_business_employers**](BusinessAccessRelationshipsApi.md#get_business_employers) | **GET** /businesses/employers | List business employers for user +[**get_business_members**](BusinessAccessRelationshipsApi.md#get_business_members) | **GET** /businesses/{business_id}/members | Get business members +[**get_business_partners**](BusinessAccessRelationshipsApi.md#get_business_partners) | **GET** /businesses/{business_id}/partners | Get business partners +[**update_business_memberships**](BusinessAccessRelationshipsApi.md#update_business_memberships) | **PATCH** /businesses/{business_id}/members | Update member's business role + + +# **delete_business_membership** +> DeletedMembersResponse delete_business_membership(business_id, members_to_delete_body) + +Terminate business memberships + +Terminate memberships between the specified members and your business. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_relationships_api +from openapi_generated.pinterest_client.model.members_to_delete_body import MembersToDeleteBody +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.deleted_members_response import DeletedMembersResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_relationships_api.BusinessAccessRelationshipsApi(api_client) + business_id = "729090764583391194" # str | Business id + members_to_delete_body = MembersToDeleteBody( + members=[ + MembersToDeleteBodyMembers( + member_id="140943737684417", + business_role=BusinessRoleForMembers("BIZ_ADMIN"), + ), + ], + ) # MembersToDeleteBody | List of members with role to delete. + + # example passing only required values which don't have defaults set + try: + # Terminate business memberships + api_response = api_instance.delete_business_membership(business_id, members_to_delete_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessRelationshipsApi->delete_business_membership: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Business id | + **members_to_delete_body** | [**MembersToDeleteBody**](MembersToDeleteBody.md)| List of members with role to delete. | + +### Return type + +[**DeletedMembersResponse**](DeletedMembersResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_business_partners** +> DeletePartnersResponse delete_business_partners(business_id, delete_partners_request) + +Terminate business partnerships + +Terminate partnerships between the specified partners and your business. Note: You may only batch terminate partners of the same partner type. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_relationships_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.delete_partners_request import DeletePartnersRequest +from openapi_generated.pinterest_client.model.delete_partners_response import DeletePartnersResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_relationships_api.BusinessAccessRelationshipsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + delete_partners_request = DeletePartnersRequest( + partner_ids=[ + "1234567890123", + ], + partner_type="partner_type_example", + ) # DeletePartnersRequest | An object containing a \"partner_ids\" property composed of a list of partner IDs and a \"partners_type\" property specifying the type of partners to delete. + + # example passing only required values which don't have defaults set + try: + # Terminate business partnerships + api_response = api_instance.delete_business_partners(business_id, delete_partners_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessRelationshipsApi->delete_business_partners: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **delete_partners_request** | [**DeletePartnersRequest**](DeletePartnersRequest.md)| An object containing a \"partner_ids\" property composed of a list of partner IDs and a \"partners_type\" property specifying the type of partners to delete. | + +### Return type + +[**DeletePartnersResponse**](DeletePartnersResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**404** | A supplied partner id doesn't exist | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_business_employers** +> bool, date, datetime, dict, float, int, list, str, none_type get_business_employers() + +List business employers for user + +Get all of the viewing user's business employers. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_relationships_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.user_business_role_binding import UserBusinessRoleBinding +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_relationships_api.BusinessAccessRelationshipsApi(api_client) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List business employers for user + api_response = api_instance.get_business_employers(page_size=page_size, bookmark=bookmark) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessRelationshipsApi->get_business_employers: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_business_members** +> bool, date, datetime, dict, float, int, list, str, none_type get_business_members(business_id) + +Get business members + +Get all members of the specified business. The return response will include the member's business_role and assets they have access to if assets_summary=TRUE + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_relationships_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.member_business_role import MemberBusinessRole +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.user_business_role_binding import UserBusinessRoleBinding +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_relationships_api.BusinessAccessRelationshipsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + assets_summary = False # bool | Include assets summary in the response if this is true. The assets summary returns a dictionary representing a summary of the assets for the business user ID, with information like the ad accounts and profiles the user has permissions for and what those permissions are (optional) if omitted the server will use the default value of False + business_roles = [ + MemberBusinessRole("BIZ_ADMIN"), + ] # [MemberBusinessRole] | A list of business roles to filter the members by. Only members whose roles are in the specified roles will be returned. (optional) + member_ids = "00101010101,2222220101" # str | A list of business members ids separated by comma. (optional) + start_index = 0 # int | An index to start fetching the results from. Only the results starting from this index will be returned. (optional) if omitted the server will use the default value of 0 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + try: + # Get business members + api_response = api_instance.get_business_members(business_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessRelationshipsApi->get_business_members: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get business members + api_response = api_instance.get_business_members(business_id, assets_summary=assets_summary, business_roles=business_roles, member_ids=member_ids, start_index=start_index, bookmark=bookmark, page_size=page_size) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessRelationshipsApi->get_business_members: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **assets_summary** | **bool**| Include assets summary in the response if this is true. The assets summary returns a dictionary representing a summary of the assets for the business user ID, with information like the ad accounts and profiles the user has permissions for and what those permissions are | [optional] if omitted the server will use the default value of False + **business_roles** | [**[MemberBusinessRole]**](MemberBusinessRole.md)| A list of business roles to filter the members by. Only members whose roles are in the specified roles will be returned. | [optional] + **member_ids** | **str**| A list of business members ids separated by comma. | [optional] + **start_index** | **int**| An index to start fetching the results from. Only the results starting from this index will be returned. | [optional] if omitted the server will use the default value of 0 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_business_partners** +> bool, date, datetime, dict, float, int, list, str, none_type get_business_partners(business_id) + +Get business partners + +Get all partners of the specified business. If the assets_summary=TRUE and: - partner_type=INTERNAL, the business assets returned are your business assets the partner has access to. - partner_type=EXTERNAL, the business assets returned are your partner's business assets the partner has granted you access to. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_relationships_api +from openapi_generated.pinterest_client.model.partner_type import PartnerType +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.user_business_role_binding import UserBusinessRoleBinding +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_relationships_api.BusinessAccessRelationshipsApi(api_client) + business_id = "729090764583391194" # str | Unique identifier of the requesting business. + assets_summary = False # bool | Include assets summary in the response if this is true. The assets summary returns a dictionary representing a summary of the assets for the business user ID, with information like the ad accounts and profiles the user has permissions for and what those permissions are (optional) if omitted the server will use the default value of False + partner_type = PartnerType("INTERNAL") # PartnerType | Specifies whether to fetch internal or external (shared) partners. If partner_type=INTERNAL, the asset being queried is for accesses the partner has to your business assets.
If partner_type=EXTERNAL, the asset being queried is for the accesses you have to the partner's business asset. (optional) + partner_ids = "00101010101,2222220101" # str | A list of business partner ids separated by commas used to filter the results. Only partners with the specified ids will be returned. (optional) + start_index = 0 # int | An index to start fetching the results from. Only the results starting from this index will be returned. (optional) if omitted the server will use the default value of 0 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + + # example passing only required values which don't have defaults set + try: + # Get business partners + api_response = api_instance.get_business_partners(business_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessRelationshipsApi->get_business_partners: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get business partners + api_response = api_instance.get_business_partners(business_id, assets_summary=assets_summary, partner_type=partner_type, partner_ids=partner_ids, start_index=start_index, page_size=page_size, bookmark=bookmark) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessRelationshipsApi->get_business_partners: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Unique identifier of the requesting business. | + **assets_summary** | **bool**| Include assets summary in the response if this is true. The assets summary returns a dictionary representing a summary of the assets for the business user ID, with information like the ad accounts and profiles the user has permissions for and what those permissions are | [optional] if omitted the server will use the default value of False + **partner_type** | **PartnerType**| Specifies whether to fetch internal or external (shared) partners. If partner_type=INTERNAL, the asset being queried is for accesses the partner has to your business assets.<br> If partner_type=EXTERNAL, the asset being queried is for the accesses you have to the partner's business asset. | [optional] + **partner_ids** | **str**| A list of business partner ids separated by commas used to filter the results. Only partners with the specified ids will be returned. | [optional] + **start_index** | **int**| An index to start fetching the results from. Only the results starting from this index will be returned. | [optional] if omitted the server will use the default value of 0 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_business_memberships** +> UpdateMemberResultsResponseArray update_business_memberships(business_id, update_member_business_role_body) + +Update member's business role + +Update a member's business role within the business. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import business_access_relationships_api +from openapi_generated.pinterest_client.model.update_member_results_response_array import UpdateMemberResultsResponseArray +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.update_member_business_role_body import UpdateMemberBusinessRoleBody +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = business_access_relationships_api.BusinessAccessRelationshipsApi(api_client) + business_id = "729090764583391194" # str | Business id + update_member_business_role_body = [ + UpdateMemberBusinessRoleBody( + business_role=BusinessRoleForMembers("BIZ_ADMIN"), + member_id="140943737684417", + ), + ] # [UpdateMemberBusinessRoleBody] | List of objects with the member id and the business_role. + + # example passing only required values which don't have defaults set + try: + # Update member's business role + api_response = api_instance.update_business_memberships(business_id, update_member_business_role_body) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling BusinessAccessRelationshipsApi->update_business_memberships: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business_id** | **str**| Business id | + **update_member_business_role_body** | [**[UpdateMemberBusinessRoleBody]**](UpdateMemberBusinessRoleBody.md)| List of objects with the member id and the business_role. | + +### Return type + +[**UpdateMemberResultsResponseArray**](UpdateMemberResultsResponseArray.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | response | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BusinessAccessRole.md b/docs/BusinessAccessRole.md new file mode 100644 index 0000000..3a1d801 --- /dev/null +++ b/docs/BusinessAccessRole.md @@ -0,0 +1,12 @@ +# BusinessAccessRole + +Permission role for business access. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Permission role for business access. | must be one of ["OWNER", "ADMIN", "ANALYST", "SOS_READER", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "RESTRICTED_OWNER", "PROFILE_MANAGER", "PROFILE_PUBLISHER", "RESOURCE_PINNER_LIST_OWNER", "RESOURCE_PINNER_LIST_READER", "BIZ_PINNER_LIST_SHARER", "RESOURCE_CONVERSION_TAGS_READER", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessAccessUserSummary.md b/docs/BusinessAccessUserSummary.md new file mode 100644 index 0000000..cdc3170 --- /dev/null +++ b/docs/BusinessAccessUserSummary.md @@ -0,0 +1,15 @@ +# BusinessAccessUserSummary + +Metadata of the member/partner that has access to the asset. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str, none_type** | Email of the business member/partner. | [optional] +**id** | **str, none_type** | Unique identifier of the business member/partner. | [optional] +**username** | **str, none_type** | Username of the business member/partner. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessMemberAssetsSummary.md b/docs/BusinessMemberAssetsSummary.md new file mode 100644 index 0000000..71cb20e --- /dev/null +++ b/docs/BusinessMemberAssetsSummary.md @@ -0,0 +1,14 @@ +# BusinessMemberAssetsSummary + +Ad accounts and profiles the business member/partner has access to. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ad_accounts** | [**[BusinessMemberAssetsSummaryAdAccounts]**](BusinessMemberAssetsSummaryAdAccounts.md) | List of ad account IDs and respective permission levels. | [optional] +**profiles** | [**[BusinessMemberAssetsSummaryProfiles]**](BusinessMemberAssetsSummaryProfiles.md) | List of profile IDs and respective permission levels. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessMemberAssetsSummaryAdAccounts.md b/docs/BusinessMemberAssetsSummaryAdAccounts.md new file mode 100644 index 0000000..72dfcab --- /dev/null +++ b/docs/BusinessMemberAssetsSummaryAdAccounts.md @@ -0,0 +1,13 @@ +# BusinessMemberAssetsSummaryAdAccounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of a business ad account. | [optional] +**permissions** | [**PermissionsResponse**](PermissionsResponse.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessMemberAssetsSummaryProfiles.md b/docs/BusinessMemberAssetsSummaryProfiles.md new file mode 100644 index 0000000..4836db1 --- /dev/null +++ b/docs/BusinessMemberAssetsSummaryProfiles.md @@ -0,0 +1,13 @@ +# BusinessMemberAssetsSummaryProfiles + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of a business profile. | [optional] +**permissions** | [**PermissionsResponse**](PermissionsResponse.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessRole.md b/docs/BusinessRole.md new file mode 100644 index 0000000..836d40e --- /dev/null +++ b/docs/BusinessRole.md @@ -0,0 +1,12 @@ +# BusinessRole + +The access level a member/partner has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
- BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.
- PARTNER: Can only view and access assets you assign them to/or they assign to you. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The access level a member/partner has to the business. Values are case-sensitive. <br> - EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets. <br> - BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access. <br> - PARTNER: Can only view and access assets you assign them to/or they assign to you. | must be one of ["EMPLOYEE", "BIZ_ADMIN", "PARTNER", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessRoleCheckMode.md b/docs/BusinessRoleCheckMode.md new file mode 100644 index 0000000..50c3154 --- /dev/null +++ b/docs/BusinessRoleCheckMode.md @@ -0,0 +1,12 @@ +# BusinessRoleCheckMode + +Specifies if the partner is internal or external. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Specifies if the partner is internal or external. | must be one of ["INTERNAL", "EXTERNAL", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessRoleForMembers.md b/docs/BusinessRoleForMembers.md new file mode 100644 index 0000000..47d7496 --- /dev/null +++ b/docs/BusinessRoleForMembers.md @@ -0,0 +1,12 @@ +# BusinessRoleForMembers + +The access level a member has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
- BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The access level a member has to the business. Values are case-sensitive. <br> - EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets. <br> - BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access. | must be one of ["EMPLOYEE", "BIZ_ADMIN", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessSharedAudience.md b/docs/BusinessSharedAudience.md new file mode 100644 index 0000000..b03963e --- /dev/null +++ b/docs/BusinessSharedAudience.md @@ -0,0 +1,14 @@ +# BusinessSharedAudience + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audience_id** | **str** | Unique identifier of an audience | +**operation_type** | [**OperationType**](OperationType.md) | | +**recipient_business_ids** | **[str]** | List of business IDs to share with or revoke from. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessSharedAudience1.md b/docs/BusinessSharedAudience1.md new file mode 100644 index 0000000..5ee3874 --- /dev/null +++ b/docs/BusinessSharedAudience1.md @@ -0,0 +1,12 @@ +# BusinessSharedAudience1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recipient_business_ids** | **[str]** | List of business IDs to share with or revoke from. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessSharedAudienceResponse.md b/docs/BusinessSharedAudienceResponse.md new file mode 100644 index 0000000..e2177f8 --- /dev/null +++ b/docs/BusinessSharedAudienceResponse.md @@ -0,0 +1,14 @@ +# BusinessSharedAudienceResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audience_id** | **str** | Audience ID that was shared | [optional] +**permissions** | [**[Role]**](Role.md) | | [optional] +**recipient_business_ids** | **[str]** | Business IDs that received the audience | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessSharedAudienceResponse1.md b/docs/BusinessSharedAudienceResponse1.md new file mode 100644 index 0000000..30ad05e --- /dev/null +++ b/docs/BusinessSharedAudienceResponse1.md @@ -0,0 +1,12 @@ +# BusinessSharedAudienceResponse1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recipient_business_ids** | **[str]** | Business IDs that received the audience | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BusinessesBusinessIdMembersAssetsAccessAccesses.md b/docs/BusinessesBusinessIdMembersAssetsAccessAccesses.md new file mode 100644 index 0000000..193510d --- /dev/null +++ b/docs/BusinessesBusinessIdMembersAssetsAccessAccesses.md @@ -0,0 +1,13 @@ +# BusinessesBusinessIdMembersAssetsAccessAccesses + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_id** | **str** | Id of the asset on which to remove member permissions. | +**member_id** | **str** | Unique identifier of the member on which to perform the asset permission removal | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignCommon.md b/docs/CampaignCommon.md index e1fad10..9e1d86f 100644 --- a/docs/CampaignCommon.md +++ b/docs/CampaignCommon.md @@ -5,16 +5,16 @@ Campaign Data ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ad_account_id** | **str** | Campaign's Advertiser ID. | [optional] +**ad_account_id** | **str** | Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema. | [optional] **name** | **str** | Campaign name. | [optional] **status** | **str** | | [optional] -**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. | [optional] -**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. | [optional] +**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time. | [optional] +**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time. | [optional] **order_line_id** | **str, none_type** | Order line ID that appears on the invoice. | [optional] **tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **start_time** | **int, none_type** | Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] **end_time** | **int, none_type** | Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] -**summary_status** | **str** | Summary status for campaigns | [optional] +**is_flexible_daily_budgets** | **bool, none_type** | Determine if a campaign has flexible daily budgets setup. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignCreateCommon.md b/docs/CampaignCreateCommon.md index 73ff3ff..c4d89e6 100644 --- a/docs/CampaignCreateCommon.md +++ b/docs/CampaignCreateCommon.md @@ -4,20 +4,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ad_account_id** | **str** | Campaign's Advertiser ID. | [optional] +**ad_account_id** | **str** | Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema. | [optional] **name** | **str** | Campaign name. | [optional] -**status** | **str** | | [optional] if omitted the server will use the default value of "ACTIVE" -**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. | [optional] -**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. | [optional] +**status** | **str** | | [optional] +**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time. | [optional] +**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time. | [optional] **order_line_id** | **str, none_type** | Order line ID that appears on the invoice. | [optional] **tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **start_time** | **int, none_type** | Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] **end_time** | **int, none_type** | Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] -**summary_status** | **str** | Summary status for campaigns | [optional] -**is_campaign_budget_optimization** | **bool** | | [optional] if omitted the server will use the default value of False -**is_flexible_daily_budgets** | **bool** | | [optional] if omitted the server will use the default value of False +**is_flexible_daily_budgets** | **bool, none_type** | Determine if a campaign has flexible daily budgets setup. | [optional] **default_ad_group_budget_in_micro_currency** | **int, none_type** | When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account. | [optional] -**is_automated_campaign** | **bool** | | [optional] if omitted the server will use the default value of False +**is_automated_campaign** | **bool, none_type** | Specifies whether the campaign was created in the automated campaign flow | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignCreateCommonAllOf.md b/docs/CampaignCreateCommonAllOf.md index 8826d89..d1c84b5 100644 --- a/docs/CampaignCreateCommonAllOf.md +++ b/docs/CampaignCreateCommonAllOf.md @@ -4,11 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **str** | | [optional] if omitted the server will use the default value of "ACTIVE" -**is_campaign_budget_optimization** | **bool** | | [optional] if omitted the server will use the default value of False -**is_flexible_daily_budgets** | **bool** | | [optional] if omitted the server will use the default value of False **default_ad_group_budget_in_micro_currency** | **int, none_type** | When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account. | [optional] -**is_automated_campaign** | **bool** | | [optional] if omitted the server will use the default value of False +**is_automated_campaign** | **bool, none_type** | Specifies whether the campaign was created in the automated campaign flow | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignCreateRequest.md b/docs/CampaignCreateRequest.md index 682ad72..d8c7776 100644 --- a/docs/CampaignCreateRequest.md +++ b/docs/CampaignCreateRequest.md @@ -4,18 +4,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ad_account_id** | **str** | Campaign's Advertiser ID. | +**ad_account_id** | **str** | Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema. | **name** | **str** | Campaign name. | **objective_type** | [**ObjectiveType**](ObjectiveType.md) | | **status** | **str** | | [optional] if omitted the server will use the default value of "ACTIVE" -**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. | [optional] -**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. | [optional] +**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time. | [optional] +**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time. | [optional] **order_line_id** | **str, none_type** | Order line ID that appears on the invoice. | [optional] **tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **start_time** | **int, none_type** | Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] **end_time** | **int, none_type** | Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] -**summary_status** | **str** | Summary status for campaigns | [optional] -**is_campaign_budget_optimization** | **bool** | | [optional] if omitted the server will use the default value of False **is_flexible_daily_budgets** | **bool** | | [optional] if omitted the server will use the default value of False **default_ad_group_budget_in_micro_currency** | **int, none_type** | When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account. | [optional] **is_automated_campaign** | **bool** | | [optional] if omitted the server will use the default value of False diff --git a/docs/CampaignCreateRequestAllOf.md b/docs/CampaignCreateRequestAllOf.md index 56b5759..3583eb9 100644 --- a/docs/CampaignCreateRequestAllOf.md +++ b/docs/CampaignCreateRequestAllOf.md @@ -5,6 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **objective_type** | [**ObjectiveType**](ObjectiveType.md) | | +**is_flexible_daily_budgets** | **bool** | | [optional] if omitted the server will use the default value of False +**is_automated_campaign** | **bool** | | [optional] if omitted the server will use the default value of False +**status** | **str** | | [optional] if omitted the server will use the default value of "ACTIVE" **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignCreateResponseData.md b/docs/CampaignCreateResponseData.md index 8a426c0..e372267 100644 --- a/docs/CampaignCreateResponseData.md +++ b/docs/CampaignCreateResponseData.md @@ -4,25 +4,25 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ad_account_id** | **str** | Campaign's Advertiser ID. | [optional] +**ad_account_id** | **str** | Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema. | [optional] **name** | **str** | Campaign name. | [optional] **status** | **str** | | [optional] -**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. | [optional] -**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. | [optional] +**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time. | [optional] +**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time. | [optional] **order_line_id** | **str, none_type** | Order line ID that appears on the invoice. | [optional] **tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **start_time** | **int, none_type** | Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] **end_time** | **int, none_type** | Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] -**summary_status** | **str** | Summary status for campaigns | [optional] -**is_campaign_budget_optimization** | **bool, none_type** | Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared. | [optional] -**is_flexible_daily_budgets** | **bool, none_type** | Determines if a campaign has flexible daily budgets setup. | [optional] +**is_flexible_daily_budgets** | **bool, none_type** | Determine if a campaign has flexible daily budgets setup. | [optional] **default_ad_group_budget_in_micro_currency** | **int, none_type** | When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account. | [optional] -**is_automated_campaign** | **bool** | | [optional] if omitted the server will use the default value of False +**is_automated_campaign** | **bool, none_type** | Specifies whether the campaign was created in the automated campaign flow | [optional] **id** | **str** | Campaign ID. | [optional] **objective_type** | [**ObjectiveType**](ObjectiveType.md) | | [optional] **created_time** | **int** | Campaign creation time. Unix timestamp in seconds. | [optional] **updated_time** | **int** | UTC timestamp. Last update time. | [optional] **type** | **str** | Always \"campaign\". | [optional] +**is_campaign_budget_optimization** | **bool, none_type** | Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared. | [optional] +**summary_status** | [**CampaignSummaryStatus**](CampaignSummaryStatus.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignResponse.md b/docs/CampaignResponse.md index cd95fb1..a2d59df 100644 --- a/docs/CampaignResponse.md +++ b/docs/CampaignResponse.md @@ -5,22 +5,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Campaign ID. | [optional] -**ad_account_id** | **str** | Campaign's Advertiser ID. | [optional] +**ad_account_id** | **str** | Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema. | [optional] **name** | **str** | Campaign name. | [optional] **status** | **str** | | [optional] -**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. | [optional] -**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. | [optional] +**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time. | [optional] +**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time. | [optional] **order_line_id** | **str, none_type** | Order line ID that appears on the invoice. | [optional] **tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **start_time** | **int, none_type** | Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] **end_time** | **int, none_type** | Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] -**summary_status** | **str** | Summary status for campaigns | [optional] +**is_flexible_daily_budgets** | **bool, none_type** | Determine if a campaign has flexible daily budgets setup. | [optional] **objective_type** | [**ObjectiveType**](ObjectiveType.md) | | [optional] **created_time** | **int** | Campaign creation time. Unix timestamp in seconds. | [optional] **updated_time** | **int** | UTC timestamp. Last update time. | [optional] **type** | **str** | Always \"campaign\". | [optional] -**is_flexible_daily_budgets** | **bool, none_type** | Determines if a campaign has flexible daily budgets setup. | [optional] **is_campaign_budget_optimization** | **bool, none_type** | Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared. | [optional] +**summary_status** | [**CampaignSummaryStatus**](CampaignSummaryStatus.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignResponseAllOf.md b/docs/CampaignResponseAllOf.md index e141df4..b8f7291 100644 --- a/docs/CampaignResponseAllOf.md +++ b/docs/CampaignResponseAllOf.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **created_time** | **int** | Campaign creation time. Unix timestamp in seconds. | [optional] **updated_time** | **int** | UTC timestamp. Last update time. | [optional] **type** | **str** | Always \"campaign\". | [optional] -**is_flexible_daily_budgets** | **bool, none_type** | Determines if a campaign has flexible daily budgets setup. | [optional] **is_campaign_budget_optimization** | **bool, none_type** | Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared. | [optional] +**summary_status** | [**CampaignSummaryStatus**](CampaignSummaryStatus.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignSummaryStatus.md b/docs/CampaignSummaryStatus.md index 6830d7a..429b183 100644 --- a/docs/CampaignSummaryStatus.md +++ b/docs/CampaignSummaryStatus.md @@ -5,7 +5,7 @@ Summary status for campaign ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Summary status for campaign | must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", ] +**value** | **str** | Summary status for campaign | must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignUpdateRequest.md b/docs/CampaignUpdateRequest.md index 6aa016f..f245304 100644 --- a/docs/CampaignUpdateRequest.md +++ b/docs/CampaignUpdateRequest.md @@ -5,20 +5,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Campaign ID. | -**ad_account_id** | **str** | Campaign's Advertiser ID. | +**ad_account_id** | **str** | Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema. | **name** | **str** | Campaign name. | [optional] -**status** | **str, none_type** | | [optional] -**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. | [optional] -**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. | [optional] +**status** | **str** | | [optional] +**lifetime_spend_cap** | **int, none_type** | Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time. | [optional] +**daily_spend_cap** | **int, none_type** | Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time. | [optional] **order_line_id** | **str, none_type** | Order line ID that appears on the invoice. | [optional] **tracking_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **start_time** | **int, none_type** | Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] **end_time** | **int, none_type** | Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns. | [optional] -**summary_status** | **str** | Summary status for campaigns | [optional] -**is_campaign_budget_optimization** | **bool, none_type** | | [optional] -**is_flexible_daily_budgets** | **bool, none_type** | | [optional] +**is_flexible_daily_budgets** | **bool, none_type** | Determine if a campaign has flexible daily budgets setup. | [optional] **default_ad_group_budget_in_micro_currency** | **int, none_type** | When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account. | [optional] -**is_automated_campaign** | **bool, none_type** | | [optional] +**is_automated_campaign** | **bool, none_type** | Specifies whether the campaign was created in the automated campaign flow | [optional] +**is_campaign_budget_optimization** | **bool, none_type** | Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared. | [optional] +**objective_type** | **str, none_type** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignUpdateRequestAllOf.md b/docs/CampaignUpdateRequestAllOf.md index 38dcabe..f689b9e 100644 --- a/docs/CampaignUpdateRequestAllOf.md +++ b/docs/CampaignUpdateRequestAllOf.md @@ -4,10 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**is_campaign_budget_optimization** | **bool, none_type** | | [optional] -**is_flexible_daily_budgets** | **bool, none_type** | | [optional] -**is_automated_campaign** | **bool, none_type** | | [optional] -**status** | **str, none_type** | | [optional] +**is_campaign_budget_optimization** | **bool, none_type** | Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared. | [optional] +**objective_type** | **str, none_type** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignsApi.md b/docs/CampaignsApi.md index 204e22b..aabf1bb 100644 --- a/docs/CampaignsApi.md +++ b/docs/CampaignsApi.md @@ -29,7 +29,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import campaigns_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.granularity import Granularity -from openapi_generated.pinterest_client.model.ads_analytics_targeting_type import AdsAnalyticsTargetingType +from openapi_generated.pinterest_client.model.ads_analytics_campaign_targeting_type import AdsAnalyticsCampaignTargetingType from openapi_generated.pinterest_client.model.conversion_report_attribution_type import ConversionReportAttributionType from openapi_generated.pinterest_client.model.metrics_response import MetricsResponse from pprint import pprint @@ -61,8 +61,8 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: start_date = dateutil_parser('1970-01-01').date() # date | Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. end_date = dateutil_parser('1970-01-01').date() # date | Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. targeting_types = [ - AdsAnalyticsTargetingType("APPTYPE"), - ] # [AdsAnalyticsTargetingType] | Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. + AdsAnalyticsCampaignTargetingType("APPTYPE"), + ] # [AdsAnalyticsCampaignTargetingType] | Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. columns = [ "TOTAL_CONVERSIONS", ] # [str] | Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.
For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned @@ -100,7 +100,7 @@ Name | Type | Description | Notes **campaign_ids** | **[str]**| List of Campaign Ids to use to filter the results. | **start_date** | **date**| Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. | **end_date** | **date**| Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. | - **targeting_types** | [**[AdsAnalyticsTargetingType]**](AdsAnalyticsTargetingType.md)| Targeting type breakdowns for the report. The reporting per targeting type <br> is independent from each other. | + **targeting_types** | [**[AdsAnalyticsCampaignTargetingType]**](AdsAnalyticsCampaignTargetingType.md)| Targeting type breakdowns for the report. The reporting per targeting type <br> is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. | **columns** | **[str]**| Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned | **granularity** | **Granularity**| TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly | **click_window_days** | **int**| Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional] if omitted the server will use the default value of 30 @@ -428,6 +428,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import campaigns_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.campaign_response import CampaignResponse from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -456,7 +457,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: "4", ] # [str] | List of Campaign Ids to use to filter the results. (optional) entity_statuses = ["ACTIVE","PAUSED"] # [str] | Entity status (optional) if omitted the server will use the default value of ["ACTIVE","PAUSED"] - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) @@ -486,7 +487,7 @@ Name | Type | Description | Notes **ad_account_id** | **str**| Unique identifier of an ad account. | **campaign_ids** | **[str]**| List of Campaign Ids to use to filter the results. | [optional] **entity_statuses** | **[str]**| Entity status | [optional] if omitted the server will use the default value of ["ACTIVE","PAUSED"] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] diff --git a/docs/CancelInvitesBody.md b/docs/CancelInvitesBody.md new file mode 100644 index 0000000..59874af --- /dev/null +++ b/docs/CancelInvitesBody.md @@ -0,0 +1,13 @@ +# CancelInvitesBody + +Request body used to cancel invites + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_ids** | **[str]** | List of invite/request ids to be cancelled | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Catalog.md b/docs/Catalog.md new file mode 100644 index 0000000..a0f1f4e --- /dev/null +++ b/docs/Catalog.md @@ -0,0 +1,17 @@ +# Catalog + +Catalog entity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**id** | **str** | ID of the catalog entity. | +**updated_at** | **datetime** | | +**name** | **str, none_type** | A human-friendly name associated to a catalog entity. | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogAllOf.md b/docs/CatalogAllOf.md new file mode 100644 index 0000000..fb114d8 --- /dev/null +++ b/docs/CatalogAllOf.md @@ -0,0 +1,14 @@ +# CatalogAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the catalog entity. | +**name** | **str, none_type** | A human-friendly name associated to a catalog entity. | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsApi.md b/docs/CatalogsApi.md index 7df0ce5..263e6fb 100644 --- a/docs/CatalogsApi.md +++ b/docs/CatalogsApi.md @@ -4,32 +4,41 @@ All URIs are relative to *https://api.pinterest.com/v5* Method | HTTP request | Description ------------- | ------------- | ------------- -[**catalogs_product_group_pins_list**](CatalogsApi.md#catalogs_product_group_pins_list) | **GET** /catalogs/product_groups/{product_group_id}/products | List products for a Product Group +[**catalogs_create**](CatalogsApi.md#catalogs_create) | **POST** /catalogs | Create catalog +[**catalogs_list**](CatalogsApi.md#catalogs_list) | **GET** /catalogs | List catalogs +[**catalogs_product_group_pins_list**](CatalogsApi.md#catalogs_product_group_pins_list) | **GET** /catalogs/product_groups/{product_group_id}/products | List products by product group [**catalogs_product_groups_create**](CatalogsApi.md#catalogs_product_groups_create) | **POST** /catalogs/product_groups | Create product group +[**catalogs_product_groups_create_many**](CatalogsApi.md#catalogs_product_groups_create_many) | **POST** /catalogs/product_groups/multiple | Create product groups [**catalogs_product_groups_delete**](CatalogsApi.md#catalogs_product_groups_delete) | **DELETE** /catalogs/product_groups/{product_group_id} | Delete product group +[**catalogs_product_groups_delete_many**](CatalogsApi.md#catalogs_product_groups_delete_many) | **DELETE** /catalogs/product_groups/multiple | Delete product groups [**catalogs_product_groups_get**](CatalogsApi.md#catalogs_product_groups_get) | **GET** /catalogs/product_groups/{product_group_id} | Get product group [**catalogs_product_groups_list**](CatalogsApi.md#catalogs_product_groups_list) | **GET** /catalogs/product_groups | List product groups -[**catalogs_product_groups_product_counts_get**](CatalogsApi.md#catalogs_product_groups_product_counts_get) | **GET** /catalogs/product_groups/{product_group_id}/product_counts | Get product counts for a Product Group -[**catalogs_product_groups_update**](CatalogsApi.md#catalogs_product_groups_update) | **PATCH** /catalogs/product_groups/{product_group_id} | Update product group -[**feed_processing_results_list**](CatalogsApi.md#feed_processing_results_list) | **GET** /catalogs/feeds/{feed_id}/processing_results | List processing results for a given feed +[**catalogs_product_groups_product_counts_get**](CatalogsApi.md#catalogs_product_groups_product_counts_get) | **GET** /catalogs/product_groups/{product_group_id}/product_counts | Get product counts +[**catalogs_product_groups_update**](CatalogsApi.md#catalogs_product_groups_update) | **PATCH** /catalogs/product_groups/{product_group_id} | Update single product group +[**feed_processing_results_list**](CatalogsApi.md#feed_processing_results_list) | **GET** /catalogs/feeds/{feed_id}/processing_results | List feed processing results [**feeds_create**](CatalogsApi.md#feeds_create) | **POST** /catalogs/feeds | Create feed [**feeds_delete**](CatalogsApi.md#feeds_delete) | **DELETE** /catalogs/feeds/{feed_id} | Delete feed [**feeds_get**](CatalogsApi.md#feeds_get) | **GET** /catalogs/feeds/{feed_id} | Get feed +[**feeds_ingest**](CatalogsApi.md#feeds_ingest) | **POST** /catalogs/feeds/{feed_id}/ingest | Ingest feed items [**feeds_list**](CatalogsApi.md#feeds_list) | **GET** /catalogs/feeds | List feeds [**feeds_update**](CatalogsApi.md#feeds_update) | **PATCH** /catalogs/feeds/{feed_id} | Update feed -[**items_batch_get**](CatalogsApi.md#items_batch_get) | **GET** /catalogs/items/batch/{batch_id} | Get catalogs items batch +[**items_batch_get**](CatalogsApi.md#items_batch_get) | **GET** /catalogs/items/batch/{batch_id} | Get item batch status [**items_batch_post**](CatalogsApi.md#items_batch_post) | **POST** /catalogs/items/batch | Operate on item batch [**items_get**](CatalogsApi.md#items_get) | **GET** /catalogs/items | Get catalogs items -[**items_issues_list**](CatalogsApi.md#items_issues_list) | **GET** /catalogs/processing_results/{processing_result_id}/item_issues | List item issues for a given processing result -[**products_by_product_group_filter_list**](CatalogsApi.md#products_by_product_group_filter_list) | **POST** /catalogs/products/get_by_product_group_filters | List filtered products +[**items_issues_list**](CatalogsApi.md#items_issues_list) | **GET** /catalogs/processing_results/{processing_result_id}/item_issues | List item issues +[**items_post**](CatalogsApi.md#items_post) | **POST** /catalogs/items | Get catalogs items (POST) +[**products_by_product_group_filter_list**](CatalogsApi.md#products_by_product_group_filter_list) | **POST** /catalogs/products/get_by_product_group_filters | List products by filter +[**reports_create**](CatalogsApi.md#reports_create) | **POST** /catalogs/reports | Build catalogs report +[**reports_get**](CatalogsApi.md#reports_get) | **GET** /catalogs/reports | Get catalogs report +[**reports_stats**](CatalogsApi.md#reports_stats) | **GET** /catalogs/reports/stats | List report stats -# **catalogs_product_group_pins_list** -> bool, date, datetime, dict, float, int, list, str, none_type catalogs_product_group_pins_list(product_group_id) +# **catalogs_create** +> Catalog catalogs_create(catalogs_create_request) -List products for a Product Group +Create catalog -Get a list of product pins for a given Catalogs Product Group Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Create a new catalog owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more Note: this API only supports the catalog type of HOTEL for now. ### Example @@ -40,7 +49,8 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.catalogs_create_request import CatalogsCreateRequest +from openapi_generated.pinterest_client.model.catalog import Catalog from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -63,27 +73,28 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - product_group_id = "4" # str | Unique identifier of a product group - bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + catalogs_create_request = CatalogsCreateRequest( + catalog_type="HOTEL", + name="name_example", + ) # CatalogsCreateRequest | Request object used to created a feed. ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # List products for a Product Group - api_response = api_instance.catalogs_product_group_pins_list(product_group_id) + # Create catalog + api_response = api_instance.catalogs_create(catalogs_create_request) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_group_pins_list: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_create: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # List products for a Product Group - api_response = api_instance.catalogs_product_group_pins_list(product_group_id, bookmark=bookmark, page_size=page_size, ad_account_id=ad_account_id) + # Create catalog + api_response = api_instance.catalogs_create(catalogs_create_request, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_group_pins_list: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_create: %s\n" % e) ``` @@ -91,14 +102,12 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **product_group_id** | **str**| Unique identifier of a product group | - **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **catalogs_create_request** | [**CatalogsCreateRequest**](CatalogsCreateRequest.md)| Request object used to created a feed. | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -**bool, date, datetime, dict, float, int, list, str, none_type** +[**Catalog**](Catalog.md) ### Authorization @@ -106,7 +115,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -117,17 +126,16 @@ Name | Type | Description | Notes **200** | Success | - | **400** | Invalid parameters. | - | **401** | Unauthorized access. | - | -**404** | Catalogs product group not found. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **catalogs_product_groups_create** -> CatalogsProductGroup catalogs_product_groups_create(catalogs_product_group_create_request) +# **catalogs_list** +> bool, date, datetime, dict, float, int, list, str, none_type catalogs_list() -Create product group +List catalogs -Create product group to use in Catalogs owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Fetch catalogs owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more ### Example @@ -138,8 +146,8 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.catalogs_product_group_create_request import CatalogsProductGroupCreateRequest -from openapi_generated.pinterest_client.model.catalogs_product_group import CatalogsProductGroup +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.catalog import Catalog from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -162,25 +170,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - catalogs_product_group_create_request = CatalogsProductGroupCreateRequest() # CatalogsProductGroupCreateRequest | Request object used to created a catalogs product group. + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 ad_account_id = "4" # str | Unique identifier of an ad account. (optional) - # example passing only required values which don't have defaults set - try: - # Create product group - api_response = api_instance.catalogs_product_groups_create(catalogs_product_group_create_request) - pprint(api_response) - except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_create: %s\n" % e) - # example passing only required values which don't have defaults set # and optional values try: - # Create product group - api_response = api_instance.catalogs_product_groups_create(catalogs_product_group_create_request, ad_account_id=ad_account_id) + # List catalogs + api_response = api_instance.catalogs_list(bookmark=bookmark, page_size=page_size, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_create: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_list: %s\n" % e) ``` @@ -188,12 +189,13 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **catalogs_product_group_create_request** | [**CatalogsProductGroupCreateRequest**](CatalogsProductGroupCreateRequest.md)| Request object used to created a catalogs product group. | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -[**CatalogsProductGroup**](CatalogsProductGroup.md) +**bool, date, datetime, dict, float, int, list, str, none_type** ### Authorization @@ -201,7 +203,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json @@ -209,21 +211,19 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Success | - | -**400** | Invalid body. | - | +**200** | Success | - | +**400** | Invalid parameters. | - | **401** | Unauthorized access. | - | -**403** | Forbidden. Account not approved for catalog product group mutations yet. | - | -**409** | Conflict. Can't create this catalogs product group with this value. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **catalogs_product_groups_delete** -> catalogs_product_groups_delete(product_group_id) +# **catalogs_product_group_pins_list** +> bool, date, datetime, dict, float, int, list, str, none_type catalogs_product_group_pins_list(product_group_id) -Delete product group +List products by product group -Delete a product group owned by the \"operation user_account\" from being in use in Catalogs. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Get a list of product pins for a given Catalogs Product Group Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more ### Example @@ -234,6 +234,8 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.catalogs_product import CatalogsProduct +from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -257,22 +259,27 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) product_group_id = "4" # str | Unique identifier of a product group + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + pin_metrics = False # bool | Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. (optional) if omitted the server will use the default value of False # example passing only required values which don't have defaults set try: - # Delete product group - api_instance.catalogs_product_groups_delete(product_group_id) + # List products by product group + api_response = api_instance.catalogs_product_group_pins_list(product_group_id) + pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_delete: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_group_pins_list: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Delete product group - api_instance.catalogs_product_groups_delete(product_group_id, ad_account_id=ad_account_id) + # List products by product group + api_response = api_instance.catalogs_product_group_pins_list(product_group_id, bookmark=bookmark, page_size=page_size, ad_account_id=ad_account_id, pin_metrics=pin_metrics) + pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_delete: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_group_pins_list: %s\n" % e) ``` @@ -281,11 +288,14 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **product_group_id** | **str**| Unique identifier of a product group | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + **pin_metrics** | **bool**| Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before <code>2023-03-20</code> lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. | [optional] if omitted the server will use the default value of False ### Return type -void (empty response body) +**bool, date, datetime, dict, float, int, list, str, none_type** ### Authorization @@ -301,22 +311,20 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Catalogs Product Group deleted successfully. | - | -**400** | Invalid catalogs product group id parameters. | - | +**200** | Success | - | +**400** | Invalid parameters. | - | **401** | Unauthorized access. | - | -**403** | Forbidden. Account not approved for catalog product group mutations yet. | - | **404** | Catalogs product group not found. | - | -**409** | Conflict. Can't delete this catalogs product group. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **catalogs_product_groups_get** -> CatalogsProductGroup catalogs_product_groups_get(product_group_id) +# **catalogs_product_groups_create** +> CatalogsVerticalProductGroup catalogs_product_groups_create(unknown_base_type) -Get product group +Create product group -Get a singe product group for a given Catalogs Product Group Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Create product group to use in Catalogs owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. ### Example @@ -327,7 +335,10 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.catalogs_product_group import CatalogsProductGroup +from openapi_generated.pinterest_client.model.catalogs_product_group_create_request import CatalogsProductGroupCreateRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group_create_request import CatalogsVerticalProductGroupCreateRequest +from openapi_generated.pinterest_client.model.unknownbasetype import UNKNOWNBASETYPE +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group import CatalogsVerticalProductGroup from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -350,25 +361,25 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - product_group_id = "4" # str | Unique identifier of a product group + unknown_base_type = None # UNKNOWN_BASE_TYPE | Request object used to create a single catalogs product groups. ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # Get product group - api_response = api_instance.catalogs_product_groups_get(product_group_id) + # Create product group + api_response = api_instance.catalogs_product_groups_create(unknown_base_type) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_get: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_create: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Get product group - api_response = api_instance.catalogs_product_groups_get(product_group_id, ad_account_id=ad_account_id) + # Create product group + api_response = api_instance.catalogs_product_groups_create(unknown_base_type, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_get: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_create: %s\n" % e) ``` @@ -376,12 +387,12 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **product_group_id** | **str**| Unique identifier of a product group | + **unknown_base_type** | [**UNKNOWN_BASE_TYPE**](UNKNOWN_BASE_TYPE.md)| Request object used to create a single catalogs product groups. | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -[**CatalogsProductGroup**](CatalogsProductGroup.md) +[**CatalogsVerticalProductGroup**](CatalogsVerticalProductGroup.md) ### Authorization @@ -389,7 +400,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -397,22 +408,21 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | -**400** | Invalid catalogs product group id parameters. | - | +**201** | Success | - | +**400** | Invalid body. | - | **401** | Unauthorized access. | - | **403** | Forbidden. Account not approved for catalog product group mutations yet. | - | -**404** | Catalogs product group not found. | - | -**409** | Conflict. Can't get a catalogs product group without an existing catalog. | - | +**409** | Conflict. Can't create this catalogs product group with this value. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **catalogs_product_groups_list** -> bool, date, datetime, dict, float, int, list, str, none_type catalogs_product_groups_list(feed_id) +# **catalogs_product_groups_create_many** +> [str] catalogs_product_groups_create_many(request_body) -List product groups +Create product groups -Get a list of product groups for a given Catalogs Feed Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Create product group to use in Catalogs owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. ### Example @@ -423,7 +433,8 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.catalogs_product_group_create_request import CatalogsProductGroupCreateRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group_create_request import CatalogsVerticalProductGroupCreateRequest from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -446,27 +457,25 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - feed_id = "4" # str | Unique identifier of a feed - bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + request_body = [{"name":"Few Filters using \"all_of\"","feed_id":"2680059592705","filters":{"all_of":[{"MIN_PRICE":{"values":999.99,"inclusion":true}},{"CURRENCY":{"values":"USD"}},{"CUSTOM_LABEL_0":{"values":["Luxury Items"]}}]}}] # [bool, date, datetime, dict, float, int, list, str, none_type] | Request object used to create one or more catalogs product groups. ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # List product groups - api_response = api_instance.catalogs_product_groups_list(feed_id) + # Create product groups + api_response = api_instance.catalogs_product_groups_create_many(request_body) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_list: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_create_many: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # List product groups - api_response = api_instance.catalogs_product_groups_list(feed_id, bookmark=bookmark, page_size=page_size, ad_account_id=ad_account_id) + # Create product groups + api_response = api_instance.catalogs_product_groups_create_many(request_body, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_list: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_create_many: %s\n" % e) ``` @@ -474,14 +483,12 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **feed_id** | **str**| Unique identifier of a feed | - **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **request_body** | **[bool, date, datetime, dict, float, int, list, str, none_type]**| Request object used to create one or more catalogs product groups. | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -**bool, date, datetime, dict, float, int, list, str, none_type** +**[str]** ### Authorization @@ -489,7 +496,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -497,22 +504,21 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | -**400** | Invalid feed parameters. | - | +**201** | Success | - | +**400** | Invalid body. | - | **401** | Unauthorized access. | - | **403** | Forbidden. Account not approved for catalog product group mutations yet. | - | -**404** | Data feed not found. | - | **409** | Conflict. Can't create this catalogs product group with this value. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **catalogs_product_groups_product_counts_get** -> CatalogsProductGroupProductCounts catalogs_product_groups_product_counts_get(product_group_id) +# **catalogs_product_groups_delete** +> catalogs_product_groups_delete(product_group_id) -Get product counts for a Product Group +Delete product group -Get a product counts for a given Catalogs Product Group owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Delete a product group owned by the \"operation user_account\" from being in use in Catalogs. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more ### Example @@ -523,7 +529,6 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.catalogs_product_group_product_counts import CatalogsProductGroupProductCounts from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -551,20 +556,18 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set try: - # Get product counts for a Product Group - api_response = api_instance.catalogs_product_groups_product_counts_get(product_group_id) - pprint(api_response) + # Delete product group + api_instance.catalogs_product_groups_delete(product_group_id) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_product_counts_get: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_delete: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Get product counts for a Product Group - api_response = api_instance.catalogs_product_groups_product_counts_get(product_group_id, ad_account_id=ad_account_id) - pprint(api_response) + # Delete product group + api_instance.catalogs_product_groups_delete(product_group_id, ad_account_id=ad_account_id) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_product_counts_get: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_delete: %s\n" % e) ``` @@ -577,7 +580,7 @@ Name | Type | Description | Notes ### Return type -[**CatalogsProductGroupProductCounts**](CatalogsProductGroupProductCounts.md) +void (empty response body) ### Authorization @@ -593,19 +596,22 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | -**404** | Product Group Not Found. | - | -**409** | Can't access this feature without an existing catalog. | - | +**204** | Catalogs Product Group deleted successfully. | - | +**400** | Invalid catalogs product group id parameters. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden. Account not approved for catalog product group mutations yet. | - | +**404** | Catalogs product group not found. | - | +**409** | Conflict. Can't delete this catalogs product group. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **catalogs_product_groups_update** -> CatalogsProductGroup catalogs_product_groups_update(product_group_id, catalogs_product_group_update_request) +# **catalogs_product_groups_delete_many** +> catalogs_product_groups_delete_many(id) -Update product group +Delete product groups -Update product group owned by the \"operation user_account\" to use in Catalogs. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Delete product groups owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more ### Example @@ -615,9 +621,7 @@ Update product group owned by the \"operation user_account\" to use in Catalogs. import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api -from openapi_generated.pinterest_client.model.catalogs_product_group_update_request import CatalogsProductGroupUpdateRequest from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.catalogs_product_group import CatalogsProductGroup from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -640,31 +644,25 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - product_group_id = "4" # str | Unique identifier of a product group - catalogs_product_group_update_request = CatalogsProductGroupUpdateRequest( - name="name_example", - description="description_example", - is_featured=True, - filters=CatalogsProductGroupFiltersRequest(), - ) # CatalogsProductGroupUpdateRequest | Request object used to Update a catalogs product group. + id = [ + 1, + ] # [int] | Comma-separated list of product group ids ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # Update product group - api_response = api_instance.catalogs_product_groups_update(product_group_id, catalogs_product_group_update_request) - pprint(api_response) + # Delete product groups + api_instance.catalogs_product_groups_delete_many(id) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_update: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_delete_many: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Update product group - api_response = api_instance.catalogs_product_groups_update(product_group_id, catalogs_product_group_update_request, ad_account_id=ad_account_id) - pprint(api_response) + # Delete product groups + api_instance.catalogs_product_groups_delete_many(id, ad_account_id=ad_account_id) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->catalogs_product_groups_update: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_delete_many: %s\n" % e) ``` @@ -672,13 +670,12 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **product_group_id** | **str**| Unique identifier of a product group | - **catalogs_product_group_update_request** | [**CatalogsProductGroupUpdateRequest**](CatalogsProductGroupUpdateRequest.md)| Request object used to Update a catalogs product group. | + **id** | **[int]**| Comma-separated list of product group ids | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -[**CatalogsProductGroup**](CatalogsProductGroup.md) +void (empty response body) ### Authorization @@ -686,7 +683,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json @@ -694,22 +691,21 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | -**400** | Invalid parameters. | - | +**204** | Catalogs Product Groups deleted successfully. | - | **401** | Unauthorized access. | - | **403** | Forbidden. Account not approved for catalog product group mutations yet. | - | **404** | Catalogs product group not found. | - | -**409** | Conflict. Can't update this catalogs product group to this value. | - | +**409** | Conflict. Can't delete this catalogs product group. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **feed_processing_results_list** -> bool, date, datetime, dict, float, int, list, str, none_type feed_processing_results_list(feed_id) +# **catalogs_product_groups_get** +> CatalogsVerticalProductGroup catalogs_product_groups_get(product_group_id) -List processing results for a given feed +Get product group -Fetch a feed processing results owned by the \"operation user_account\". Please note that for now the bookmark parameter is not functional and only the first page will be available until it is implemented in some release in the near future. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Get a singe product group for a given Catalogs Product Group Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more ### Example @@ -720,7 +716,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group import CatalogsVerticalProductGroup from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -743,27 +739,25 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - feed_id = "4" # str | Unique identifier of a feed - bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + product_group_id = "4" # str | Unique identifier of a product group ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # List processing results for a given feed - api_response = api_instance.feed_processing_results_list(feed_id) + # Get product group + api_response = api_instance.catalogs_product_groups_get(product_group_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feed_processing_results_list: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_get: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # List processing results for a given feed - api_response = api_instance.feed_processing_results_list(feed_id, bookmark=bookmark, page_size=page_size, ad_account_id=ad_account_id) + # Get product group + api_response = api_instance.catalogs_product_groups_get(product_group_id, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feed_processing_results_list: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_get: %s\n" % e) ``` @@ -771,14 +765,12 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **feed_id** | **str**| Unique identifier of a feed | - **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **product_group_id** | **str**| Unique identifier of a product group | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -**bool, date, datetime, dict, float, int, list, str, none_type** +[**CatalogsVerticalProductGroup**](CatalogsVerticalProductGroup.md) ### Authorization @@ -795,19 +787,21 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Success | - | -**400** | Invalid parameters. | - | +**400** | Invalid catalogs product group id parameters. | - | **401** | Unauthorized access. | - | -**404** | Feed not found. | - | +**403** | Forbidden. Account not approved for catalog product group mutations yet. | - | +**404** | Catalogs product group not found. | - | +**409** | Conflict. Can't get a catalogs product group without an existing catalog. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **feeds_create** -> CatalogsFeed feeds_create(catalogs_feeds_create_request) +# **catalogs_product_groups_list** +> bool, date, datetime, dict, float, int, list, str, none_type catalogs_product_groups_list() -Create feed +List product groups -Create a new feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Please, be aware that \"default_country\" and \"default_locale\" are not required in the spec for forward compatibility but for now the API will not accept requests without those fields. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Get a list of product groups for a given Catalogs Feed Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more ### Example @@ -817,9 +811,9 @@ Create a new feed owned by the \"operation user_account\". - By default, the \"o import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api -from openapi_generated.pinterest_client.model.catalogs_feeds_create_request import CatalogsFeedsCreateRequest from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.catalogs_feed import CatalogsFeed +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group import CatalogsVerticalProductGroup from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -842,41 +836,23 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - catalogs_feeds_create_request = CatalogsFeedsCreateRequest( - default_country=Country("US"), - default_availability=ProductAvailabilityType("IN_STOCK"), - default_currency=NullableCurrency("USD"), - name="name_example", - format=CatalogsFormat("TSV"), - default_locale=None, - credentials=CatalogsFeedCredentials( - password="password_example", - username="username_example", - ), - location="ftp:", - preferred_processing_schedule=CatalogsFeedProcessingSchedule( - time="02:59", - timezone="Africa/Abidjan", - ), - ) # CatalogsFeedsCreateRequest | Request object used to created a feed. + id = [ + 1, + ] # [int] | Comma-separated list of product group ids (optional) + feed_id = "4" # str | Filter entities for a given feed_id. If not given, all feeds are considered. (optional) + catalog_id = "4" # str | Filter entities for a given catalog_id. If not given, all catalogs are considered. (optional) + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 ad_account_id = "4" # str | Unique identifier of an ad account. (optional) - # example passing only required values which don't have defaults set - try: - # Create feed - api_response = api_instance.feeds_create(catalogs_feeds_create_request) - pprint(api_response) - except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feeds_create: %s\n" % e) - # example passing only required values which don't have defaults set # and optional values try: - # Create feed - api_response = api_instance.feeds_create(catalogs_feeds_create_request, ad_account_id=ad_account_id) + # List product groups + api_response = api_instance.catalogs_product_groups_list(id=id, feed_id=feed_id, catalog_id=catalog_id, bookmark=bookmark, page_size=page_size, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feeds_create: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_list: %s\n" % e) ``` @@ -884,12 +860,16 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **catalogs_feeds_create_request** | [**CatalogsFeedsCreateRequest**](CatalogsFeedsCreateRequest.md)| Request object used to created a feed. | + **id** | **[int]**| Comma-separated list of product group ids | [optional] + **feed_id** | **str**| Filter entities for a given feed_id. If not given, all feeds are considered. | [optional] + **catalog_id** | **str**| Filter entities for a given catalog_id. If not given, all catalogs are considered. | [optional] + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -[**CatalogsFeed**](CatalogsFeed.md) +**bool, date, datetime, dict, float, int, list, str, none_type** ### Authorization @@ -897,7 +877,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json @@ -905,23 +885,22 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Success | - | +**200** | Success | - | **400** | Invalid feed parameters. | - | **401** | Unauthorized access. | - | -**403** | Business account required. | - | -**409** | User website required. | - | -**422** | Unique feed name is required. | - | -**501** | Not implemented (absent \"default_country\" or \"default_locale\"). | - | -**0** | Unexpected error | - | +**403** | Forbidden. Account not approved for catalog product group mutations yet. | - | +**404** | Data feed not found. | - | +**409** | Conflict. Can't create this catalogs product group with this value. | - | +**0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **feeds_delete** -> feeds_delete(feed_id) +# **catalogs_product_groups_product_counts_get** +> CatalogsProductGroupProductCountsVertical catalogs_product_groups_product_counts_get(product_group_id) -Delete feed +Get product counts -Delete a feed owned by the \"operating user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Get a product counts for a given Catalogs Product Group owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more ### Example @@ -931,6 +910,7 @@ Delete a feed owned by the \"operating user_account\". - By default, the \"opera import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.catalogs_product_group_product_counts_vertical import CatalogsProductGroupProductCountsVertical from openapi_generated.pinterest_client.model.error import Error from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -954,23 +934,25 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - feed_id = "4" # str | Unique identifier of a feed + product_group_id = "4" # str | Unique identifier of a product group ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # Delete feed - api_instance.feeds_delete(feed_id) + # Get product counts + api_response = api_instance.catalogs_product_groups_product_counts_get(product_group_id) + pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feeds_delete: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_product_counts_get: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Delete feed - api_instance.feeds_delete(feed_id, ad_account_id=ad_account_id) + # Get product counts + api_response = api_instance.catalogs_product_groups_product_counts_get(product_group_id, ad_account_id=ad_account_id) + pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feeds_delete: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_product_counts_get: %s\n" % e) ``` @@ -978,12 +960,12 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **feed_id** | **str**| Unique identifier of a feed | + **product_group_id** | **str**| Unique identifier of a product group | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -void (empty response body) +[**CatalogsProductGroupProductCountsVertical**](CatalogsProductGroupProductCountsVertical.md) ### Authorization @@ -999,21 +981,19 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Feed deleted successfully. | - | -**400** | Invalid feed parameters. | - | -**403** | Forbidden. Account not approved for feed mutations yet. | - | -**404** | Data feed not found. | - | -**409** | Conflict. Can't delete a feed with active promotions. | - | -**0** | Unexpected error | - | +**200** | Success | - | +**404** | Product Group Not Found. | - | +**409** | Can't access this feature without an existing catalog. | - | +**0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **feeds_get** -> CatalogsFeed feeds_get(feed_id) +# **catalogs_product_groups_update** +> CatalogsVerticalProductGroup catalogs_product_groups_update(product_group_id, unknown_base_type) -Get feed +Update single product group -Get a single feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Update product group owned by the \"operation user_account\" to use in Catalogs. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. ### Example @@ -1023,8 +1003,11 @@ Get a single feed owned by the \"operation user_account\". - By default, the \"o import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.catalogs_product_group_update_request import CatalogsProductGroupUpdateRequest from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.catalogs_feed import CatalogsFeed +from openapi_generated.pinterest_client.model.unknownbasetype import UNKNOWNBASETYPE +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group import CatalogsVerticalProductGroup +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group_update_request import CatalogsVerticalProductGroupUpdateRequest from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -1047,25 +1030,26 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - feed_id = "4" # str | Unique identifier of a feed + product_group_id = "4" # str | Unique identifier of a product group + unknown_base_type = None # UNKNOWN_BASE_TYPE | Request object used to Update a catalogs product group. ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # Get feed - api_response = api_instance.feeds_get(feed_id) + # Update single product group + api_response = api_instance.catalogs_product_groups_update(product_group_id, unknown_base_type) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feeds_get: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_update: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Get feed - api_response = api_instance.feeds_get(feed_id, ad_account_id=ad_account_id) + # Update single product group + api_response = api_instance.catalogs_product_groups_update(product_group_id, unknown_base_type, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feeds_get: %s\n" % e) + print("Exception when calling CatalogsApi->catalogs_product_groups_update: %s\n" % e) ``` @@ -1073,12 +1057,13 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **feed_id** | **str**| Unique identifier of a feed | + **product_group_id** | **str**| Unique identifier of a product group | + **unknown_base_type** | [**UNKNOWN_BASE_TYPE**](UNKNOWN_BASE_TYPE.md)| Request object used to Update a catalogs product group. | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -[**CatalogsFeed**](CatalogsFeed.md) +[**CatalogsVerticalProductGroup**](CatalogsVerticalProductGroup.md) ### Authorization @@ -1086,7 +1071,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -1095,19 +1080,21 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Success | - | -**400** | Invalid feed parameters. | - | +**400** | Invalid parameters. | - | **401** | Unauthorized access. | - | -**404** | Data feed not found. | - | +**403** | Forbidden. Account not approved for catalog product group mutations yet. | - | +**404** | Catalogs product group not found. | - | +**409** | Conflict. Can't update this catalogs product group to this value. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **feeds_list** -> bool, date, datetime, dict, float, int, list, str, none_type feeds_list() +# **feed_processing_results_list** +> bool, date, datetime, dict, float, int, list, str, none_type feed_processing_results_list(feed_id) -List feeds +List feed processing results -Fetch feeds owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Fetch a feed processing results owned by the \"operation user_account\". Please note that for now the bookmark parameter is not functional and only the first page will be available until it is implemented in some release in the near future. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more ### Example @@ -1119,6 +1106,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.catalogs_feed_processing_result import CatalogsFeedProcessingResult from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -1141,18 +1129,27 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) + feed_id = "4" # str | Unique identifier of a feed bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + # example passing only required values which don't have defaults set + try: + # List feed processing results + api_response = api_instance.feed_processing_results_list(feed_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->feed_processing_results_list: %s\n" % e) + # example passing only required values which don't have defaults set # and optional values try: - # List feeds - api_response = api_instance.feeds_list(bookmark=bookmark, page_size=page_size, ad_account_id=ad_account_id) + # List feed processing results + api_response = api_instance.feed_processing_results_list(feed_id, bookmark=bookmark, page_size=page_size, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feeds_list: %s\n" % e) + print("Exception when calling CatalogsApi->feed_processing_results_list: %s\n" % e) ``` @@ -1160,8 +1157,9 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **feed_id** | **str**| Unique identifier of a feed | **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type @@ -1185,28 +1183,32 @@ Name | Type | Description | Notes **200** | Success | - | **400** | Invalid parameters. | - | **401** | Unauthorized access. | - | +**404** | Feed not found. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **feeds_update** -> CatalogsFeed feeds_update(feed_id, catalogs_feeds_update_request) +# **feeds_create** +> CatalogsFeed feeds_create(unknown_base_type) -Update feed +Create feed -Update a feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Create a new feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Please, be aware that \"default_country\" and \"default_locale\" are not required in the spec for forward compatibility but for now the API will not accept requests without those fields. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. For Retail partners, refer to Before you get started with Catalogs. For Hotel parterns, refer to Pinterest API for shopping. Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.catalogs_feeds_create_request import CatalogsFeedsCreateRequest from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.unknownbasetype import UNKNOWNBASETYPE from openapi_generated.pinterest_client.model.catalogs_feed import CatalogsFeed -from openapi_generated.pinterest_client.model.catalogs_feeds_update_request import CatalogsFeedsUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_feeds_create_request import CatalogsVerticalFeedsCreateRequest from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -1219,6 +1221,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -1229,41 +1237,25 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - feed_id = "4" # str | Unique identifier of a feed - catalogs_feeds_update_request = CatalogsFeedsUpdateRequest( - default_availability=ProductAvailabilityType("IN_STOCK"), - default_currency=NullableCurrency("USD"), - name="name_example", - format=CatalogsFormat("TSV"), - credentials=CatalogsFeedCredentials( - password="password_example", - username="username_example", - ), - location="ftp:", - preferred_processing_schedule=CatalogsFeedProcessingSchedule( - time="02:59", - timezone="Africa/Abidjan", - ), - status=CatalogsStatus("ACTIVE"), - ) # CatalogsFeedsUpdateRequest | Request object used to update a feed. + unknown_base_type = None # UNKNOWN_BASE_TYPE | Request object used to created a feed. ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # Update feed - api_response = api_instance.feeds_update(feed_id, catalogs_feeds_update_request) + # Create feed + api_response = api_instance.feeds_create(unknown_base_type) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feeds_update: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_create: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Update feed - api_response = api_instance.feeds_update(feed_id, catalogs_feeds_update_request, ad_account_id=ad_account_id) + # Create feed + api_response = api_instance.feeds_create(unknown_base_type, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->feeds_update: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_create: %s\n" % e) ``` @@ -1271,8 +1263,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **feed_id** | **str**| Unique identifier of a feed | - **catalogs_feeds_update_request** | [**CatalogsFeedsUpdateRequest**](CatalogsFeedsUpdateRequest.md)| Request object used to update a feed. | + **unknown_base_type** | [**UNKNOWN_BASE_TYPE**](UNKNOWN_BASE_TYPE.md)| Request object used to created a feed. | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type @@ -1281,7 +1272,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -1293,23 +1284,27 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**201** | Success | - | **400** | Invalid feed parameters. | - | -**403** | Forbidden. Account not approved for feed mutations yet. | - | -**404** | Data feed not found. | - | +**401** | Unauthorized access. | - | +**403** | Business account required. | - | +**409** | User website required. | - | +**422** | Unique feed name is required. | - | +**501** | Not implemented (absent \"default_country\" or \"default_locale\"). | - | **0** | Unexpected error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **items_batch_get** -> CatalogsItemsBatch items_batch_get(batch_id) +# **feeds_delete** +> feeds_delete(feed_id) -Get catalogs items batch +Delete feed -Get a single catalogs items batch owned by the \"operating user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. +Delete a feed owned by the \"operating user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. For Retail partners, refer to Before you get started with Catalogs. For Hotel parterns, refer to Pinterest API for shopping. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -1317,7 +1312,6 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.catalogs_items_batch import CatalogsItemsBatch from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -1330,6 +1324,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -1340,25 +1340,23 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - batch_id = "595953100599279259-66753b9bb65c46c49bd8503b27fecf9e" # str | Id of a catalogs items batch to fetch + feed_id = "4" # str | Unique identifier of a feed ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # Get catalogs items batch - api_response = api_instance.items_batch_get(batch_id) - pprint(api_response) + # Delete feed + api_instance.feeds_delete(feed_id) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->items_batch_get: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_delete: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Get catalogs items batch - api_response = api_instance.items_batch_get(batch_id, ad_account_id=ad_account_id) - pprint(api_response) + # Delete feed + api_instance.feeds_delete(feed_id, ad_account_id=ad_account_id) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->items_batch_get: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_delete: %s\n" % e) ``` @@ -1366,16 +1364,16 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **batch_id** | **str**| Id of a catalogs items batch to fetch | + **feed_id** | **str**| Unique identifier of a feed | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -[**CatalogsItemsBatch**](CatalogsItemsBatch.md) +void (empty response body) ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -1387,24 +1385,25 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Response containing the requested catalogs items batch | - | -**401** | Not authenticated to access catalogs items batch | - | -**403** | Not authorized to access catalogs items batch | - | -**404** | Catalogs items batch not found | - | -**405** | Method Not Allowed. | - | +**204** | Feed deleted successfully. | - | +**400** | Invalid feed parameters. | - | +**403** | Forbidden. Account not approved for feed mutations yet. | - | +**404** | Data feed not found. | - | +**409** | Conflict. Can't delete a feed with active promotions. | - | **0** | Unexpected error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **items_batch_post** -> CatalogsItemsBatch items_batch_post(catalogs_items_batch_request) +# **feeds_get** +> CatalogsFeed feeds_get(feed_id) -Operate on item batch +Get feed -This endpoint supports multiple operations on a set of one or more catalog items owned by the \"operation user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. +Get a single feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. For Retail partners, refer to Before you get started with Catalogs. For Hotel parterns, refer to Pinterest API for shopping. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -1412,8 +1411,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.catalogs_items_batch import CatalogsItemsBatch -from openapi_generated.pinterest_client.model.catalogs_items_batch_request import CatalogsItemsBatchRequest +from openapi_generated.pinterest_client.model.catalogs_feed import CatalogsFeed from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -1426,6 +1424,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -1436,25 +1440,25 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - catalogs_items_batch_request = CatalogsItemsBatchRequest() # CatalogsItemsBatchRequest | Request object used to create catalogs items in a batch + feed_id = "4" # str | Unique identifier of a feed ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # Operate on item batch - api_response = api_instance.items_batch_post(catalogs_items_batch_request) + # Get feed + api_response = api_instance.feeds_get(feed_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->items_batch_post: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_get: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Operate on item batch - api_response = api_instance.items_batch_post(catalogs_items_batch_request, ad_account_id=ad_account_id) + # Get feed + api_response = api_instance.feeds_get(feed_id, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->items_batch_post: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_get: %s\n" % e) ``` @@ -1462,20 +1466,20 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **catalogs_items_batch_request** | [**CatalogsItemsBatchRequest**](CatalogsItemsBatchRequest.md)| Request object used to create catalogs items in a batch | + **feed_id** | **str**| Unique identifier of a feed | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -[**CatalogsItemsBatch**](CatalogsItemsBatch.md) +[**CatalogsFeed**](CatalogsFeed.md) ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json @@ -1483,20 +1487,20 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Response containing the requested catalogs items batch | - | -**400** | Invalid request parameters. | - | -**401** | Not authenticated to post catalogs items | - | -**403** | Not authorized to post catalogs items | - | -**0** | Unexpected error | - | +**200** | Success | - | +**400** | Invalid feed parameters. | - | +**401** | Unauthorized access. | - | +**404** | Data feed not found. | - | +**0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **items_get** -> CatalogsItems items_get(country, item_ids, language) +# **feeds_ingest** +> CatalogsFeedIngestion feeds_ingest(feed_id) -Get catalogs items +Ingest feed items -Get the items of the catalog owned by the \"operation user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. +Ingest items for a given feed owned by the \"operation user_account\". Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more Note: This endpoint is restricted to a specific group of users. If you require access, please reach out to your partner manager. ### Example @@ -1507,7 +1511,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.catalogs_items import CatalogsItems +from openapi_generated.pinterest_client.model.catalogs_feed_ingestion import CatalogsFeedIngestion from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -1530,27 +1534,25 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - country = "US" # str | Country for the Catalogs Items - item_ids = ["CR123"] # [str] | Catalogs Item ids - language = "EN" # str | Language for the Catalogs Items + feed_id = "4" # str | Unique identifier of a feed ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # Get catalogs items - api_response = api_instance.items_get(country, item_ids, language) + # Ingest feed items + api_response = api_instance.feeds_ingest(feed_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->items_get: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_ingest: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Get catalogs items - api_response = api_instance.items_get(country, item_ids, language, ad_account_id=ad_account_id) + # Ingest feed items + api_response = api_instance.feeds_ingest(feed_id, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->items_get: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_ingest: %s\n" % e) ``` @@ -1558,14 +1560,12 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **country** | **str**| Country for the Catalogs Items | - **item_ids** | **[str]**| Catalogs Item ids | - **language** | **str**| Language for the Catalogs Items | + **feed_id** | **str**| Unique identifier of a feed | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -[**CatalogsItems**](CatalogsItems.md) +[**CatalogsFeedIngestion**](CatalogsFeedIngestion.md) ### Authorization @@ -1581,23 +1581,24 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Response containing the requested catalogs items | - | -**400** | Invalid request parameters. | - | -**401** | Not authorized to access catalogs items | - | -**403** | Not authorized to access catalogs items | - | +**200** | The ingestion process was successfully started. | - | +**400** | Invalid feed parameters. | - | +**403** | Forbidden. Account not approved for feed mutations yet. | - | +**404** | Data feed not found. | - | **0** | Unexpected error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **items_issues_list** -> bool, date, datetime, dict, float, int, list, str, none_type items_issues_list(processing_result_id) +# **feeds_list** +> bool, date, datetime, dict, float, int, list, str, none_type feeds_list() -List item issues for a given processing result +List feeds -List item validation issues for a given feed processing result owned by the \"operation user_account\". Please note that for now query parameters 'item_numbers' and 'item_validation_issue' cannot be used simultaneously until it is implemented in some release in the future. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Fetch feeds owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. For Retail partners, refer to Before you get started with Catalogs. For Hotel parterns, refer to Pinterest API for shopping. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -1605,8 +1606,8 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.catalogs_item_validation_issue import CatalogsItemValidationIssue from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.catalogs_feed import CatalogsFeed from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -1619,6 +1620,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -1629,29 +1636,19 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - processing_result_id = "5224831246441439241" # str | Unique identifier of a feed processing result bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 - item_numbers = [1,5] # [int] | Item number based on order of appearance in the Catalogs Feed. For example, '0' refers to first item found in a feed that was downloaded from a 'location' specified during feed creation. (optional) - item_validation_issue = CatalogsItemValidationIssue("TITLE_MISSING") # CatalogsItemValidationIssue | Filter item validation issues that have a given type of item validation issue. (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + catalog_id = "4" # str | Filter entities for a given catalog_id. If not given, all catalogs are considered. (optional) ad_account_id = "4" # str | Unique identifier of an ad account. (optional) - # example passing only required values which don't have defaults set - try: - # List item issues for a given processing result - api_response = api_instance.items_issues_list(processing_result_id) - pprint(api_response) - except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->items_issues_list: %s\n" % e) - # example passing only required values which don't have defaults set # and optional values try: - # List item issues for a given processing result - api_response = api_instance.items_issues_list(processing_result_id, bookmark=bookmark, page_size=page_size, item_numbers=item_numbers, item_validation_issue=item_validation_issue, ad_account_id=ad_account_id) + # List feeds + api_response = api_instance.feeds_list(bookmark=bookmark, page_size=page_size, catalog_id=catalog_id, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->items_issues_list: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_list: %s\n" % e) ``` @@ -1659,11 +1656,9 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **processing_result_id** | **str**| Unique identifier of a feed processing result | **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 - **item_numbers** | **[int]**| Item number based on order of appearance in the Catalogs Feed. For example, '0' refers to first item found in a feed that was downloaded from a 'location' specified during feed creation. | [optional] - **item_validation_issue** | **CatalogsItemValidationIssue**| Filter item validation issues that have a given type of item validation issue. | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **catalog_id** | **str**| Filter entities for a given catalog_id. If not given, all catalogs are considered. | [optional] **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type @@ -1672,7 +1667,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -1685,22 +1680,22 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Success | - | +**400** | Invalid parameters. | - | **401** | Unauthorized access. | - | -**404** | Processing Result not found. | - | -**501** | Not implemented. | - | **0** | Unexpected error. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **products_by_product_group_filter_list** -> bool, date, datetime, dict, float, int, list, str, none_type products_by_product_group_filter_list(catalogs_list_products_by_filter_request) +# **feeds_update** +> CatalogsFeed feeds_update(feed_id, unknown_base_type) -List filtered products +Update feed -List products Pins owned by the \"operation user_account\" that meet the criteria specified in the Catalogs Product Group Filter given in the request. - This endpoint has been implemented in POST to allow for complex filters. This specific POST endpoint is designed to be idempotent. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more +Update a feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. For Retail partners, refer to Before you get started with Catalogs. For Hotel parterns, refer to Pinterest API for shopping. Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -1708,8 +1703,10 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import catalogs_api from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.paginated import Paginated -from openapi_generated.pinterest_client.model.catalogs_list_products_by_filter_request import CatalogsListProductsByFilterRequest +from openapi_generated.pinterest_client.model.unknownbasetype import UNKNOWNBASETYPE +from openapi_generated.pinterest_client.model.catalogs_vertical_feeds_update_request import CatalogsVerticalFeedsUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_feed import CatalogsFeed +from openapi_generated.pinterest_client.model.catalogs_feeds_update_request import CatalogsFeedsUpdateRequest from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -1722,6 +1719,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -1732,27 +1735,26 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = catalogs_api.CatalogsApi(api_client) - catalogs_list_products_by_filter_request = CatalogsListProductsByFilterRequest() # CatalogsListProductsByFilterRequest | Object holding a group of filters for a catalog product group - bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + feed_id = "4" # str | Unique identifier of a feed + unknown_base_type = None # UNKNOWN_BASE_TYPE | Request object used to update a feed. ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: - # List filtered products - api_response = api_instance.products_by_product_group_filter_list(catalogs_list_products_by_filter_request) + # Update feed + api_response = api_instance.feeds_update(feed_id, unknown_base_type) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->products_by_product_group_filter_list: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_update: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # List filtered products - api_response = api_instance.products_by_product_group_filter_list(catalogs_list_products_by_filter_request, bookmark=bookmark, page_size=page_size, ad_account_id=ad_account_id) + # Update feed + api_response = api_instance.feeds_update(feed_id, unknown_base_type, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: - print("Exception when calling CatalogsApi->products_by_product_group_filter_list: %s\n" % e) + print("Exception when calling CatalogsApi->feeds_update: %s\n" % e) ``` @@ -1760,18 +1762,17 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **catalogs_list_products_by_filter_request** | [**CatalogsListProductsByFilterRequest**](CatalogsListProductsByFilterRequest.md)| Object holding a group of filters for a catalog product group | - **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **feed_id** | **str**| Unique identifier of a feed | + **unknown_base_type** | [**UNKNOWN_BASE_TYPE**](UNKNOWN_BASE_TYPE.md)| Request object used to update a feed. | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type -**bool, date, datetime, dict, float, int, list, str, none_type** +[**CatalogsFeed**](CatalogsFeed.md) ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -1784,9 +1785,914 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Success | - | -**401** | Unauthorized access. | - | -**409** | Conflict. Can't get products. | - | -**0** | Unexpected error. | - | +**400** | Invalid feed parameters. | - | +**403** | Forbidden. Account not approved for feed mutations yet. | - | +**404** | Data feed not found. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **items_batch_get** +> CatalogsItemsBatch items_batch_get(batch_id) + +Get item batch status + +Get a single catalogs items batch owned by the \"operating user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. + +### Example + +* OAuth Authentication (client_credentials): +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.catalogs_items_batch import CatalogsItemsBatch +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = catalogs_api.CatalogsApi(api_client) + batch_id = "595953100599279259-66753b9bb65c46c49bd8503b27fecf9e" # str | Id of a catalogs items batch to fetch + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + + # example passing only required values which don't have defaults set + try: + # Get item batch status + api_response = api_instance.items_batch_get(batch_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->items_batch_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get item batch status + api_response = api_instance.items_batch_get(batch_id, ad_account_id=ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->items_batch_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **batch_id** | **str**| Id of a catalogs items batch to fetch | + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + +### Return type + +[**CatalogsItemsBatch**](CatalogsItemsBatch.md) + +### Authorization + +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response containing the requested catalogs items batch | - | +**401** | Not authenticated to access catalogs items batch | - | +**403** | Not authorized to access catalogs items batch | - | +**404** | Catalogs items batch not found | - | +**405** | Method Not Allowed. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **items_batch_post** +> CatalogsItemsBatch items_batch_post(unknown_base_type) + +Operate on item batch + +This endpoint supports multiple operations on a set of one or more catalog items owned by the \"operation user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Note: - Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. - The item UPSERT operation is restricted to users without a feed data source. If you plan to migrate item ingestion from feeds to the API, please reach out to your partner manager to get assistance. + +### Example + +* OAuth Authentication (client_credentials): +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.unknownbasetype import UNKNOWNBASETYPE +from openapi_generated.pinterest_client.model.catalogs_vertical_batch_request import CatalogsVerticalBatchRequest +from openapi_generated.pinterest_client.model.catalogs_items_batch import CatalogsItemsBatch +from openapi_generated.pinterest_client.model.catalogs_items_batch_request import CatalogsItemsBatchRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = catalogs_api.CatalogsApi(api_client) + unknown_base_type = None # UNKNOWN_BASE_TYPE | Request object used to create catalogs items in a batch + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + + # example passing only required values which don't have defaults set + try: + # Operate on item batch + api_response = api_instance.items_batch_post(unknown_base_type) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->items_batch_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Operate on item batch + api_response = api_instance.items_batch_post(unknown_base_type, ad_account_id=ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->items_batch_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unknown_base_type** | [**UNKNOWN_BASE_TYPE**](UNKNOWN_BASE_TYPE.md)| Request object used to create catalogs items in a batch | + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + +### Return type + +[**CatalogsItemsBatch**](CatalogsItemsBatch.md) + +### Authorization + +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response containing the requested catalogs items batch | - | +**400** | Invalid request parameters. | - | +**401** | Not authenticated to post catalogs items | - | +**403** | Not authorized to post catalogs items | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **items_get** +> CatalogsItems items_get(country, language) + +Get catalogs items + +Get the items of the catalog owned by the \"operation user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Note: this endpoint is deprecated and will be deleted soon. Please use Get catalogs items (POST) instead. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.catalogs_items import CatalogsItems +from openapi_generated.pinterest_client.model.catalogs_items_filters import CatalogsItemsFilters +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = catalogs_api.CatalogsApi(api_client) + country = "US" # str | Country for the Catalogs Items + language = "EN" # str | Language for the Catalogs Items + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + item_ids = ["CR123"] # [str] | This parameter is deprecated. Use filters instead. (optional) + filters = CatalogsItemsFilters( + catalog_type=CatalogsType("RETAIL"), + ) # CatalogsItemsFilters | Identifies items to be retrieved. This is a required parameter. (optional) + + # example passing only required values which don't have defaults set + try: + # Get catalogs items + api_response = api_instance.items_get(country, language) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->items_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get catalogs items + api_response = api_instance.items_get(country, language, ad_account_id=ad_account_id, item_ids=item_ids, filters=filters) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->items_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **country** | **str**| Country for the Catalogs Items | + **language** | **str**| Language for the Catalogs Items | + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + **item_ids** | **[str]**| This parameter is deprecated. Use filters instead. | [optional] + **filters** | **CatalogsItemsFilters**| Identifies items to be retrieved. This is a required parameter. | [optional] + +### Return type + +[**CatalogsItems**](CatalogsItems.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response containing the requested catalogs items | - | +**400** | Invalid request parameters. | - | +**401** | Not authorized to access catalogs items | - | +**403** | Not authorized to access catalogs items | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **items_issues_list** +> bool, date, datetime, dict, float, int, list, str, none_type items_issues_list(processing_result_id) + +List item issues + +List item validation issues for a given feed processing result owned by the \"operation user_account\". Up to 20 random samples of affected items are returned for each error and warning code. Please note that for now query parameters 'item_numbers' and 'item_validation_issue' cannot be used simultaneously until it is implemented in some release in the future. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Note: To get a list of all affected items instead of sampled issues, please refer to Build catalogs report and Get catalogs report endpoints. Moreover, they support multiple types of catalogs. Learn more + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.catalogs_item_validation_issue import CatalogsItemValidationIssue +from openapi_generated.pinterest_client.model.catalogs_item_validation_issues import CatalogsItemValidationIssues +from openapi_generated.pinterest_client.model.paginated import Paginated +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = catalogs_api.CatalogsApi(api_client) + processing_result_id = "5224831246441439241" # str | Unique identifier of a feed processing result. It can be acquired from the \"id\" field of the \"items\" array within the response of the [List processing results for a given feed](/docs/api/v5/#operation/feed_processing_results/list). + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + item_numbers = [1,5] # [int] | Item number based on order of appearance in the Catalogs Feed. For example, '0' refers to first item found in a feed that was downloaded from a 'location' specified during feed creation. (optional) + item_validation_issue = CatalogsItemValidationIssue("TITLE_MISSING") # CatalogsItemValidationIssue | Filter item validation issues that have a given type of item validation issue. (optional) + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + + # example passing only required values which don't have defaults set + try: + # List item issues + api_response = api_instance.items_issues_list(processing_result_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->items_issues_list: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List item issues + api_response = api_instance.items_issues_list(processing_result_id, bookmark=bookmark, page_size=page_size, item_numbers=item_numbers, item_validation_issue=item_validation_issue, ad_account_id=ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->items_issues_list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **processing_result_id** | **str**| Unique identifier of a feed processing result. It can be acquired from the \"id\" field of the \"items\" array within the response of the [List processing results for a given feed](/docs/api/v5/#operation/feed_processing_results/list). | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **item_numbers** | **[int]**| Item number based on order of appearance in the Catalogs Feed. For example, '0' refers to first item found in a feed that was downloaded from a 'location' specified during feed creation. | [optional] + **item_validation_issue** | **CatalogsItemValidationIssue**| Filter item validation issues that have a given type of item validation issue. | [optional] + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**401** | Unauthorized access. | - | +**404** | Processing Result not found. | - | +**501** | Not implemented. | - | +**0** | Unexpected error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **items_post** +> CatalogsItems items_post(catalogs_items_request) + +Get catalogs items (POST) + +Get the items of the catalog owned by the \"operation user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.catalogs_items_request import CatalogsItemsRequest +from openapi_generated.pinterest_client.model.catalogs_items import CatalogsItems +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = catalogs_api.CatalogsApi(api_client) + catalogs_items_request = CatalogsItemsRequest( + country=Country("US"), + language=None, + filters=CatalogsItemsPostFilters( + catalog_type=CatalogsType("RETAIL"), + ), + ) # CatalogsItemsRequest | Request object used to get catalogs items + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + + # example passing only required values which don't have defaults set + try: + # Get catalogs items (POST) + api_response = api_instance.items_post(catalogs_items_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->items_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get catalogs items (POST) + api_response = api_instance.items_post(catalogs_items_request, ad_account_id=ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->items_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **catalogs_items_request** | [**CatalogsItemsRequest**](CatalogsItemsRequest.md)| Request object used to get catalogs items | + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + +### Return type + +[**CatalogsItems**](CatalogsItems.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response containing the requested catalogs items | - | +**400** | Invalid request | - | +**401** | Not authorized to access catalogs items | - | +**403** | Not authorized to access catalogs items | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **products_by_product_group_filter_list** +> bool, date, datetime, dict, float, int, list, str, none_type products_by_product_group_filter_list(catalogs_list_products_by_filter_request) + +List products by filter + +List products Pins owned by the \"operation user_account\" that meet the criteria specified in the Catalogs Product Group Filter given in the request. - This endpoint has been implemented in POST to allow for complex filters. This specific POST endpoint is designed to be idempotent. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Note: This endpoint only supports RETAIL catalog at the moment. Learn more + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.catalogs_product import CatalogsProduct +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.catalogs_list_products_by_filter_request import CatalogsListProductsByFilterRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = catalogs_api.CatalogsApi(api_client) + catalogs_list_products_by_filter_request = CatalogsListProductsByFilterRequest() # CatalogsListProductsByFilterRequest | Object holding a group of filters for a catalog product group + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + pin_metrics = False # bool | Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # List products by filter + api_response = api_instance.products_by_product_group_filter_list(catalogs_list_products_by_filter_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->products_by_product_group_filter_list: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List products by filter + api_response = api_instance.products_by_product_group_filter_list(catalogs_list_products_by_filter_request, bookmark=bookmark, page_size=page_size, ad_account_id=ad_account_id, pin_metrics=pin_metrics) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->products_by_product_group_filter_list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **catalogs_list_products_by_filter_request** | [**CatalogsListProductsByFilterRequest**](CatalogsListProductsByFilterRequest.md)| Object holding a group of filters for a catalog product group | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + **pin_metrics** | **bool**| Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before <code>2023-03-20</code> lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. | [optional] if omitted the server will use the default value of False + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**401** | Unauthorized access. | - | +**409** | Conflict. Can't get products. | - | +**0** | Unexpected error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **reports_create** +> CatalogsCreateReportResponse reports_create(catalogs_report_parameters) + +Build catalogs report + +Async request to create a report of the catalog owned by the \"operation user_account\". This endpoint generates a report upon receiving the first approved request of the day. Any following requests with identical parameters will yield the same report even if data has changed. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.catalogs_create_report_response import CatalogsCreateReportResponse +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.catalogs_report_parameters import CatalogsReportParameters +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = catalogs_api.CatalogsApi(api_client) + catalogs_report_parameters = CatalogsReportParameters( + catalog_type=CatalogsType("RETAIL"), + ) # CatalogsReportParameters | Request object to asynchronously create a report. + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + + # example passing only required values which don't have defaults set + try: + # Build catalogs report + api_response = api_instance.reports_create(catalogs_report_parameters) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->reports_create: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Build catalogs report + api_response = api_instance.reports_create(catalogs_report_parameters, ad_account_id=ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->reports_create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **catalogs_report_parameters** | [**CatalogsReportParameters**](CatalogsReportParameters.md)| Request object to asynchronously create a report. | + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + +### Return type + +[**CatalogsCreateReportResponse**](CatalogsCreateReportResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response containing the report token | - | +**404** | Entity (e.g., catalog, feed or processing_result) not found | - | +**409** | Can't access this feature without an existing catalog. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **reports_get** +> CatalogsReport reports_get(token) + +Get catalogs report + +This returns a URL to a report given a token returned from Build catalogs report. You can use the URL to download the report. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.catalogs_report import CatalogsReport +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = catalogs_api.CatalogsApi(api_client) + token = "token_example" # str | Token returned from async build report call + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + + # example passing only required values which don't have defaults set + try: + # Get catalogs report + api_response = api_instance.reports_get(token) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->reports_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get catalogs report + api_response = api_instance.reports_get(token, ad_account_id=ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->reports_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| Token returned from async build report call | + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + +### Return type + +[**CatalogsReport**](CatalogsReport.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response that contains a link to download the report | - | +**400** | The token you provided is not valid or has expired. | - | +**409** | Can't access this feature without an existing catalog. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **reports_stats** +> bool, date, datetime, dict, float, int, list, str, none_type reports_stats(parameters) + +List report stats + +List aggregated numbers of issues for a catalog owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import catalogs_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.catalogs_report_stats import CatalogsReportStats +from openapi_generated.pinterest_client.model.catalogs_report_parameters import CatalogsReportParameters +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = catalogs_api.CatalogsApi(api_client) + parameters = CatalogsReportParameters( + catalog_type=CatalogsType("RETAIL"), + ) # CatalogsReportParameters | Contains the parameters for report identification. + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + + # example passing only required values which don't have defaults set + try: + # List report stats + api_response = api_instance.reports_stats(parameters) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->reports_stats: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List report stats + api_response = api_instance.reports_stats(parameters, ad_account_id=ad_account_id, page_size=page_size, bookmark=bookmark) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling CatalogsApi->reports_stats: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **parameters** | **CatalogsReportParameters**| Contains the parameters for report identification. | + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response containing the diagnostics aggregated counters | - | +**401** | Not authorized to access catalogs | - | +**0** | Unexpected error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/CatalogsCreateCreativeAssetsItem.md b/docs/CatalogsCreateCreativeAssetsItem.md new file mode 100644 index 0000000..c9c749d --- /dev/null +++ b/docs/CatalogsCreateCreativeAssetsItem.md @@ -0,0 +1,15 @@ +# CatalogsCreateCreativeAssetsItem + +A creative assets item to be created. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_assets_id** | **str** | The catalog creative assets id in the merchant namespace | +**attributes** | [**CatalogsCreativeAssetsAttributes**](CatalogsCreativeAssetsAttributes.md) | | +**operation** | **str** | | defaults to "CREATE" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreateHotelItem.md b/docs/CatalogsCreateHotelItem.md new file mode 100644 index 0000000..97c9c3a --- /dev/null +++ b/docs/CatalogsCreateHotelItem.md @@ -0,0 +1,15 @@ +# CatalogsCreateHotelItem + +A hotel item to be created. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hotel_id** | **str** | The catalog hotel id in the merchant namespace | +**attributes** | [**CatalogsHotelAttributes**](CatalogsHotelAttributes.md) | | +**operation** | **str** | | defaults to "CREATE" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreateReportResponse.md b/docs/CatalogsCreateReportResponse.md new file mode 100644 index 0000000..66bfda3 --- /dev/null +++ b/docs/CatalogsCreateReportResponse.md @@ -0,0 +1,12 @@ +# CatalogsCreateReportResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | Token to be used to get the report | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreateRequest.md b/docs/CatalogsCreateRequest.md new file mode 100644 index 0000000..b29c94d --- /dev/null +++ b/docs/CatalogsCreateRequest.md @@ -0,0 +1,13 @@ +# CatalogsCreateRequest + +Request object for creating a catalog. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A human-friendly name associated to a given catalog. | +**catalog_type** | **str** | Type of the catalog entity. | defaults to "HOTEL" + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreateRetailItem.md b/docs/CatalogsCreateRetailItem.md new file mode 100644 index 0000000..f0de7c6 --- /dev/null +++ b/docs/CatalogsCreateRetailItem.md @@ -0,0 +1,15 @@ +# CatalogsCreateRetailItem + +An item to be created + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog item id in the merchant namespace | +**attributes** | [**ItemAttributesRequest**](ItemAttributesRequest.md) | | +**operation** | **str** | | defaults to "CREATE" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsAttributes.md b/docs/CatalogsCreativeAssetsAttributes.md new file mode 100644 index 0000000..9c7cc1e --- /dev/null +++ b/docs/CatalogsCreativeAssetsAttributes.md @@ -0,0 +1,25 @@ +# CatalogsCreativeAssetsAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_link** | **str** | The creative assets image. | [optional] +**video_link** | **str** | The creative assets video. | [optional] +**title** | **str** | The name of the creative assets. | [optional] +**description** | **str** | Brief description of the creative assets. | [optional] +**link** | **str** | Link to the creative assets page. | [optional] +**ios_deep_link** | **str, none_type** | IOS deep link to the creative assets page. | [optional] +**android_deep_link** | **str, none_type** | Link to the creative assets page. | [optional] +**google_product_category** | **str, none_type** | The categorization of the product based on the standardized Google Product Taxonomy. This is a set taxonomy. Both the text values and numeric codes are accepted. | [optional] +**custom_label_0** | **str, none_type** | Custom grouping of creative assets. | [optional] +**custom_label_1** | **str, none_type** | Custom grouping of creative assets. | [optional] +**custom_label_2** | **str, none_type** | Custom grouping of creative assets. | [optional] +**custom_label_3** | **str, none_type** | Custom grouping of creative assets. | [optional] +**custom_label_4** | **str, none_type** | Custom grouping of creative assets. | [optional] +**visibility** | **str, none_type** | Visibility of the creative assets. Must be one of the following values (upper or lowercase): ‘visible’, ‘hidden’. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsAttributesAllOf.md b/docs/CatalogsCreativeAssetsAttributesAllOf.md new file mode 100644 index 0000000..825da61 --- /dev/null +++ b/docs/CatalogsCreativeAssetsAttributesAllOf.md @@ -0,0 +1,13 @@ +# CatalogsCreativeAssetsAttributesAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_link** | **str** | The creative assets image. | [optional] +**video_link** | **str** | The creative assets video. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsBatchItem.md b/docs/CatalogsCreativeAssetsBatchItem.md new file mode 100644 index 0000000..30821c0 --- /dev/null +++ b/docs/CatalogsCreativeAssetsBatchItem.md @@ -0,0 +1,15 @@ +# CatalogsCreativeAssetsBatchItem + +Creative assets batch item + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operation** | **str** | | defaults to "DELETE" +**creative_assets_id** | **str** | The catalog creative assets id in the merchant namespace | [optional] +**attributes** | [**CatalogsUpdatableCreativeAssetsAttributes**](CatalogsUpdatableCreativeAssetsAttributes.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsBatchRequest.md b/docs/CatalogsCreativeAssetsBatchRequest.md new file mode 100644 index 0000000..16395b0 --- /dev/null +++ b/docs/CatalogsCreativeAssetsBatchRequest.md @@ -0,0 +1,16 @@ +# CatalogsCreativeAssetsBatchRequest + +Request object to update catalogs creative assets items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | [**Country**](Country.md) | | +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | +**items** | [**[CatalogsCreativeAssetsBatchItem]**](CatalogsCreativeAssetsBatchItem.md) | Array with creative assets item operations | +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**catalog_id** | **str** | Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsFeed.md b/docs/CatalogsCreativeAssetsFeed.md new file mode 100644 index 0000000..d9baf40 --- /dev/null +++ b/docs/CatalogsCreativeAssetsFeed.md @@ -0,0 +1,26 @@ +# CatalogsCreativeAssetsFeed + +Catalogs Creative Asset Feed object + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**id** | **str** | | +**updated_at** | **datetime** | | +**name** | **str, none_type** | A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. | +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | +**status** | [**CatalogsStatus**](CatalogsStatus.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | +**default_locale** | **str** | The locale used within a feed for product descriptions. | +**default_country** | [**Country**](Country.md) | | +**catalog_id** | **str, none_type** | Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsFeedsCreateRequest.md b/docs/CatalogsCreativeAssetsFeedsCreateRequest.md new file mode 100644 index 0000000..11a71c8 --- /dev/null +++ b/docs/CatalogsCreativeAssetsFeedsCreateRequest.md @@ -0,0 +1,22 @@ +# CatalogsCreativeAssetsFeedsCreateRequest + +Request object for creating a feed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A human-friendly name associated to a given feed. | +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | +**default_locale** | **bool, date, datetime, dict, float, int, list, str, none_type** | The locale used within a feed for product descriptions. | +**default_country** | [**Country**](Country.md) | | +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | [optional] +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | [optional] +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] +**catalog_id** | **str, none_type** | Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. At the moment a catalog can not have multiple creative assets feeds but this will change in the future. | [optional] +**status** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsFeedsUpdateRequest.md b/docs/CatalogsCreativeAssetsFeedsUpdateRequest.md new file mode 100644 index 0000000..8ab249d --- /dev/null +++ b/docs/CatalogsCreativeAssetsFeedsUpdateRequest.md @@ -0,0 +1,19 @@ +# CatalogsCreativeAssetsFeedsUpdateRequest + +Request object for updating a feed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | [optional] +**name** | **str** | A human-friendly name associated to a given feed. | [optional] +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | [optional] +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | [optional] +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | [optional] +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] +**status** | [**CatalogsStatus**](CatalogsStatus.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsItemErrorResponse.md b/docs/CatalogsCreativeAssetsItemErrorResponse.md new file mode 100644 index 0000000..1a5be9e --- /dev/null +++ b/docs/CatalogsCreativeAssetsItemErrorResponse.md @@ -0,0 +1,15 @@ +# CatalogsCreativeAssetsItemErrorResponse + +Object describing a creative assets item error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**creative_assets_id** | **str** | The catalog creative assets id in the merchant namespace | [optional] +**errors** | [**[ItemValidationEvent]**](ItemValidationEvent.md) | Array with the errors for the item id requested | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsItemResponse.md b/docs/CatalogsCreativeAssetsItemResponse.md new file mode 100644 index 0000000..9dd31de --- /dev/null +++ b/docs/CatalogsCreativeAssetsItemResponse.md @@ -0,0 +1,16 @@ +# CatalogsCreativeAssetsItemResponse + +Object describing a hotel record + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**creative_assets_id** | **str** | The catalog creative assets id in the merchant namespace | [optional] +**pins** | [**[Pin], none_type**](Pin.md) | The pins mapped to the item | [optional] +**attributes** | [**CatalogsCreativeAssetsAttributes**](CatalogsCreativeAssetsAttributes.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsItemsBatch.md b/docs/CatalogsCreativeAssetsItemsBatch.md new file mode 100644 index 0000000..1c8f965 --- /dev/null +++ b/docs/CatalogsCreativeAssetsItemsBatch.md @@ -0,0 +1,18 @@ +# CatalogsCreativeAssetsItemsBatch + +Object describing the catalogs creative assets items batch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**batch_id** | **str** | Id of the catalogs items batch | [optional] +**created_time** | **datetime** | Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss | [optional] [readonly] +**completed_time** | **datetime, none_type** | Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss | [optional] [readonly] +**status** | [**BatchOperationStatus**](BatchOperationStatus.md) | | [optional] +**items** | [**[CreativeAssetsProcessingRecord]**](CreativeAssetsProcessingRecord.md) | Array with the catalogs items processing records part of the catalogs items batch | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsItemsFilter.md b/docs/CatalogsCreativeAssetsItemsFilter.md new file mode 100644 index 0000000..5797b30 --- /dev/null +++ b/docs/CatalogsCreativeAssetsItemsFilter.md @@ -0,0 +1,14 @@ +# CatalogsCreativeAssetsItemsFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_assets_ids** | **[str]** | | +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**catalog_id** | **str** | Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsItemsPostFilter.md b/docs/CatalogsCreativeAssetsItemsPostFilter.md new file mode 100644 index 0000000..2ffec5d --- /dev/null +++ b/docs/CatalogsCreativeAssetsItemsPostFilter.md @@ -0,0 +1,14 @@ +# CatalogsCreativeAssetsItemsPostFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_assets_ids** | **[str]** | | +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**catalog_id** | **str** | Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest.md b/docs/CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest.md new file mode 100644 index 0000000..67cf9b7 --- /dev/null +++ b/docs/CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest.md @@ -0,0 +1,14 @@ +# CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest + +Request object to list products for a given creative assets catalog_id and product group filter. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_id** | **str** | Catalog id pertaining to the creative assets product group. | +**filters** | [**CatalogsCreativeAssetsProductGroupFilters**](CatalogsCreativeAssetsProductGroupFilters.md) | | +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsProduct.md b/docs/CatalogsCreativeAssetsProduct.md new file mode 100644 index 0000000..73f8f32 --- /dev/null +++ b/docs/CatalogsCreativeAssetsProduct.md @@ -0,0 +1,14 @@ +# CatalogsCreativeAssetsProduct + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | [**CatalogsCreativeAssetsProductMetadata**](CatalogsCreativeAssetsProductMetadata.md) | | +**pin** | [**Pin**](Pin.md) | | +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsProductGroup.md b/docs/CatalogsCreativeAssetsProductGroup.md new file mode 100644 index 0000000..538b116 --- /dev/null +++ b/docs/CatalogsCreativeAssetsProductGroup.md @@ -0,0 +1,19 @@ +# CatalogsCreativeAssetsProductGroup + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the creative assets product group. | +**filters** | [**CatalogsCreativeAssetsProductGroupFilters**](CatalogsCreativeAssetsProductGroupFilters.md) | | +**catalog_id** | **str** | Catalog id pertaining to the creative assets product group. | +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**name** | **str** | Name of creative assets product group | [optional] +**description** | **str, none_type** | | [optional] +**created_at** | **int** | Unix timestamp in seconds of when catalog product group was created. | [optional] +**updated_at** | **int** | Unix timestamp in seconds of last time catalog product group was updated. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsProductGroupCreateRequest.md b/docs/CatalogsCreativeAssetsProductGroupCreateRequest.md new file mode 100644 index 0000000..4c20f33 --- /dev/null +++ b/docs/CatalogsCreativeAssetsProductGroupCreateRequest.md @@ -0,0 +1,16 @@ +# CatalogsCreativeAssetsProductGroupCreateRequest + +Request object for creating a creative assets product group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**filters** | [**CatalogsCreativeAssetsProductGroupFilters**](CatalogsCreativeAssetsProductGroupFilters.md) | | +**catalog_id** | **str** | Catalog id pertaining to the creative assets product group. | +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**description** | **str, none_type** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsProductGroupFilterKeys.md b/docs/CatalogsCreativeAssetsProductGroupFilterKeys.md new file mode 100644 index 0000000..df98979 --- /dev/null +++ b/docs/CatalogsCreativeAssetsProductGroupFilterKeys.md @@ -0,0 +1,25 @@ +# CatalogsCreativeAssetsProductGroupFilterKeys + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_assets_id** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**custom_label_0** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**custom_label_1** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**custom_label_2** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**custom_label_3** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**custom_label_4** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**google_product_category_6** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] +**google_product_category_5** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] +**google_product_category_4** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] +**google_product_category_3** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] +**google_product_category_2** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] +**google_product_category_1** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] +**google_product_category_0** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] +**media_type** | **CatalogsProductGroupMultipleMediaTypesCriteria** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsProductGroupFilters.md b/docs/CatalogsCreativeAssetsProductGroupFilters.md new file mode 100644 index 0000000..d284d48 --- /dev/null +++ b/docs/CatalogsCreativeAssetsProductGroupFilters.md @@ -0,0 +1,14 @@ +# CatalogsCreativeAssetsProductGroupFilters + +Object holding a group of filters for a creative assets product group + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any_of** | [**[CatalogsCreativeAssetsProductGroupFilterKeys]**](CatalogsCreativeAssetsProductGroupFilterKeys.md) | | [optional] +**all_of** | [**[CatalogsCreativeAssetsProductGroupFilterKeys]**](CatalogsCreativeAssetsProductGroupFilterKeys.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsProductGroupFiltersAllOf.md b/docs/CatalogsCreativeAssetsProductGroupFiltersAllOf.md new file mode 100644 index 0000000..28531d6 --- /dev/null +++ b/docs/CatalogsCreativeAssetsProductGroupFiltersAllOf.md @@ -0,0 +1,11 @@ +# CatalogsCreativeAssetsProductGroupFiltersAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**all_of** | [**[CatalogsCreativeAssetsProductGroupFilterKeys]**](CatalogsCreativeAssetsProductGroupFilterKeys.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsProductGroupFiltersAnyOf.md b/docs/CatalogsCreativeAssetsProductGroupFiltersAnyOf.md new file mode 100644 index 0000000..9131474 --- /dev/null +++ b/docs/CatalogsCreativeAssetsProductGroupFiltersAnyOf.md @@ -0,0 +1,11 @@ +# CatalogsCreativeAssetsProductGroupFiltersAnyOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any_of** | [**[CatalogsCreativeAssetsProductGroupFilterKeys]**](CatalogsCreativeAssetsProductGroupFilterKeys.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsProductGroupProductCounts.md b/docs/CatalogsCreativeAssetsProductGroupProductCounts.md new file mode 100644 index 0000000..6abd621 --- /dev/null +++ b/docs/CatalogsCreativeAssetsProductGroupProductCounts.md @@ -0,0 +1,15 @@ +# CatalogsCreativeAssetsProductGroupProductCounts + +Product counts for a Creative Assets CatalogsProductGroup + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | +**videos** | **float** | | +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsProductGroupUpdateRequest.md b/docs/CatalogsCreativeAssetsProductGroupUpdateRequest.md new file mode 100644 index 0000000..a764d59 --- /dev/null +++ b/docs/CatalogsCreativeAssetsProductGroupUpdateRequest.md @@ -0,0 +1,15 @@ +# CatalogsCreativeAssetsProductGroupUpdateRequest + +Request object for updating a creative assets product group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | **str** | | [optional] if omitted the server will use the default value of "CREATIVE_ASSETS" +**name** | **str** | | [optional] +**description** | **str, none_type** | | [optional] +**filters** | [**CatalogsCreativeAssetsProductGroupFilters**](CatalogsCreativeAssetsProductGroupFilters.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsCreativeAssetsProductMetadata.md b/docs/CatalogsCreativeAssetsProductMetadata.md new file mode 100644 index 0000000..31bcd06 --- /dev/null +++ b/docs/CatalogsCreativeAssetsProductMetadata.md @@ -0,0 +1,14 @@ +# CatalogsCreativeAssetsProductMetadata + +Creative assets product metadata entity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_assets_id** | **str** | The user-created unique ID that represents the creative assets item. | +**visibility** | [**CreativeAssetsVisibilityType**](CreativeAssetsVisibilityType.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsDbItem.md b/docs/CatalogsDbItem.md index 11b964b..6927c17 100644 --- a/docs/CatalogsDbItem.md +++ b/docs/CatalogsDbItem.md @@ -4,9 +4,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created_at** | **datetime** | | [optional] -**id** | **str** | | [optional] -**updated_at** | **datetime** | | [optional] +**created_at** | **datetime** | | +**id** | **str** | | +**updated_at** | **datetime** | | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsDeleteCreativeAssetsItem.md b/docs/CatalogsDeleteCreativeAssetsItem.md new file mode 100644 index 0000000..050c17c --- /dev/null +++ b/docs/CatalogsDeleteCreativeAssetsItem.md @@ -0,0 +1,14 @@ +# CatalogsDeleteCreativeAssetsItem + +A creative assets item to be deleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_assets_id** | **str** | The catalog creative assets id in the merchant namespace | +**operation** | **str** | | defaults to "DELETE" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsDeleteHotelItem.md b/docs/CatalogsDeleteHotelItem.md new file mode 100644 index 0000000..e8ef764 --- /dev/null +++ b/docs/CatalogsDeleteHotelItem.md @@ -0,0 +1,14 @@ +# CatalogsDeleteHotelItem + +A hotel item to be deleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hotel_id** | **str** | The catalog hotel id in the merchant namespace | +**operation** | **str** | | defaults to "DELETE" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsDeleteRetailItem.md b/docs/CatalogsDeleteRetailItem.md new file mode 100644 index 0000000..bf755b7 --- /dev/null +++ b/docs/CatalogsDeleteRetailItem.md @@ -0,0 +1,14 @@ +# CatalogsDeleteRetailItem + +An item to be deleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog item id in the merchant namespace | +**operation** | **str** | | defaults to "DELETE" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsFeed.md b/docs/CatalogsFeed.md index 86d33e6..2cc2ef0 100644 --- a/docs/CatalogsFeed.md +++ b/docs/CatalogsFeed.md @@ -5,19 +5,21 @@ Catalogs Feed object ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**default_country** | [**Country**](Country.md) | | -**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | -**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | -**name** | **str, none_type** | A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. | -**format** | [**CatalogsFormat**](CatalogsFormat.md) | | -**default_locale** | **str** | The locale used within a feed for product descriptions. | -**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | -**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | -**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | -**status** | [**CatalogsStatus**](CatalogsStatus.md) | | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | **created_at** | **datetime** | | [optional] **id** | **str** | | [optional] **updated_at** | **datetime** | | [optional] +**name** | **str, none_type** | A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. | [optional] +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | [optional] +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | [optional] +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | [optional] +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] +**status** | [**CatalogsStatus**](CatalogsStatus.md) | | [optional] +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | [optional] +**default_locale** | **str** | The locale used within a feed for product descriptions. | [optional] +**default_country** | [**Country**](Country.md) | | [optional] +**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | [optional] +**catalog_id** | **str, none_type** | Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsFeedCredentials.md b/docs/CatalogsFeedCredentials.md index 7189bc7..c773240 100644 --- a/docs/CatalogsFeedCredentials.md +++ b/docs/CatalogsFeedCredentials.md @@ -1,6 +1,6 @@ # CatalogsFeedCredentials -Use this if your feed file requires username and password. +This field is **OPTIONAL**. Use this if your feed file requires username and password. ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogsFeedIngestion.md b/docs/CatalogsFeedIngestion.md new file mode 100644 index 0000000..c90d34f --- /dev/null +++ b/docs/CatalogsFeedIngestion.md @@ -0,0 +1,15 @@ +# CatalogsFeedIngestion + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**feed_id** | **str** | | +**created_at** | **datetime** | | +**status** | [**CatalogsFeedProcessingStatus**](CatalogsFeedProcessingStatus.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsFeedIngestionDetails.md b/docs/CatalogsFeedIngestionDetails.md index f9fd686..b712e64 100644 --- a/docs/CatalogsFeedIngestionDetails.md +++ b/docs/CatalogsFeedIngestionDetails.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **errors** | [**CatalogsFeedIngestionErrors**](CatalogsFeedIngestionErrors.md) | | **info** | [**CatalogsFeedIngestionInfo**](CatalogsFeedIngestionInfo.md) | | +**warnings** | [**CatalogsFeedIngestionWarnings**](CatalogsFeedIngestionWarnings.md) | | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsFeedIngestionErrors.md b/docs/CatalogsFeedIngestionErrors.md index c85d63a..7eeaa55 100644 --- a/docs/CatalogsFeedIngestionErrors.md +++ b/docs/CatalogsFeedIngestionErrors.md @@ -4,10 +4,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**image_download_error** | **int** | Some items include images that can't be found. | [optional] **line_level_internal_error** | **int** | We experienced a technical difficulty and were unable to ingest this some items. The next ingestion will happen in 24 hours. | [optional] **large_product_count_decrease** | **int** | The product count has decreased by more than 99% compared to the last successful ingestion. | [optional] if omitted the server will use the default value of 1 **account_flagged** | **int** | We detected an issue with your account and are not currently ingesting your items. Please review our policies at policy.pinterest.com/community-guidelines#section-spam or contact us at help.pinterest.com/contact for more information. | [optional] +**image_level_internal_error** | **int** | We experienced a technical difficulty and were unable to download some images. The next download attempt will happen in 24 hours. | [optional] +**image_file_not_accessible** | **int** | Image files are unreadable. Please upload new files to continue. | [optional] +**image_malformed_url** | **int** | Image files are unreadable. Please check your link and upload new files to continue. | [optional] +**image_file_not_found** | **int** | Image files are unreadable. Please upload new files to continue. | [optional] +**image_invalid_file** | **int** | Image files are unreadable. Please upload new files to continue. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsFeedIngestionWarnings.md b/docs/CatalogsFeedIngestionWarnings.md new file mode 100644 index 0000000..2fac2d5 --- /dev/null +++ b/docs/CatalogsFeedIngestionWarnings.md @@ -0,0 +1,17 @@ +# CatalogsFeedIngestionWarnings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additional_image_level_internal_error** | **int** | We experienced a technical difficulty and were unable to download some additional images. The next download attempt will happen in 24 hours. | [optional] +**additional_image_file_not_accessible** | **int** | Additional image files are unreadable. Please upload new files to continue. | [optional] +**additional_image_malformed_url** | **int** | Additional image files are unreadable. Please check your link and upload new files to continue. | [optional] +**additional_image_file_not_found** | **int** | Additional image files are unreadable. Please upload new files to continue. | [optional] +**additional_image_invalid_file** | **int** | Additional image files are unreadable. Please upload new files to continue. | [optional] +**hotel_price_header_is_present** | **int** | price is not a supported column. Use base_price and sale_price instead. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsFeedProcessingResult.md b/docs/CatalogsFeedProcessingResult.md index 0a298b9..a612a20 100644 --- a/docs/CatalogsFeedProcessingResult.md +++ b/docs/CatalogsFeedProcessingResult.md @@ -4,13 +4,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**id** | **str** | | +**updated_at** | **datetime** | | **ingestion_details** | [**CatalogsFeedIngestionDetails**](CatalogsFeedIngestionDetails.md) | | **status** | [**CatalogsFeedProcessingStatus**](CatalogsFeedProcessingStatus.md) | | **product_counts** | [**CatalogsFeedProductCounts**](CatalogsFeedProductCounts.md) | | **validation_details** | [**CatalogsFeedValidationDetails**](CatalogsFeedValidationDetails.md) | | -**created_at** | **datetime** | | [optional] -**id** | **str** | | [optional] -**updated_at** | **datetime** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsFeedProcessingSchedule.md b/docs/CatalogsFeedProcessingSchedule.md index a4fdd7f..5e5e0b7 100644 --- a/docs/CatalogsFeedProcessingSchedule.md +++ b/docs/CatalogsFeedProcessingSchedule.md @@ -1,6 +1,6 @@ # CatalogsFeedProcessingSchedule -Optional daily processing schedule. Use this to configure the preferred time for processing a feed (otherwise random). +Daily processing schedule. This field is **OPTIONAL**. Use this to configure the preferred time for processing a feed (otherwise random). ## Properties Name | Type | Description | Notes diff --git a/docs/CatalogsFeedProcessingStatus.md b/docs/CatalogsFeedProcessingStatus.md index 6b81504..94e0f31 100644 --- a/docs/CatalogsFeedProcessingStatus.md +++ b/docs/CatalogsFeedProcessingStatus.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | | must be one of ["COMPLETED", "COMPLETED_EARLY", "DISAPPROVED", "FAILED", "PROCESSING", "QUEUED_FOR_PROCESSING", "UNDER_APPEAL", "UNDER_REVIEW", ] +**value** | **str** | | must be one of ["COMPLETED", "FAILED", "PROCESSING", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsFeedValidationWarnings.md b/docs/CatalogsFeedValidationWarnings.md index 93dc665..af1b227 100644 --- a/docs/CatalogsFeedValidationWarnings.md +++ b/docs/CatalogsFeedValidationWarnings.md @@ -43,11 +43,6 @@ Name | Type | Description | Notes **optional_condition_invalid** | **int** | Some items include condition values that are formatted incorrectly, which may limit visibility in recommendations, search results and shopping experiences. | [optional] **ios_deep_link_invalid** | **int** | Some items include invalid ios_deep_link values. | [optional] **android_deep_link_invalid** | **int** | Some items include invalid android_deep_link. | [optional] -**availability_normalized** | **int** | Some items include availability values that are formatted incorrectly and have been automatically corrected. | [optional] -**condition_normalized** | **int** | Some items include condition values that are formatted incorrectly and have been automatically corrected. | [optional] -**gender_normalized** | **int** | Some items include gender values that are formatted incorrectly and have been automatically corrected. | [optional] -**size_type_normalized** | **int** | Some items include size_type values that are formatted incorrectly and have been automatically corrected. | [optional] -**age_group_normalized** | **int** | Some items include age_group values that are formatted incorrectly and have been automatically corrected. | [optional] **utm_source_auto_corrected** | **int** | Some items include utm_source values that are formatted incorrectly and have been automatically corrected. | [optional] **country_does_not_map_to_currency** | **int** | Some items include a currency that doesn't match the usual currency for the location where that product is sold or shipped. | [optional] **min_ad_price_invalid** | **int** | Some items include min_ad_price values that are formatted incorrectly. | [optional] diff --git a/docs/CatalogsFeedsCreateRequest.md b/docs/CatalogsFeedsCreateRequest.md index 54c062f..b6b735c 100644 --- a/docs/CatalogsFeedsCreateRequest.md +++ b/docs/CatalogsFeedsCreateRequest.md @@ -8,13 +8,13 @@ Name | Type | Description | Notes **name** | **str** | A human-friendly name associated to a given feed. | **format** | [**CatalogsFormat**](CatalogsFormat.md) | | **location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | -**default_country** | [**Country**](Country.md) | | [optional] -**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | [optional] **default_currency** | [**NullableCurrency**](NullableCurrency.md) | | [optional] **default_locale** | **bool, date, datetime, dict, float, int, list, str, none_type** | The locale used within a feed for product descriptions. | [optional] **credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | [optional] **preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**default_country** | [**Country**](Country.md) | | [optional] +**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | [optional] +**status** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsFeedsUpdateRequest.md b/docs/CatalogsFeedsUpdateRequest.md index 36b8d3d..66f00fd 100644 --- a/docs/CatalogsFeedsUpdateRequest.md +++ b/docs/CatalogsFeedsUpdateRequest.md @@ -13,7 +13,6 @@ Name | Type | Description | Notes **location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | [optional] **preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] **status** | [**CatalogsStatus**](CatalogsStatus.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsHotelAddress.md b/docs/CatalogsHotelAddress.md new file mode 100644 index 0000000..4c881bb --- /dev/null +++ b/docs/CatalogsHotelAddress.md @@ -0,0 +1,16 @@ +# CatalogsHotelAddress + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addr1** | **str** | Primary street address of hotel. | [optional] +**city** | **str** | City where the hotel is located. | [optional] +**region** | **str** | State, county, province, where the hotel is located. | [optional] +**country** | **str** | Country where the hotel is located. | [optional] +**postal_code** | **str** | Required for countries with a postal code system. Postal or zip code of the hotel. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelAttributes.md b/docs/CatalogsHotelAttributes.md new file mode 100644 index 0000000..0ff2e17 --- /dev/null +++ b/docs/CatalogsHotelAttributes.md @@ -0,0 +1,30 @@ +# CatalogsHotelAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**main_image** | [**CatalogsHotelAttributesAllOfMainImage**](CatalogsHotelAttributesAllOfMainImage.md) | | [optional] +**additional_image_link** | **[str], none_type** | <p><= 2000 characters</p> <p>The links to additional images for your hotel. Up to ten additional images can be used to show a hotel from different angles. Must begin with http:// or https://.</p> | [optional] +**name** | **str, none_type** | The hotel's name. | [optional] +**link** | **str, none_type** | Link to the product page | [optional] +**description** | **str, none_type** | Brief description of the hotel. | [optional] +**brand** | **str, none_type** | The brand to which this hotel belongs to. | [optional] +**latitude** | **float** | Latitude of the hotel. | [optional] +**longitude** | **float, none_type** | Longitude of the hotel. | [optional] +**neighborhood** | **[str], none_type** | A list of neighborhoods where the hotel is located | [optional] +**address** | [**CatalogsHotelAddress**](CatalogsHotelAddress.md) | | [optional] +**custom_label_0** | **str, none_type** | Custom grouping of hotels | [optional] +**custom_label_1** | **str, none_type** | Custom grouping of hotels | [optional] +**custom_label_2** | **str, none_type** | Custom grouping of hotels | [optional] +**custom_label_3** | **str, none_type** | Custom grouping of hotels | [optional] +**custom_label_4** | **str, none_type** | Custom grouping of hotels | [optional] +**category** | **str, none_type** | The type of property. The category can be any type of internal description desired. | [optional] +**base_price** | **str, none_type** | Base price of the hotel room per night followed by the ISO currency code | [optional] +**sale_price** | **str, none_type** | Sale price of a hotel room per night. Used to advertise discounts off the regular price of the hotel. | [optional] +**guest_ratings** | [**CatalogsHotelGuestRatings**](CatalogsHotelGuestRatings.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelAttributesAllOf.md b/docs/CatalogsHotelAttributesAllOf.md new file mode 100644 index 0000000..dfc0a0c --- /dev/null +++ b/docs/CatalogsHotelAttributesAllOf.md @@ -0,0 +1,13 @@ +# CatalogsHotelAttributesAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**main_image** | [**CatalogsHotelAttributesAllOfMainImage**](CatalogsHotelAttributesAllOfMainImage.md) | | [optional] +**additional_image_link** | **[str], none_type** | <p><= 2000 characters</p> <p>The links to additional images for your hotel. Up to ten additional images can be used to show a hotel from different angles. Must begin with http:// or https://.</p> | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelAttributesAllOfMainImage.md b/docs/CatalogsHotelAttributesAllOfMainImage.md new file mode 100644 index 0000000..6f4e25b --- /dev/null +++ b/docs/CatalogsHotelAttributesAllOfMainImage.md @@ -0,0 +1,14 @@ +# CatalogsHotelAttributesAllOfMainImage + +The main hotel image + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **str** | <p><= 2000 characters</p> <p>The link to the main hotel image. Image should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your hotel. The URL of your main_image.link must be accessible by the Pinterest user-agent, and send the accurate image. Please make sure there is no template or placeholder image at the link. Must start with http:// or https://.</p> | [optional] +**tag** | **[str], none_type** | Tag appended to the image that identifies image category or details. There can be multiple tags associated with an image | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelBatchItem.md b/docs/CatalogsHotelBatchItem.md new file mode 100644 index 0000000..8aad553 --- /dev/null +++ b/docs/CatalogsHotelBatchItem.md @@ -0,0 +1,15 @@ +# CatalogsHotelBatchItem + +Hotel batch item + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operation** | **str** | | defaults to "DELETE" +**hotel_id** | **str** | The catalog hotel id in the merchant namespace | [optional] +**attributes** | [**CatalogsUpdatableHotelAttributes**](CatalogsUpdatableHotelAttributes.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelBatchRequest.md b/docs/CatalogsHotelBatchRequest.md new file mode 100644 index 0000000..dbfe03d --- /dev/null +++ b/docs/CatalogsHotelBatchRequest.md @@ -0,0 +1,16 @@ +# CatalogsHotelBatchRequest + +Request object to update catalogs hotel items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | [**Country**](Country.md) | | +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | +**items** | [**[CatalogsHotelBatchItem]**](CatalogsHotelBatchItem.md) | Array with catalogs item operations | +**catalog_type** | **str** | | defaults to "HOTEL" +**catalog_id** | **str** | Catalog id pertaining to the hotel item. If not provided, default to oldest hotel catalog | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelFeed.md b/docs/CatalogsHotelFeed.md new file mode 100644 index 0000000..b6b769f --- /dev/null +++ b/docs/CatalogsHotelFeed.md @@ -0,0 +1,25 @@ +# CatalogsHotelFeed + +Catalogs Hotel Feed object + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**id** | **str** | | +**updated_at** | **datetime** | | +**name** | **str, none_type** | A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. | +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | +**status** | [**CatalogsStatus**](CatalogsStatus.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | +**default_locale** | **str** | The locale used within a feed for product descriptions. | +**catalog_id** | **str, none_type** | Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelFeedsCreateRequest.md b/docs/CatalogsHotelFeedsCreateRequest.md new file mode 100644 index 0000000..62869d1 --- /dev/null +++ b/docs/CatalogsHotelFeedsCreateRequest.md @@ -0,0 +1,21 @@ +# CatalogsHotelFeedsCreateRequest + +Request object for creating a feed. Please, be aware that \"default_country\" and \"default_locale\" are not required in the spec for forward compatibility but for now the API will not accept requests without those fields. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A human-friendly name associated to a given feed. | +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | +**default_locale** | **bool, date, datetime, dict, float, int, list, str, none_type** | The locale used within a feed for product descriptions. | +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | [optional] +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | [optional] +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] +**catalog_id** | **str, none_type** | Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. At the moment a catalog can not have multiple hotel feeds but this will change in the future. | [optional] +**status** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelFeedsUpdateRequest.md b/docs/CatalogsHotelFeedsUpdateRequest.md new file mode 100644 index 0000000..5212e63 --- /dev/null +++ b/docs/CatalogsHotelFeedsUpdateRequest.md @@ -0,0 +1,19 @@ +# CatalogsHotelFeedsUpdateRequest + +Request object for updating a feed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | [optional] +**name** | **str** | A human-friendly name associated to a given feed. | [optional] +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | [optional] +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | [optional] +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | [optional] +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] +**status** | [**CatalogsStatus**](CatalogsStatus.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelGuestRatings.md b/docs/CatalogsHotelGuestRatings.md new file mode 100644 index 0000000..f79eba3 --- /dev/null +++ b/docs/CatalogsHotelGuestRatings.md @@ -0,0 +1,16 @@ +# CatalogsHotelGuestRatings + +If specified, you must provide all properties + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score** | **float** | Your hotel's rating. | [optional] +**number_of_reviewers** | **int** | Total number of people who have rated this hotel. | [optional] +**max_score** | **float** | Max value for the hotel rating score. | [optional] +**rating_system** | **str** | System you use for guest reviews. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelItemErrorResponse.md b/docs/CatalogsHotelItemErrorResponse.md new file mode 100644 index 0000000..1481d9d --- /dev/null +++ b/docs/CatalogsHotelItemErrorResponse.md @@ -0,0 +1,15 @@ +# CatalogsHotelItemErrorResponse + +Object describing a hotel item error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**hotel_id** | **str** | The catalog hotel id in the merchant namespace | [optional] +**errors** | [**[ItemValidationEvent]**](ItemValidationEvent.md) | Array with the errors for the item id requested | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelItemResponse.md b/docs/CatalogsHotelItemResponse.md new file mode 100644 index 0000000..dbe0f32 --- /dev/null +++ b/docs/CatalogsHotelItemResponse.md @@ -0,0 +1,16 @@ +# CatalogsHotelItemResponse + +Object describing a hotel record + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**hotel_id** | **str** | The catalog hotel id in the merchant namespace | [optional] +**pins** | [**[Pin], none_type**](Pin.md) | The pins mapped to the item | [optional] +**attributes** | [**CatalogsHotelAttributes**](CatalogsHotelAttributes.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelItemsBatch.md b/docs/CatalogsHotelItemsBatch.md new file mode 100644 index 0000000..d76e7f1 --- /dev/null +++ b/docs/CatalogsHotelItemsBatch.md @@ -0,0 +1,18 @@ +# CatalogsHotelItemsBatch + +Object describing the catalogs hotel items batch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**batch_id** | **str** | Id of the catalogs items batch | [optional] +**created_time** | **datetime** | Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss | [optional] [readonly] +**completed_time** | **datetime, none_type** | Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss | [optional] [readonly] +**status** | [**BatchOperationStatus**](BatchOperationStatus.md) | | [optional] +**items** | [**[HotelProcessingRecord]**](HotelProcessingRecord.md) | Array with the catalogs items processing records part of the catalogs items batch | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelItemsFilter.md b/docs/CatalogsHotelItemsFilter.md new file mode 100644 index 0000000..381cfe9 --- /dev/null +++ b/docs/CatalogsHotelItemsFilter.md @@ -0,0 +1,14 @@ +# CatalogsHotelItemsFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hotel_ids** | **[str]** | | +**catalog_type** | **str** | | defaults to "HOTEL" +**catalog_id** | **str** | Catalog id pertaining to the hotel item. If not provided, default to oldest hotel catalog | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelItemsPostFilter.md b/docs/CatalogsHotelItemsPostFilter.md new file mode 100644 index 0000000..38a416e --- /dev/null +++ b/docs/CatalogsHotelItemsPostFilter.md @@ -0,0 +1,14 @@ +# CatalogsHotelItemsPostFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hotel_ids** | **[str]** | | +**catalog_type** | **str** | | defaults to "HOTEL" +**catalog_id** | **str** | Catalog id pertaining to the hotel item. If not provided, default to oldest hotel catalog | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelListProductsByCatalogBasedFilterRequest.md b/docs/CatalogsHotelListProductsByCatalogBasedFilterRequest.md new file mode 100644 index 0000000..482491c --- /dev/null +++ b/docs/CatalogsHotelListProductsByCatalogBasedFilterRequest.md @@ -0,0 +1,14 @@ +# CatalogsHotelListProductsByCatalogBasedFilterRequest + +Request object to list products for a given hotel catalog_id and product group filter. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_id** | **str** | Catalog id pertaining to the hotel product group. | +**filters** | [**CatalogsHotelProductGroupFilters**](CatalogsHotelProductGroupFilters.md) | | +**catalog_type** | **str** | | defaults to "HOTEL" + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelProduct.md b/docs/CatalogsHotelProduct.md new file mode 100644 index 0000000..e44d50f --- /dev/null +++ b/docs/CatalogsHotelProduct.md @@ -0,0 +1,14 @@ +# CatalogsHotelProduct + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | [**CatalogsHotelProductMetadata**](CatalogsHotelProductMetadata.md) | | +**pin** | [**Pin**](Pin.md) | | +**catalog_type** | **str** | | defaults to "HOTEL" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelProductGroup.md b/docs/CatalogsHotelProductGroup.md new file mode 100644 index 0000000..9d29a25 --- /dev/null +++ b/docs/CatalogsHotelProductGroup.md @@ -0,0 +1,19 @@ +# CatalogsHotelProductGroup + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the hotel product group. | +**filters** | [**CatalogsHotelProductGroupFilters**](CatalogsHotelProductGroupFilters.md) | | +**catalog_id** | **str** | Catalog id pertaining to the hotel product group. | +**catalog_type** | **str** | | defaults to "HOTEL" +**name** | **str** | Name of hotel product group | [optional] +**description** | **str, none_type** | | [optional] +**created_at** | **int** | Unix timestamp in seconds of when catalog product group was created. | [optional] +**updated_at** | **int** | Unix timestamp in seconds of last time catalog product group was updated. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelProductGroupCreateRequest.md b/docs/CatalogsHotelProductGroupCreateRequest.md new file mode 100644 index 0000000..6e2a407 --- /dev/null +++ b/docs/CatalogsHotelProductGroupCreateRequest.md @@ -0,0 +1,16 @@ +# CatalogsHotelProductGroupCreateRequest + +Request object for creating a hotel product group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**filters** | [**CatalogsHotelProductGroupFilters**](CatalogsHotelProductGroupFilters.md) | | +**catalog_id** | **str** | Catalog id pertaining to the hotel product group. | +**catalog_type** | **str** | | defaults to "HOTEL" +**description** | **str, none_type** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelProductGroupFilterKeys.md b/docs/CatalogsHotelProductGroupFilterKeys.md new file mode 100644 index 0000000..9d6721e --- /dev/null +++ b/docs/CatalogsHotelProductGroupFilterKeys.md @@ -0,0 +1,20 @@ +# CatalogsHotelProductGroupFilterKeys + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**price** | [**CatalogsProductGroupPricingCurrencyCriteria**](CatalogsProductGroupPricingCurrencyCriteria.md) | | [optional] +**hotel_id** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**brand** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**custom_label_0** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**custom_label_1** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**custom_label_2** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**custom_label_3** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**custom_label_4** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] +**country** | **CatalogsProductGroupMultipleCountriesCriteria** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelProductGroupFilters.md b/docs/CatalogsHotelProductGroupFilters.md new file mode 100644 index 0000000..2988ec7 --- /dev/null +++ b/docs/CatalogsHotelProductGroupFilters.md @@ -0,0 +1,14 @@ +# CatalogsHotelProductGroupFilters + +Object holding a group of filters for a hotel product group + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any_of** | [**[CatalogsHotelProductGroupFilterKeys]**](CatalogsHotelProductGroupFilterKeys.md) | | [optional] +**all_of** | [**[CatalogsHotelProductGroupFilterKeys]**](CatalogsHotelProductGroupFilterKeys.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelProductGroupFiltersAllOf.md b/docs/CatalogsHotelProductGroupFiltersAllOf.md new file mode 100644 index 0000000..c851fa7 --- /dev/null +++ b/docs/CatalogsHotelProductGroupFiltersAllOf.md @@ -0,0 +1,11 @@ +# CatalogsHotelProductGroupFiltersAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**all_of** | [**[CatalogsHotelProductGroupFilterKeys]**](CatalogsHotelProductGroupFilterKeys.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelProductGroupFiltersAnyOf.md b/docs/CatalogsHotelProductGroupFiltersAnyOf.md new file mode 100644 index 0000000..aeb1562 --- /dev/null +++ b/docs/CatalogsHotelProductGroupFiltersAnyOf.md @@ -0,0 +1,11 @@ +# CatalogsHotelProductGroupFiltersAnyOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any_of** | [**[CatalogsHotelProductGroupFilterKeys]**](CatalogsHotelProductGroupFilterKeys.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelProductGroupProductCounts.md b/docs/CatalogsHotelProductGroupProductCounts.md new file mode 100644 index 0000000..49f02de --- /dev/null +++ b/docs/CatalogsHotelProductGroupProductCounts.md @@ -0,0 +1,14 @@ +# CatalogsHotelProductGroupProductCounts + +Product counts for a Hotel CatalogsProductGroup + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | +**catalog_type** | **str** | | defaults to "HOTEL" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelProductGroupUpdateRequest.md b/docs/CatalogsHotelProductGroupUpdateRequest.md new file mode 100644 index 0000000..32027c6 --- /dev/null +++ b/docs/CatalogsHotelProductGroupUpdateRequest.md @@ -0,0 +1,15 @@ +# CatalogsHotelProductGroupUpdateRequest + +Request object for updating a hotel product group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | **str** | | [optional] if omitted the server will use the default value of "HOTEL" +**name** | **str** | | [optional] +**description** | **str, none_type** | | [optional] +**filters** | [**CatalogsHotelProductGroupFilters**](CatalogsHotelProductGroupFilters.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelProductMetadata.md b/docs/CatalogsHotelProductMetadata.md new file mode 100644 index 0000000..25e333d --- /dev/null +++ b/docs/CatalogsHotelProductMetadata.md @@ -0,0 +1,13 @@ +# CatalogsHotelProductMetadata + +Hotel product metadata entity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hotel_id** | **str** | The user-created unique ID that represents the hotel item. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelReportParameters.md b/docs/CatalogsHotelReportParameters.md new file mode 100644 index 0000000..5f84db3 --- /dev/null +++ b/docs/CatalogsHotelReportParameters.md @@ -0,0 +1,14 @@ +# CatalogsHotelReportParameters + +Parameters for hotel report + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | +**catalog_type** | **str** | | defaults to "HOTEL" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsItemValidationIssue.md b/docs/CatalogsItemValidationIssue.md index 5aecfb4..ea7abeb 100644 --- a/docs/CatalogsItemValidationIssue.md +++ b/docs/CatalogsItemValidationIssue.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | | must be one of ["AD_LINK_FORMAT_WARNING", "AD_LINK_SAME_AS_LINK", "ADDITIONAL_IMAGE_LINK_LENGTH_TOO_LONG", "ADDITIONAL_IMAGE_LINK_WARNING", "ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "ADWORDS_FORMAT_WARNING", "ADWORDS_SAME_AS_LINK", "AGE_GROUP_INVALID", "AGE_GROUP_NORMALIZED", "ANDROID_DEEP_LINK_INVALID", "AVAILABILITY_DATE_INVALID", "AVAILABILITY_INVALID", "AVAILABILITY_NORMALIZED", "BLOCKLISTED_IMAGE_SIGNATURE", "CONDITION_NORMALIZED", "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", "CUSTOM_LABEL_LENGTH_TOO_LONG", "DESCRIPTION_LENGTH_TOO_LONG", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "EXPIRATION_DATE_INVALID", "GENDER_INVALID", "GENDER_NORMALIZED", "GTIN_INVALID", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "IMAGE_LINK_WARNING", "INVALID_DOMAIN", "IOS_DEEP_LINK_INVALID", "IS_BUNDLE_INVALID", "ITEM_ADDITIONAL_IMAGE_DOWNLOAD_FAILURE", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_FORMAT_WARNING", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "MIN_AD_PRICE_INVALID", "MPN_INVALID", "MULTIPACK_INVALID", "OPTIONAL_CONDITION_INVALID", "OPTIONAL_CONDITION_MISSING", "OPTIONAL_PRODUCT_CATEGORY_INVALID", "OPTIONAL_PRODUCT_CATEGORY_MISSING", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_CATEGORY_DEPTH_WARNING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "PRODUCT_TYPE_LENGTH_TOO_LONG", "SALE_DATE_INVALID", "SALES_PRICE_INVALID", "SALES_PRICE_TOO_HIGH", "SALES_PRICE_TOO_LOW", "SHIPPING_INVALID", "SHIPPING_HEIGHT_INVALID", "SHIPPING_WEIGHT_INVALID", "SHIPPING_WIDTH_INVALID", "SIZE_SYSTEM_INVALID", "SIZE_TYPE_INVALID", "SIZE_TYPE_NORMALIZED", "TAX_INVALID", "TITLE_LENGTH_TOO_LONG", "TITLE_MISSING", "TOO_MANY_ADDITIONAL_IMAGE_LINKS", "UTM_SOURCE_AUTO_CORRECTED", "WEIGHT_UNIT_INVALID", ] +**value** | **str** | | must be one of ["AD_LINK_FORMAT_WARNING", "AD_LINK_SAME_AS_LINK", "ADDITIONAL_IMAGE_LINK_LENGTH_TOO_LONG", "ADDITIONAL_IMAGE_LINK_WARNING", "ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "ADWORDS_FORMAT_WARNING", "ADWORDS_SAME_AS_LINK", "AGE_GROUP_INVALID", "ANDROID_DEEP_LINK_INVALID", "AVAILABILITY_DATE_INVALID", "AVAILABILITY_INVALID", "BLOCKLISTED_IMAGE_SIGNATURE", "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", "CUSTOM_LABEL_LENGTH_TOO_LONG", "DESCRIPTION_LENGTH_TOO_LONG", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "EXPIRATION_DATE_INVALID", "GENDER_INVALID", "GTIN_INVALID", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "IMAGE_LINK_WARNING", "INVALID_DOMAIN", "IOS_DEEP_LINK_INVALID", "IS_BUNDLE_INVALID", "ITEM_ADDITIONAL_IMAGE_DOWNLOAD_FAILURE", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_FORMAT_WARNING", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "MIN_AD_PRICE_INVALID", "MPN_INVALID", "MULTIPACK_INVALID", "OPTIONAL_CONDITION_INVALID", "OPTIONAL_CONDITION_MISSING", "OPTIONAL_PRODUCT_CATEGORY_INVALID", "OPTIONAL_PRODUCT_CATEGORY_MISSING", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_CATEGORY_DEPTH_WARNING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "PRODUCT_TYPE_LENGTH_TOO_LONG", "SALE_DATE_INVALID", "SALES_PRICE_INVALID", "SALES_PRICE_TOO_HIGH", "SALES_PRICE_TOO_LOW", "SHIPPING_INVALID", "SHIPPING_HEIGHT_INVALID", "SHIPPING_WEIGHT_INVALID", "SHIPPING_WIDTH_INVALID", "SIZE_SYSTEM_INVALID", "SIZE_TYPE_INVALID", "TAX_INVALID", "TITLE_LENGTH_TOO_LONG", "TITLE_MISSING", "TOO_MANY_ADDITIONAL_IMAGE_LINKS", "UTM_SOURCE_AUTO_CORRECTED", "WEIGHT_UNIT_INVALID", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsItemValidationWarnings.md b/docs/CatalogsItemValidationWarnings.md index 6ebdc69..377bc8f 100644 --- a/docs/CatalogsItemValidationWarnings.md +++ b/docs/CatalogsItemValidationWarnings.md @@ -12,17 +12,13 @@ Name | Type | Description | Notes **adwords_same_as_link** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **age_group_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **size_system_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] -**age_group_normalized** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **android_deep_link_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **availability_date_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] -**availability_normalized** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] -**condition_normalized** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **country_does_not_map_to_currency** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **custom_label_length_too_long** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **description_length_too_long** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **expiration_date_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **gender_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] -**gender_normalized** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **gtin_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **image_link_warning** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **ios_deep_link_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] @@ -47,7 +43,6 @@ Name | Type | Description | Notes **shipping_weight_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **shipping_width_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **size_type_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] -**size_type_normalized** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **tax_invalid** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **title_length_too_long** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] **too_many_additional_image_links** | [**CatalogsItemValidationDetails**](CatalogsItemValidationDetails.md) | | [optional] diff --git a/docs/CatalogsItemsBatch.md b/docs/CatalogsItemsBatch.md index f89022d..8aa3204 100644 --- a/docs/CatalogsItemsBatch.md +++ b/docs/CatalogsItemsBatch.md @@ -5,11 +5,12 @@ Object describing the catalogs items batch ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**items** | [**[ItemProcessingRecord]**](ItemProcessingRecord.md) | Array with the catalogs items processing records part of the catalogs items batch | [optional] +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | **batch_id** | **str** | Id of the catalogs items batch | [optional] -**created_time** | **datetime** | Time of the batch creation: YYYY-MM-DD'T'hh:mm:ssTZD | [optional] [readonly] -**completed_time** | **datetime, none_type** | Time of the batch completion: YYYY-MM-DD'T'hh:mm:ssTZD | [optional] [readonly] +**created_time** | **datetime** | Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss | [optional] [readonly] +**completed_time** | **datetime, none_type** | Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss | [optional] [readonly] **status** | [**BatchOperationStatus**](BatchOperationStatus.md) | | [optional] +**items** | [**[CreativeAssetsProcessingRecord]**](CreativeAssetsProcessingRecord.md) | Array with the catalogs items processing records part of the catalogs items batch | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsItemsBatchRequest.md b/docs/CatalogsItemsBatchRequest.md index 7387dc9..9e3307f 100644 --- a/docs/CatalogsItemsBatchRequest.md +++ b/docs/CatalogsItemsBatchRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **operation** | [**BatchOperation**](BatchOperation.md) | | **country** | [**Country**](Country.md) | | [optional] -**language** | [**Language**](Language.md) | | [optional] +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | [optional] **items** | [**[ItemDeleteBatchRecord]**](ItemDeleteBatchRecord.md) | Array with catalogs items | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/CatalogsItemsCreateBatchRequest.md b/docs/CatalogsItemsCreateBatchRequest.md index bd265d6..4fa6c8e 100644 --- a/docs/CatalogsItemsCreateBatchRequest.md +++ b/docs/CatalogsItemsCreateBatchRequest.md @@ -6,10 +6,9 @@ Request object to create catalogs items Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **country** | [**Country**](Country.md) | | -**language** | [**Language**](Language.md) | | +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | **operation** | [**BatchOperation**](BatchOperation.md) | | **items** | [**[ItemCreateBatchRecord]**](ItemCreateBatchRecord.md) | Array with catalogs items | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsItemsDeleteBatchRequest.md b/docs/CatalogsItemsDeleteBatchRequest.md index 112ab68..7efd18f 100644 --- a/docs/CatalogsItemsDeleteBatchRequest.md +++ b/docs/CatalogsItemsDeleteBatchRequest.md @@ -6,10 +6,9 @@ Request object to delete catalogs items Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **country** | [**Country**](Country.md) | | -**language** | [**Language**](Language.md) | | +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | **operation** | [**BatchOperation**](BatchOperation.md) | | **items** | [**[ItemDeleteBatchRecord]**](ItemDeleteBatchRecord.md) | Array with catalogs items | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsItemsDeleteDiscontinuedBatchRequest.md b/docs/CatalogsItemsDeleteDiscontinuedBatchRequest.md index b42afa9..1674a83 100644 --- a/docs/CatalogsItemsDeleteDiscontinuedBatchRequest.md +++ b/docs/CatalogsItemsDeleteDiscontinuedBatchRequest.md @@ -6,10 +6,9 @@ Request object to discontinue catalogs items Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **country** | [**Country**](Country.md) | | -**language** | [**Language**](Language.md) | | +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | **operation** | [**BatchOperation**](BatchOperation.md) | | **items** | [**[ItemDeleteDiscontinuedBatchRecord]**](ItemDeleteDiscontinuedBatchRecord.md) | Array with catalogs items | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsItemsFilters.md b/docs/CatalogsItemsFilters.md new file mode 100644 index 0000000..52c70cf --- /dev/null +++ b/docs/CatalogsItemsFilters.md @@ -0,0 +1,16 @@ +# CatalogsItemsFilters + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**item_ids** | **[str]** | | +**hotel_ids** | **[str]** | | +**creative_assets_ids** | **[str]** | | +**catalog_id** | **str** | Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsItemsPostFilters.md b/docs/CatalogsItemsPostFilters.md new file mode 100644 index 0000000..96fed1c --- /dev/null +++ b/docs/CatalogsItemsPostFilters.md @@ -0,0 +1,16 @@ +# CatalogsItemsPostFilters + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**item_ids** | **[str]** | | +**hotel_ids** | **[str]** | | +**creative_assets_ids** | **[str]** | | +**catalog_id** | **str** | Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsItemsRequest.md b/docs/CatalogsItemsRequest.md new file mode 100644 index 0000000..3929cc1 --- /dev/null +++ b/docs/CatalogsItemsRequest.md @@ -0,0 +1,14 @@ +# CatalogsItemsRequest + +Request object of catalogs items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | [**Country**](Country.md) | | +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | +**filters** | [**CatalogsItemsPostFilters**](CatalogsItemsPostFilters.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsItemsUpdateBatchRequest.md b/docs/CatalogsItemsUpdateBatchRequest.md index 6dba887..75f2188 100644 --- a/docs/CatalogsItemsUpdateBatchRequest.md +++ b/docs/CatalogsItemsUpdateBatchRequest.md @@ -6,10 +6,9 @@ Request object to update catalogs items Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **country** | [**Country**](Country.md) | | -**language** | [**Language**](Language.md) | | +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | **operation** | [**BatchOperation**](BatchOperation.md) | | **items** | [**[ItemUpdateBatchRecord]**](ItemUpdateBatchRecord.md) | Array with catalogs items | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsItemsUpsertBatchRequest.md b/docs/CatalogsItemsUpsertBatchRequest.md new file mode 100644 index 0000000..99d33e9 --- /dev/null +++ b/docs/CatalogsItemsUpsertBatchRequest.md @@ -0,0 +1,16 @@ +# CatalogsItemsUpsertBatchRequest + +Request object to upsert catalogs items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | [**Country**](Country.md) | | +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | +**operation** | [**BatchOperation**](BatchOperation.md) | | +**items** | [**[ItemUpsertBatchRecord]**](ItemUpsertBatchRecord.md) | Array with catalogs items | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsListProductsByFeedBasedFilter.md b/docs/CatalogsListProductsByFeedBasedFilter.md new file mode 100644 index 0000000..a19ab89 --- /dev/null +++ b/docs/CatalogsListProductsByFeedBasedFilter.md @@ -0,0 +1,13 @@ +# CatalogsListProductsByFeedBasedFilter + +Request object to list products for a given feed_id and product group filter. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feed_id** | **str** | Catalog Feed id pertaining to the catalog product group filter. | +**filters** | [**CatalogsProductGroupFilters**](CatalogsProductGroupFilters.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsListProductsByFilterRequest.md b/docs/CatalogsListProductsByFilterRequest.md index 52fe588..da1eb14 100644 --- a/docs/CatalogsListProductsByFilterRequest.md +++ b/docs/CatalogsListProductsByFilterRequest.md @@ -7,6 +7,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **feed_id** | **str** | Catalog Feed id pertaining to the catalog product group filter. | [optional] **filters** | [**CatalogsProductGroupFilters**](CatalogsProductGroupFilters.md) | | [optional] +**catalog_type** | **str** | | [optional] if omitted the server will use the default value of "CREATIVE_ASSETS" +**catalog_id** | **str** | Catalog id pertaining to the creative assets product group. | [optional] +**country** | [**Country**](Country.md) | | [optional] +**locale** | [**CatalogsLocale**](CatalogsLocale.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsProduct.md b/docs/CatalogsProduct.md index 9f5d84f..f062370 100644 --- a/docs/CatalogsProduct.md +++ b/docs/CatalogsProduct.md @@ -1,10 +1,12 @@ # CatalogsProduct +Catalogs product for all verticals ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**metadata** | [**CatalogsProductMetadata**](CatalogsProductMetadata.md) | | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**metadata** | [**CatalogsCreativeAssetsProductMetadata**](CatalogsCreativeAssetsProductMetadata.md) | | **pin** | [**Pin**](Pin.md) | | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/CatalogsProductGroupCreateRequest.md b/docs/CatalogsProductGroupCreateRequest.md index 42fb6d2..d6e76db 100644 --- a/docs/CatalogsProductGroupCreateRequest.md +++ b/docs/CatalogsProductGroupCreateRequest.md @@ -5,11 +5,11 @@ Request object for creating a product group. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**filters** | [**CatalogsProductGroupFiltersRequest**](CatalogsProductGroupFiltersRequest.md) | | +**feed_id** | **str** | Catalog Feed id pertaining to the catalog product group. | **description** | **str, none_type** | | [optional] **is_featured** | **bool** | boolean indicator of whether the product group is being featured or not | [optional] if omitted the server will use the default value of False -**name** | **str** | | [optional] -**filters** | [**CatalogsProductGroupFiltersRequest**](CatalogsProductGroupFiltersRequest.md) | | [optional] -**feed_id** | **str** | Catalog Feed id pertaining to the catalog product group. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsProductGroupFilterKeys.md b/docs/CatalogsProductGroupFilterKeys.md index efac83d..c1d845d 100644 --- a/docs/CatalogsProductGroupFilterKeys.md +++ b/docs/CatalogsProductGroupFilterKeys.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **custom_label_4** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] **item_group_id** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] **gender** | **CatalogsProductGroupMultipleGenderCriteria** | | [optional] +**media_type** | **CatalogsProductGroupMultipleMediaTypesCriteria** | | [optional] **product_type_4** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] **product_type_3** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] **product_type_2** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] @@ -30,6 +31,7 @@ Name | Type | Description | Notes **google_product_category_2** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] **google_product_category_1** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] **google_product_category_0** | **CatalogsProductGroupMultipleStringListCriteria** | | [optional] +**product_group** | **CatalogsProductGroupMultipleStringCriteria** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsProductGroupMultipleCountriesCriteria.md b/docs/CatalogsProductGroupMultipleCountriesCriteria.md new file mode 100644 index 0000000..570524a --- /dev/null +++ b/docs/CatalogsProductGroupMultipleCountriesCriteria.md @@ -0,0 +1,12 @@ +# CatalogsProductGroupMultipleCountriesCriteria + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**values** | [**[Country]**](Country.md) | | +**negated** | **bool** | | [optional] if omitted the server will use the default value of False + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsProductGroupMultipleMediaTypesCriteria.md b/docs/CatalogsProductGroupMultipleMediaTypesCriteria.md new file mode 100644 index 0000000..941177c --- /dev/null +++ b/docs/CatalogsProductGroupMultipleMediaTypesCriteria.md @@ -0,0 +1,12 @@ +# CatalogsProductGroupMultipleMediaTypesCriteria + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**values** | [**[MediaType]**](MediaType.md) | | +**negated** | **bool** | | [optional] if omitted the server will use the default value of False + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsProductGroupPricingCurrencyCriteria.md b/docs/CatalogsProductGroupPricingCurrencyCriteria.md new file mode 100644 index 0000000..56bc428 --- /dev/null +++ b/docs/CatalogsProductGroupPricingCurrencyCriteria.md @@ -0,0 +1,15 @@ +# CatalogsProductGroupPricingCurrencyCriteria + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operator** | **str** | | +**value** | **float** | | +**currency** | [**NonNullableCatalogsCurrency**](NonNullableCatalogsCurrency.md) | | +**negated** | **bool** | | [optional] if omitted the server will use the default value of False +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsProductGroupProductCountsVertical.md b/docs/CatalogsProductGroupProductCountsVertical.md new file mode 100644 index 0000000..bf29393 --- /dev/null +++ b/docs/CatalogsProductGroupProductCountsVertical.md @@ -0,0 +1,18 @@ +# CatalogsProductGroupProductCountsVertical + +Product counts for a CatalogsProductGroup + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**in_stock** | **float** | | +**out_of_stock** | **float** | | +**preorder** | **float** | | +**total** | **float** | | +**videos** | **float** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsProductGroupUpdateRequest.md b/docs/CatalogsProductGroupUpdateRequest.md index 193f946..696c4a5 100644 --- a/docs/CatalogsProductGroupUpdateRequest.md +++ b/docs/CatalogsProductGroupUpdateRequest.md @@ -9,7 +9,6 @@ Name | Type | Description | Notes **description** | **str, none_type** | | [optional] **is_featured** | **bool** | boolean indicator of whether the product group is being featured or not | [optional] **filters** | [**CatalogsProductGroupFiltersRequest**](CatalogsProductGroupFiltersRequest.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogsReport.md b/docs/CatalogsReport.md new file mode 100644 index 0000000..21253e6 --- /dev/null +++ b/docs/CatalogsReport.md @@ -0,0 +1,14 @@ +# CatalogsReport + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report_status** | **str** | | [optional] +**url** | **str, none_type** | URL to download the report | [optional] +**size** | **float, none_type** | Size of the report in bytes | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsReportDistributionIssueFilter.md b/docs/CatalogsReportDistributionIssueFilter.md new file mode 100644 index 0000000..a5bea47 --- /dev/null +++ b/docs/CatalogsReportDistributionIssueFilter.md @@ -0,0 +1,12 @@ +# CatalogsReportDistributionIssueFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report_type** | **str** | | defaults to "DISTRIBUTION_ISSUES" +**catalog_id** | **str** | Unique identifier of a catalog. If not given, oldest catalog will be used | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsReportDistributionStats.md b/docs/CatalogsReportDistributionStats.md new file mode 100644 index 0000000..b1eb11c --- /dev/null +++ b/docs/CatalogsReportDistributionStats.md @@ -0,0 +1,19 @@ +# CatalogsReportDistributionStats + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report_type** | **str** | | [optional] if omitted the server will use the default value of "DISTRIBUTION_ISSUES" +**catalog_id** | **str** | ID of the catalog entity. | [optional] +**code** | **int** | The event code that a diagnostics aggregated number references | [optional] +**code_label** | **str** | A human-friendly label for the event code (e.g, 'SPAM') | [optional] +**message** | **str** | Title message describing the diagnostic issue | [optional] +**occurrences** | **int** | Number of occurrences of the issue | [optional] +**ineligible_for_ads** | **bool** | Indicates if issue makes items ineligible for ads distribution | [optional] +**ineligible_for_organic** | **bool** | Indicates if issue makes items ineligible for organic distribution | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsReportFeedIngestionFilter.md b/docs/CatalogsReportFeedIngestionFilter.md new file mode 100644 index 0000000..7b32b6b --- /dev/null +++ b/docs/CatalogsReportFeedIngestionFilter.md @@ -0,0 +1,13 @@ +# CatalogsReportFeedIngestionFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feed_id** | **str** | ID of the feed entity. | +**report_type** | **str** | | defaults to "FEED_INGESTION_ISSUES" +**processing_result_id** | **str** | Unique identifier of a feed processing result. It can be acquired from the \"id\" field of the \"items\" array within the response of the [List processing results for a given feed](/docs/api/v5/#operation/feed_processing_results/list). If not provided, default to most recent completed processing result. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsReportFeedIngestionStats.md b/docs/CatalogsReportFeedIngestionStats.md new file mode 100644 index 0000000..dec121d --- /dev/null +++ b/docs/CatalogsReportFeedIngestionStats.md @@ -0,0 +1,18 @@ +# CatalogsReportFeedIngestionStats + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report_type** | **str** | | [optional] if omitted the server will use the default value of "FEED_INGESTION_ISSUES" +**catalog_id** | **str** | ID of the catalog entity. | [optional] +**code** | **int** | The event code that a diagnostics aggregated number references | [optional] +**code_label** | **str** | A human-friendly label for the event code (e.g, 'AVAILABILITY_INVALID') | [optional] +**message** | **str** | Title message describing the diagnostic issue | [optional] +**occurrences** | **int** | Number of occurrences of the issue | [optional] +**severity** | **str** | An ERROR means that items have been dropped, while a WARN denotes that items have been ingested despite an issue | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsReportParameters.md b/docs/CatalogsReportParameters.md new file mode 100644 index 0000000..8bb1565 --- /dev/null +++ b/docs/CatalogsReportParameters.md @@ -0,0 +1,14 @@ +# CatalogsReportParameters + +Report parameters + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**report** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsReportStats.md b/docs/CatalogsReportStats.md new file mode 100644 index 0000000..e1a39d7 --- /dev/null +++ b/docs/CatalogsReportStats.md @@ -0,0 +1,21 @@ +# CatalogsReportStats + +Diagnostics aggregated numbers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report_type** | **str** | | +**catalog_id** | **str** | ID of the catalog entity. | [optional] +**code** | **int** | The event code that a diagnostics aggregated number references | [optional] +**code_label** | **str** | A human-friendly label for the event code (e.g, 'SPAM') | [optional] +**message** | **str** | Title message describing the diagnostic issue | [optional] +**occurrences** | **int** | Number of occurrences of the issue | [optional] +**severity** | **str** | An ERROR means that items have been dropped, while a WARN denotes that items have been ingested despite an issue | [optional] +**ineligible_for_ads** | **bool** | Indicates if issue makes items ineligible for ads distribution | [optional] +**ineligible_for_organic** | **bool** | Indicates if issue makes items ineligible for organic distribution | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailBatchRequest.md b/docs/CatalogsRetailBatchRequest.md new file mode 100644 index 0000000..bfc379e --- /dev/null +++ b/docs/CatalogsRetailBatchRequest.md @@ -0,0 +1,15 @@ +# CatalogsRetailBatchRequest + +A request object that can have multiple operations on a single retail batch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | [**Country**](Country.md) | | +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | +**items** | **[bool, date, datetime, dict, float, int, list, str, none_type]** | Array with catalogs item operations | +**catalog_type** | **str** | | defaults to "RETAIL" + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailFeed.md b/docs/CatalogsRetailFeed.md new file mode 100644 index 0000000..04805e4 --- /dev/null +++ b/docs/CatalogsRetailFeed.md @@ -0,0 +1,26 @@ +# CatalogsRetailFeed + +Catalogs Retail Feed object + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**id** | **str** | | +**updated_at** | **datetime** | | +**name** | **str, none_type** | A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. | +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | +**status** | [**CatalogsStatus**](CatalogsStatus.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | +**default_locale** | **str** | The locale used within a feed for product descriptions. | +**default_country** | [**Country**](Country.md) | | +**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailFeedsCreateRequest.md b/docs/CatalogsRetailFeedsCreateRequest.md new file mode 100644 index 0000000..a50a3c0 --- /dev/null +++ b/docs/CatalogsRetailFeedsCreateRequest.md @@ -0,0 +1,22 @@ +# CatalogsRetailFeedsCreateRequest + +Request object for creating a retail feed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A human-friendly name associated to a given feed. | +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | +**default_locale** | **bool, date, datetime, dict, float, int, list, str, none_type** | The locale used within a feed for product descriptions. | +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**default_country** | [**Country**](Country.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | [optional] +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | [optional] +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] +**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | [optional] +**status** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailFeedsUpdateRequest.md b/docs/CatalogsRetailFeedsUpdateRequest.md new file mode 100644 index 0000000..e5810dc --- /dev/null +++ b/docs/CatalogsRetailFeedsUpdateRequest.md @@ -0,0 +1,20 @@ +# CatalogsRetailFeedsUpdateRequest + +Request object for updating a feed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | [optional] +**name** | **str** | A human-friendly name associated to a given feed. | [optional] +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | [optional] +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | [optional] +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | [optional] +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] +**status** | [**CatalogsStatus**](CatalogsStatus.md) | | [optional] +**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailItemErrorResponse.md b/docs/CatalogsRetailItemErrorResponse.md new file mode 100644 index 0000000..d06aca8 --- /dev/null +++ b/docs/CatalogsRetailItemErrorResponse.md @@ -0,0 +1,15 @@ +# CatalogsRetailItemErrorResponse + +Object describing a retail item error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**item_id** | **str** | The catalog item id in the merchant namespace | [optional] +**errors** | [**[ItemValidationEvent]**](ItemValidationEvent.md) | Array with the errors for the item id requested | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailItemResponse.md b/docs/CatalogsRetailItemResponse.md new file mode 100644 index 0000000..c984174 --- /dev/null +++ b/docs/CatalogsRetailItemResponse.md @@ -0,0 +1,16 @@ +# CatalogsRetailItemResponse + +Object describing a retail item record + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**item_id** | **str** | The catalog retail item id in the merchant namespace | [optional] +**pins** | [**[Pin], none_type**](Pin.md) | The pins mapped to the item | [optional] +**attributes** | [**ItemAttributes**](ItemAttributes.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailItemsBatch.md b/docs/CatalogsRetailItemsBatch.md new file mode 100644 index 0000000..cf8abf2 --- /dev/null +++ b/docs/CatalogsRetailItemsBatch.md @@ -0,0 +1,18 @@ +# CatalogsRetailItemsBatch + +Object describing the catalogs retail items batch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**batch_id** | **str** | Id of the catalogs items batch | [optional] +**created_time** | **datetime** | Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss | [optional] [readonly] +**completed_time** | **datetime, none_type** | Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss | [optional] [readonly] +**status** | [**BatchOperationStatus**](BatchOperationStatus.md) | | [optional] +**items** | [**[ItemProcessingRecord]**](ItemProcessingRecord.md) | Array with the catalogs items processing records part of the catalogs items batch | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailItemsFilter.md b/docs/CatalogsRetailItemsFilter.md new file mode 100644 index 0000000..1de1fe2 --- /dev/null +++ b/docs/CatalogsRetailItemsFilter.md @@ -0,0 +1,14 @@ +# CatalogsRetailItemsFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_ids** | **[str]** | | +**catalog_type** | **str** | | defaults to "RETAIL" +**catalog_id** | **str** | Catalog id pertaining to the retail item. If not provided, default to oldest retail catalog | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailItemsPostFilter.md b/docs/CatalogsRetailItemsPostFilter.md new file mode 100644 index 0000000..d1b2757 --- /dev/null +++ b/docs/CatalogsRetailItemsPostFilter.md @@ -0,0 +1,14 @@ +# CatalogsRetailItemsPostFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_ids** | **[str]** | | +**catalog_type** | **str** | | defaults to "RETAIL" +**catalog_id** | **str** | Catalog id pertaining to the retail item. If not provided, default to oldest retail catalog | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailListProductsByCatalogBasedFilterRequest.md b/docs/CatalogsRetailListProductsByCatalogBasedFilterRequest.md new file mode 100644 index 0000000..2155711 --- /dev/null +++ b/docs/CatalogsRetailListProductsByCatalogBasedFilterRequest.md @@ -0,0 +1,16 @@ +# CatalogsRetailListProductsByCatalogBasedFilterRequest + +Request object to list products for a given retail catalog_id and product group filter. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_id** | **str** | Catalog id pertaining to the retail product group. | +**filters** | [**CatalogsProductGroupFilters**](CatalogsProductGroupFilters.md) | | +**country** | [**Country**](Country.md) | | +**locale** | [**CatalogsLocale**](CatalogsLocale.md) | | +**catalog_type** | **str** | Retail catalog based product group is available only for selected partners at the moment. If you are not eligible, please use feed based one. | defaults to "RETAIL" + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailProduct.md b/docs/CatalogsRetailProduct.md new file mode 100644 index 0000000..c41bde5 --- /dev/null +++ b/docs/CatalogsRetailProduct.md @@ -0,0 +1,14 @@ +# CatalogsRetailProduct + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | [**CatalogsRetailProductMetadata**](CatalogsRetailProductMetadata.md) | | +**pin** | [**Pin**](Pin.md) | | +**catalog_type** | **str** | | defaults to "RETAIL" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailProductGroup.md b/docs/CatalogsRetailProductGroup.md new file mode 100644 index 0000000..7e5c6e1 --- /dev/null +++ b/docs/CatalogsRetailProductGroup.md @@ -0,0 +1,25 @@ +# CatalogsRetailProductGroup + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the catalog product group. | +**filters** | [**CatalogsProductGroupFilters**](CatalogsProductGroupFilters.md) | | +**catalog_id** | **str** | Catalog id pertaining to the retail product group. | +**feed_id** | **str, none_type** | id of the catalogs feed belonging to this catalog product group | +**catalog_type** | **str** | | defaults to "RETAIL" +**name** | **str** | Name of catalog product group | [optional] +**description** | **str, none_type** | | [optional] +**is_featured** | **bool** | boolean indicator of whether the product group is being featured or not | [optional] +**type** | [**CatalogsProductGroupType**](CatalogsProductGroupType.md) | | [optional] +**status** | [**CatalogsProductGroupStatus**](CatalogsProductGroupStatus.md) | | [optional] +**created_at** | **int** | Unix timestamp in seconds of when catalog product group was created. | [optional] +**updated_at** | **int** | Unix timestamp in seconds of last time catalog product group was updated. | [optional] +**country** | **str, none_type** | | [optional] +**locale** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailProductGroupCreateRequest.md b/docs/CatalogsRetailProductGroupCreateRequest.md new file mode 100644 index 0000000..9194f7f --- /dev/null +++ b/docs/CatalogsRetailProductGroupCreateRequest.md @@ -0,0 +1,18 @@ +# CatalogsRetailProductGroupCreateRequest + +Request object for creating a product group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**filters** | [**CatalogsProductGroupFiltersRequest**](CatalogsProductGroupFiltersRequest.md) | | +**catalog_id** | **str** | Catalog id pertaining to the retail product group. | +**country** | [**Country**](Country.md) | | +**locale** | [**CatalogsLocale**](CatalogsLocale.md) | | +**catalog_type** | **str** | Retail catalog based product group is available only for selected partners at the moment. If you are not eligible, please use feed based one. | defaults to "RETAIL" +**description** | **str, none_type** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailProductGroupProductCounts.md b/docs/CatalogsRetailProductGroupProductCounts.md new file mode 100644 index 0000000..3a86695 --- /dev/null +++ b/docs/CatalogsRetailProductGroupProductCounts.md @@ -0,0 +1,18 @@ +# CatalogsRetailProductGroupProductCounts + +Product counts for a Retail CatalogsProductGroup + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**in_stock** | **float** | | +**out_of_stock** | **float** | | +**preorder** | **float** | | +**total** | **float** | | +**catalog_type** | **str** | | defaults to "RETAIL" +**videos** | **float** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailProductGroupUpdateRequest.md b/docs/CatalogsRetailProductGroupUpdateRequest.md new file mode 100644 index 0000000..849733b --- /dev/null +++ b/docs/CatalogsRetailProductGroupUpdateRequest.md @@ -0,0 +1,17 @@ +# CatalogsRetailProductGroupUpdateRequest + +Request object for updating a retail product group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | **str** | Retail catalog based product group is available only for selected partners at the moment. If you are not eligible, please use feed based one. | [optional] if omitted the server will use the default value of "RETAIL" +**name** | **str** | | [optional] +**description** | **str, none_type** | | [optional] +**filters** | [**CatalogsProductGroupFiltersRequest**](CatalogsProductGroupFiltersRequest.md) | | [optional] +**country** | [**Country**](Country.md) | | [optional] +**locale** | [**CatalogsLocale**](CatalogsLocale.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailProductMetadata.md b/docs/CatalogsRetailProductMetadata.md new file mode 100644 index 0000000..ed11bc1 --- /dev/null +++ b/docs/CatalogsRetailProductMetadata.md @@ -0,0 +1,18 @@ +# CatalogsRetailProductMetadata + +Retail product metadata entity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The user-created unique ID that represents the product. | +**item_group_id** | **str, none_type** | The parent ID of the product. | +**availability** | [**NonNullableProductAvailabilityType**](NonNullableProductAvailabilityType.md) | | +**price** | **float** | The price of the product. | +**sale_price** | **float, none_type** | The discounted price of the product. | +**currency** | [**NonNullableCatalogsCurrency**](NonNullableCatalogsCurrency.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsRetailReportParameters.md b/docs/CatalogsRetailReportParameters.md new file mode 100644 index 0000000..be4367c --- /dev/null +++ b/docs/CatalogsRetailReportParameters.md @@ -0,0 +1,14 @@ +# CatalogsRetailReportParameters + +Parameters for retail report + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | +**catalog_type** | **str** | | defaults to "RETAIL" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsType.md b/docs/CatalogsType.md new file mode 100644 index 0000000..e2a1a85 --- /dev/null +++ b/docs/CatalogsType.md @@ -0,0 +1,12 @@ +# CatalogsType + +Type of the catalog entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Type of the catalog entity. | must be one of ["RETAIL", "HOTEL", "CREATIVE_ASSETS", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsUpdatableCreativeAssetsAttributes.md b/docs/CatalogsUpdatableCreativeAssetsAttributes.md new file mode 100644 index 0000000..ff7f44e --- /dev/null +++ b/docs/CatalogsUpdatableCreativeAssetsAttributes.md @@ -0,0 +1,23 @@ +# CatalogsUpdatableCreativeAssetsAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The name of the creative assets. | [optional] +**description** | **str** | Brief description of the creative assets. | [optional] +**link** | **str** | Link to the creative assets page. | [optional] +**ios_deep_link** | **str, none_type** | IOS deep link to the creative assets page. | [optional] +**android_deep_link** | **str, none_type** | Link to the creative assets page. | [optional] +**google_product_category** | **str, none_type** | The categorization of the product based on the standardized Google Product Taxonomy. This is a set taxonomy. Both the text values and numeric codes are accepted. | [optional] +**custom_label_0** | **str, none_type** | Custom grouping of creative assets. | [optional] +**custom_label_1** | **str, none_type** | Custom grouping of creative assets. | [optional] +**custom_label_2** | **str, none_type** | Custom grouping of creative assets. | [optional] +**custom_label_3** | **str, none_type** | Custom grouping of creative assets. | [optional] +**custom_label_4** | **str, none_type** | Custom grouping of creative assets. | [optional] +**visibility** | **str, none_type** | Visibility of the creative assets. Must be one of the following values (upper or lowercase): ‘visible’, ‘hidden’. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsUpdatableHotelAttributes.md b/docs/CatalogsUpdatableHotelAttributes.md new file mode 100644 index 0000000..3b3622c --- /dev/null +++ b/docs/CatalogsUpdatableHotelAttributes.md @@ -0,0 +1,28 @@ +# CatalogsUpdatableHotelAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str, none_type** | The hotel's name. | [optional] +**link** | **str, none_type** | Link to the product page | [optional] +**description** | **str, none_type** | Brief description of the hotel. | [optional] +**brand** | **str, none_type** | The brand to which this hotel belongs to. | [optional] +**latitude** | **float** | Latitude of the hotel. | [optional] +**longitude** | **float, none_type** | Longitude of the hotel. | [optional] +**neighborhood** | **[str], none_type** | A list of neighborhoods where the hotel is located | [optional] +**address** | [**CatalogsHotelAddress**](CatalogsHotelAddress.md) | | [optional] +**custom_label_0** | **str, none_type** | Custom grouping of hotels | [optional] +**custom_label_1** | **str, none_type** | Custom grouping of hotels | [optional] +**custom_label_2** | **str, none_type** | Custom grouping of hotels | [optional] +**custom_label_3** | **str, none_type** | Custom grouping of hotels | [optional] +**custom_label_4** | **str, none_type** | Custom grouping of hotels | [optional] +**category** | **str, none_type** | The type of property. The category can be any type of internal description desired. | [optional] +**base_price** | **str, none_type** | Base price of the hotel room per night followed by the ISO currency code | [optional] +**sale_price** | **str, none_type** | Sale price of a hotel room per night. Used to advertise discounts off the regular price of the hotel. | [optional] +**guest_ratings** | [**CatalogsHotelGuestRatings**](CatalogsHotelGuestRatings.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsUpdateCreativeAssetsItem.md b/docs/CatalogsUpdateCreativeAssetsItem.md new file mode 100644 index 0000000..badc785 --- /dev/null +++ b/docs/CatalogsUpdateCreativeAssetsItem.md @@ -0,0 +1,15 @@ +# CatalogsUpdateCreativeAssetsItem + +A creative assets item to be updated. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_assets_id** | **str** | The catalog creative assets item id in the merchant namespace | +**attributes** | [**CatalogsUpdatableCreativeAssetsAttributes**](CatalogsUpdatableCreativeAssetsAttributes.md) | | +**operation** | **str** | | defaults to "UPDATE" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsUpdateHotelItem.md b/docs/CatalogsUpdateHotelItem.md new file mode 100644 index 0000000..0760df3 --- /dev/null +++ b/docs/CatalogsUpdateHotelItem.md @@ -0,0 +1,15 @@ +# CatalogsUpdateHotelItem + +Object describing an hotel item batch record + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hotel_id** | **str** | The catalog hotel item id in the merchant namespace | +**attributes** | [**CatalogsUpdatableHotelAttributes**](CatalogsUpdatableHotelAttributes.md) | | +**operation** | **str** | | defaults to "UPDATE" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsUpdateRetailItem.md b/docs/CatalogsUpdateRetailItem.md new file mode 100644 index 0000000..ab61fc2 --- /dev/null +++ b/docs/CatalogsUpdateRetailItem.md @@ -0,0 +1,16 @@ +# CatalogsUpdateRetailItem + +An item to be updated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog item id in the merchant namespace | +**attributes** | [**UpdatableItemAttributes**](UpdatableItemAttributes.md) | | +**operation** | **str** | | defaults to "UPDATE" +**update_mask** | [**[UpdateMaskFieldType], none_type**](UpdateMaskFieldType.md) | The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsUpsertCreativeAssetsItem.md b/docs/CatalogsUpsertCreativeAssetsItem.md new file mode 100644 index 0000000..bbd67e4 --- /dev/null +++ b/docs/CatalogsUpsertCreativeAssetsItem.md @@ -0,0 +1,15 @@ +# CatalogsUpsertCreativeAssetsItem + +A creative assets item to be upserted. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_assets_id** | **str** | The catalog creative assets id in the merchant namespace | +**attributes** | [**CatalogsCreativeAssetsAttributes**](CatalogsCreativeAssetsAttributes.md) | | +**operation** | **str** | | defaults to "UPSERT" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsUpsertHotelItem.md b/docs/CatalogsUpsertHotelItem.md new file mode 100644 index 0000000..567bfdb --- /dev/null +++ b/docs/CatalogsUpsertHotelItem.md @@ -0,0 +1,15 @@ +# CatalogsUpsertHotelItem + +A hotel item to be upserted. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hotel_id** | **str** | The catalog hotel id in the merchant namespace | +**attributes** | [**CatalogsHotelAttributes**](CatalogsHotelAttributes.md) | | +**operation** | **str** | | defaults to "UPSERT" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsUpsertRetailItem.md b/docs/CatalogsUpsertRetailItem.md new file mode 100644 index 0000000..ffab58f --- /dev/null +++ b/docs/CatalogsUpsertRetailItem.md @@ -0,0 +1,15 @@ +# CatalogsUpsertRetailItem + +An item to be upserted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog item id in the merchant namespace | +**attributes** | [**ItemAttributesRequest**](ItemAttributesRequest.md) | | +**operation** | **str** | | defaults to "UPSERT" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsVerticalBatchRequest.md b/docs/CatalogsVerticalBatchRequest.md new file mode 100644 index 0000000..2cb8bfc --- /dev/null +++ b/docs/CatalogsVerticalBatchRequest.md @@ -0,0 +1,17 @@ +# CatalogsVerticalBatchRequest + +A request object that can have multiple operations on a single batch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**catalog_id** | **str** | Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog | [optional] +**country** | [**Country**](Country.md) | | [optional] +**language** | **bool, date, datetime, dict, float, int, list, str, none_type** | We recommend using the CatalogsLocale values. | [optional] +**items** | [**[CatalogsCreativeAssetsBatchItem]**](CatalogsCreativeAssetsBatchItem.md) | Array with creative assets item operations | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsVerticalFeedsCreateRequest.md b/docs/CatalogsVerticalFeedsCreateRequest.md new file mode 100644 index 0000000..c54d680 --- /dev/null +++ b/docs/CatalogsVerticalFeedsCreateRequest.md @@ -0,0 +1,24 @@ +# CatalogsVerticalFeedsCreateRequest + +Request object for creating a feed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | [optional] +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | [optional] +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] +**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | [optional] +**status** | **str** | | [optional] +**catalog_id** | **str, none_type** | Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. At the moment a catalog can not have multiple creative assets feeds but this will change in the future. | [optional] +**name** | **str** | A human-friendly name associated to a given feed. | [optional] +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | [optional] +**default_locale** | **bool, date, datetime, dict, float, int, list, str, none_type** | The locale used within a feed for product descriptions. | [optional] +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | [optional] +**default_country** | [**Country**](Country.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsVerticalFeedsUpdateRequest.md b/docs/CatalogsVerticalFeedsUpdateRequest.md new file mode 100644 index 0000000..5c278cd --- /dev/null +++ b/docs/CatalogsVerticalFeedsUpdateRequest.md @@ -0,0 +1,21 @@ +# CatalogsVerticalFeedsUpdateRequest + +Request object for updating a feed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | [optional] +**name** | **str** | A human-friendly name associated to a given feed. | [optional] +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | [optional] +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | [optional] +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | [optional] +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | [optional] +**status** | [**CatalogsStatus**](CatalogsStatus.md) | | [optional] +**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsVerticalProductGroup.md b/docs/CatalogsVerticalProductGroup.md new file mode 100644 index 0000000..04af148 --- /dev/null +++ b/docs/CatalogsVerticalProductGroup.md @@ -0,0 +1,25 @@ +# CatalogsVerticalProductGroup + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**name** | **str** | Name of creative assets product group | [optional] +**description** | **str, none_type** | | [optional] +**is_featured** | **bool** | boolean indicator of whether the product group is being featured or not | [optional] +**type** | [**CatalogsProductGroupType**](CatalogsProductGroupType.md) | | [optional] +**status** | [**CatalogsProductGroupStatus**](CatalogsProductGroupStatus.md) | | [optional] +**created_at** | **int** | Unix timestamp in seconds of when catalog product group was created. | [optional] +**updated_at** | **int** | Unix timestamp in seconds of last time catalog product group was updated. | [optional] +**country** | **str, none_type** | | [optional] +**locale** | **str, none_type** | | [optional] +**id** | **str** | ID of the creative assets product group. | [optional] +**filters** | [**CatalogsCreativeAssetsProductGroupFilters**](CatalogsCreativeAssetsProductGroupFilters.md) | | [optional] +**catalog_id** | **str** | Catalog id pertaining to the creative assets product group. | [optional] +**feed_id** | **str, none_type** | id of the catalogs feed belonging to this catalog product group | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsVerticalProductGroupCreateRequest.md b/docs/CatalogsVerticalProductGroupCreateRequest.md new file mode 100644 index 0000000..4558e3d --- /dev/null +++ b/docs/CatalogsVerticalProductGroupCreateRequest.md @@ -0,0 +1,19 @@ +# CatalogsVerticalProductGroupCreateRequest + +Request object for creating a catalog based product group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**description** | **str, none_type** | | [optional] +**name** | **str** | | [optional] +**filters** | [**CatalogsCreativeAssetsProductGroupFilters**](CatalogsCreativeAssetsProductGroupFilters.md) | | [optional] +**catalog_id** | **str** | Catalog id pertaining to the creative assets product group. | [optional] +**country** | [**Country**](Country.md) | | [optional] +**locale** | [**CatalogsLocale**](CatalogsLocale.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsVerticalProductGroupUpdateRequest.md b/docs/CatalogsVerticalProductGroupUpdateRequest.md new file mode 100644 index 0000000..183d80b --- /dev/null +++ b/docs/CatalogsVerticalProductGroupUpdateRequest.md @@ -0,0 +1,18 @@ +# CatalogsVerticalProductGroupUpdateRequest + +Request object for updating a catalog based product group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | **str** | | [optional] if omitted the server will use the default value of "CREATIVE_ASSETS" +**name** | **str** | | [optional] +**description** | **str, none_type** | | [optional] +**filters** | [**CatalogsCreativeAssetsProductGroupFilters**](CatalogsCreativeAssetsProductGroupFilters.md) | | [optional] +**country** | [**Country**](Country.md) | | [optional] +**locale** | [**CatalogsLocale**](CatalogsLocale.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsVerticalsListProductsByCatalogBasedFilterRequest.md b/docs/CatalogsVerticalsListProductsByCatalogBasedFilterRequest.md new file mode 100644 index 0000000..1ae5c40 --- /dev/null +++ b/docs/CatalogsVerticalsListProductsByCatalogBasedFilterRequest.md @@ -0,0 +1,17 @@ +# CatalogsVerticalsListProductsByCatalogBasedFilterRequest + +Request object to list products for a given catalog_id and product group filter. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**catalog_id** | **str** | Catalog id pertaining to the creative assets product group. | [optional] +**filters** | [**CatalogsCreativeAssetsProductGroupFilters**](CatalogsCreativeAssetsProductGroupFilters.md) | | [optional] +**country** | [**Country**](Country.md) | | [optional] +**locale** | [**CatalogsLocale**](CatalogsLocale.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConversionEventsApi.md b/docs/ConversionEventsApi.md index fd061fd..5ba1973 100644 --- a/docs/ConversionEventsApi.md +++ b/docs/ConversionEventsApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.pinterest.com/v5* Method | HTTP request | Description ------------- | ------------- | ------------- -[**events_create**](ConversionEventsApi.md#events_create) | **POST** /ad_accounts/{ad_account_id}/events | Send conversion events to the Pinterest API for Conversions +[**events_create**](ConversionEventsApi.md#events_create) | **POST** /ad_accounts/{ad_account_id}/events | Send conversions # **events_create** > ConversionApiResponse events_create(ad_account_id, conversion_events) -Send conversion events to the Pinterest API for Conversions +Send conversions -The Pinterest API offers advertisers a way to send Pinterest their conversion information (including web conversions, in-app conversions, or even offline conversions) based on their ad_account_id. The request body should be a JSON object. - This endpoint requires an access_token be generated through Ads Manager. Review the Conversions Guide for more details. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Audience, Campaign. (Note that the token can be used across multiple ad accounts under an user ID.) - This endpoint has a rate limit of 5,000 calls per minute per ad account. - If the merchant is submitting this information using both Pinterest conversion tags and the Pinterest API, Pinterest will remove duplicate information before reporting. (Note that events that took place offline cannot be deduplicated.) +The Pinterest API offers advertisers a way to send Pinterest their conversion information (including web conversions, in-app conversions, or even offline conversions) based on their ad_account_id. The request body should be a JSON object. - This endpoint requires an access_token be generated through Ads Manager. Review the Conversions Guide for more details. (Note that the authorization header required is Authorization: Bearer <access_token>). - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Audience, Campaign. (Note that the token can be used across multiple ad accounts under an user ID.) - This endpoint has a rate limit of 5,000 calls per minute per ad account. - If the merchant is submitting this information using both Pinterest conversion tags and the Pinterest API, Pinterest will remove duplicate information before reporting. (Note that events that took place offline cannot be deduplicated.) ### Example @@ -25,6 +25,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import conversion_events_api from openapi_generated.pinterest_client.model.conversion_events import ConversionEvents from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.detailed_error import DetailedError from openapi_generated.pinterest_client.model.conversion_api_response import ConversionApiResponse from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -76,6 +77,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: country=["9b202ecbc6d45c6d8901d989a918878397a3eb9d00e8f48022fc051b19d21a1d"], external_id=["6a7a73766627eb611720883d5a11cc62b5bfee237b00a6658d78c50032ec4aee"], click_id="dj0yJnU9b2JDcFFHekV4SHJNcmVrbFBkUEdqakh0akdUT1VjVVUmcD0yJm49cnNBQ3F2Q2dOVDBXWWhkWklrUGxBUSZ0PUFBQUFBR1BaY3Bv", + partner_id="BUJrTlRRzGJmWhRXFZdkioV6wKPBve7Lom__GU9J74hq2NIQj4O3nOZJrp3mcUr5MptkXsI14juMOIM9mNZnM4zEUFT2JLVaFhcOfuuWz3IWEDtBf6I0DPc", ), custom_data=ConversionEventsCustomData( currency="USD", @@ -89,6 +91,9 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: id="red-pinterest-shirt-logo-1", item_price="1325.12", quantity=5, + item_name="pinterest-clothing-shirt", + item_category="pinterest-entertainment", + item_brand="pinterest", ), ], num_items=2, @@ -114,7 +119,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set try: - # Send conversion events to the Pinterest API for Conversions + # Send conversions api_response = api_instance.events_create(ad_account_id, conversion_events) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: @@ -123,7 +128,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Send conversion events to the Pinterest API for Conversions + # Send conversions api_response = api_instance.events_create(ad_account_id, conversion_events, test=test) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: @@ -161,6 +166,7 @@ Name | Type | Description | Notes **400** | The request was invalid. | - | **401** | Not authorized to send conversion events | - | **403** | Unauthorized access. | - | +**422** | Not all events were successfully processed. | - | **429** | This request exceeded a rate limit. This can happen if the client exceeds one of the published rate limits within a short time window. | - | **503** | The endpoint has been ramped down and is currently not accepting any traffic. | - | **0** | Unexpected errors | - | diff --git a/docs/ConversionEventsCustomData.md b/docs/ConversionEventsCustomData.md index 234192f..f80d4e4 100644 --- a/docs/ConversionEventsCustomData.md +++ b/docs/ConversionEventsCustomData.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **num_items** | **int** | Total number of products of the event. For example, the total number of items purchased in a checkout event. We recommend using this if you are a merchant for AddToCart and Checkouts. For detail, please check <a href=\"https://help.pinterest.com/en/business/article/before-you-get-started-with-catalogs\" target=\"_blank\">here</a> (Install the Pinterest tag section). | [optional] **order_id** | **str, none_type** | The order ID. We recommend sending order_id to help us deduplicate events when necessary. This also helps to run other measurement products at Pinterest. | [optional] **search_string** | **str, none_type** | The search string related to the user conversion event. | [optional] -**opt_out_type** | **str, none_type** | Flags for different privacy rights laws to opt out users of sharing personal information. Values should be comma separated. Please follow the <a href=\"https://help.pinterest.com/en/business/article/limited-data-processing\" target=\"_blank\">Help Center</a> and <a href=\"https://developers.pinterest.com/docs/conversions/conversion-management/#Understanding%20Limited%20Data%20Processing\" target=\"_blank\">dev site</a> for specific opt_out_type set up. | [optional] +**opt_out_type** | **str, none_type** | Flags for different privacy rights laws to opt out users of sharing personal information. Values should be comma separated. Please follow the <a href=\"https://help.pinterest.com/en/business/article/limited-data-processing\" target=\"_blank\">Help Center</a> and <a href=\"/docs/api-features/conversion-overview/\" target=\"_blank\">dev site</a> for specific opt_out_type set up. | [optional] **np** | **str, none_type** | Named partner. Not required, this is for Pinterest internal use only. Please do not use this unless specifically guided. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/ConversionEventsCustomDataContents.md b/docs/ConversionEventsCustomDataContents.md index fc9e825..587c55d 100644 --- a/docs/ConversionEventsCustomDataContents.md +++ b/docs/ConversionEventsCustomDataContents.md @@ -7,6 +7,9 @@ Name | Type | Description | Notes **id** | **str** | The id of a product. We recommend using this if you are a merchant for AddToCart and Checkouts. For detail, please check <a href=\"https://help.pinterest.com/en/business/article/before-you-get-started-with-catalogs\" target=\"_blank\">here</a> (Install the Pinterest tag section). | [optional] **item_price** | **str** | The price of a product. Accepted as a string in the request; it will be parsed into a double. This is the original item value before any discount. We recommend using this if you are a merchant for PageVisit, AddToCart and Checkouts. For detail, please check <a href=\"https://help.pinterest.com/en/business/article/before-you-get-started-with-catalogs\" target=\"_blank\">here</a> (Install the Pinterest tag section). | [optional] **quantity** | **int** | The amount of a product. We recommend using this if you are a merchant for AddToCart and Checkouts. For detail, please check <a href=\"https://help.pinterest.com/en/business/article/before-you-get-started-with-catalogs\" target=\"_blank\">here</a> (Install the Pinterest tag section). | [optional] +**item_name** | **str** | The name of a product. | [optional] +**item_category** | **str** | The category of a product. | [optional] +**item_brand** | **str** | The brand of a product. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConversionEventsData.md b/docs/ConversionEventsData.md index b0af1e3..6920eb6 100644 --- a/docs/ConversionEventsData.md +++ b/docs/ConversionEventsData.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_name** | **str** | The type of the user event. Please use the right event_name otherwise the event won’t be accepted and show up correctly in reports. <li><code>add_to_cart</code> <li><code>checkout</code> <li><code>custom</code> <li><code>lead</code> <li><code>page_visit</code> <li><code>search</code> <li><code>signup</code> <li><code>view_category</code> <li><code>watch_video</code> | -**action_source** | **str** | The source indicating where the conversion event occurred. <li><code>app_android</code> <li><code>app_ios</code> <li><code>web</code> <li><code>offline</code> | +**event_name** | **str** | <p>The type of the user event. Please use the right event_name otherwise the event won't be accepted and show up correctly in reports. <ul> <li><code>add_to_cart</code></li> <li><code>checkout</code></li> <li><code>custom</code></li> <li><code>lead</code></li> <li><code>page_visit</code></li> <li><code>search</code></li> <li><code>signup</code></li> <li><code>view_category</code></li> <li><code>watch_video</code></li> </ul> </p> | +**action_source** | **str** | <p> The source indicating where the conversion event occurred. <ul> <li><code>app_android</code></li> <li><code>app_ios</code></li> <li><code>web</code></li> <li><code>offline</code></li> </ul> </p> | **event_time** | **int** | The time when the event happened. Unix timestamp in seconds. | **event_id** | **str** | A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking. Without this, event's data is likely to be double counted and will cause report metric inflation. Third-party vendors make sure this field is updated on both Pinterest tag and Conversions API side before rolling out template for Conversions API. | **user_data** | [**ConversionEventsUserData**](ConversionEventsUserData.md) | | diff --git a/docs/ConversionEventsUserData.md b/docs/ConversionEventsUserData.md index f08dc5b..ccb93fd 100644 --- a/docs/ConversionEventsUserData.md +++ b/docs/ConversionEventsUserData.md @@ -5,21 +5,22 @@ Object containing customer information data. Note, It is required at least one o ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**em** | **[str]** | Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | -**hashed_maids** | **[str]** | Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | +**em** | **[str]** | Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | +**hashed_maids** | **[str]** | Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | **client_ip_address** | **str** | The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. | **client_user_agent** | **str** | The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. | -**ph** | **[str]** | Sha256 hashes of user's phone numbers, only digits with country code, area code, and number. Remove any symbols, letters, spaces and leading zeros. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | [optional] -**ge** | **[str]** | Sha256 hashes of user's gender, in lowercase. Either \"f\" or \"m\" or \"n\" for non-binary gender. | [optional] -**db** | **[str]** | Sha256 hashes of user's date of birthday, given as year, month, and day. | [optional] -**ln** | **[str]** | Sha256 hashes of user's last name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | [optional] -**fn** | **[str]** | Sha256 hashes of user's first name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | [optional] -**ct** | **[str]** | Sha256 hashes of user's city, in lowercase, and without spaces or punctuation. User residency city (mostly billing). | [optional] -**st** | **[str]** | Sha256 hashes of user's state, given as a two-letter code in lowercase. User residency state (mostly billing). | [optional] -**zp** | **[str]** | Sha256 hashes of user's zipcode, only digits. User residency zipcode (mostly billing). | [optional] -**country** | **[str]** | Sha256 hashes of two-character ISO-3166 country code indicating the user's country, in lowercase. | [optional] -**external_id** | **[str]** | Sha256 hashes of the unique id from the advertiser that identifies a user in their space, e.g. user id, loyalty id, etc. We highly recommend this on all events. It may improve reporting performance such as ROAS/CPA. | [optional] +**ph** | **[str]** | Sha256 hashes of user's phone numbers, only digits with country code, area code, and number. Remove any symbols, letters, spaces and leading zeros. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | [optional] +**ge** | **[str]** | Sha256 hashes of user's gender, in lowercase. Either \"f\" or \"m\" or \"n\" for non-binary gender. The string should be in the UTF-8 format. | [optional] +**db** | **[str]** | Sha256 hashes of user's date of birthday, given as year, month, and day. The string should be in the UTF-8 format. | [optional] +**ln** | **[str]** | Sha256 hashes of user's last name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | [optional] +**fn** | **[str]** | Sha256 hashes of user's first name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | [optional] +**ct** | **[str]** | Sha256 hashes of user's city, in lowercase, and without spaces or punctuation. User residency city (mostly billing). The string should be in the UTF-8 format. | [optional] +**st** | **[str]** | Sha256 hashes of user's state, given as a two-letter code in lowercase. User residency state (mostly billing). The string should be in the UTF-8 format. | [optional] +**zp** | **[str]** | Sha256 hashes of user's zipcode, only digits. User residency zipcode (mostly billing). The string should be in the UTF-8 format. | [optional] +**country** | **[str]** | Sha256 hashes of two-character ISO-3166 country code indicating the user's country, in lowercase. The string should be in the UTF-8 format. | [optional] +**external_id** | **[str]** | Sha256 hashes of the unique id from the advertiser that identifies a user in their space, e.g. user id, loyalty id, etc. We highly recommend this on all events. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | [optional] **click_id** | **str, none_type** | The unique identifier stored in _epik cookie on your domain or &epik= query parameter in the URL. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | [optional] +**partner_id** | **str, none_type** | A unique identifier of visitors' information defined by third party partners. e.g RampID | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConversionEventsUserDataAnyOf.md b/docs/ConversionEventsUserDataAnyOf.md index 734aa49..013f3f9 100644 --- a/docs/ConversionEventsUserDataAnyOf.md +++ b/docs/ConversionEventsUserDataAnyOf.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**em** | **[str]** | Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | -**hashed_maids** | **[str]** | Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | [optional] +**em** | **[str]** | Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | +**hashed_maids** | **[str]** | Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | [optional] **client_ip_address** | **str** | The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. | [optional] **client_user_agent** | **str** | The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/ConversionEventsUserDataAnyOf1.md b/docs/ConversionEventsUserDataAnyOf1.md index c26ce3b..9b9a880 100644 --- a/docs/ConversionEventsUserDataAnyOf1.md +++ b/docs/ConversionEventsUserDataAnyOf1.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hashed_maids** | **[str]** | Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | -**em** | **[str]** | Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | [optional] +**hashed_maids** | **[str]** | Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | +**em** | **[str]** | Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | [optional] **client_ip_address** | **str** | The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. | [optional] **client_user_agent** | **str** | The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/ConversionEventsUserDataAnyOf2.md b/docs/ConversionEventsUserDataAnyOf2.md index 07dde7b..61f1aa1 100644 --- a/docs/ConversionEventsUserDataAnyOf2.md +++ b/docs/ConversionEventsUserDataAnyOf2.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **client_ip_address** | **str** | The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. | **client_user_agent** | **str** | The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. | -**em** | **[str]** | Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | [optional] -**hashed_maids** | **[str]** | Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | [optional] +**em** | **[str]** | Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | [optional] +**hashed_maids** | **[str]** | Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConversionTagsApi.md b/docs/ConversionTagsApi.md index 723120f..2ca116f 100644 --- a/docs/ConversionTagsApi.md +++ b/docs/ConversionTagsApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description Create conversion tag -Create a conversion tag, also known as Pinterest tag, with the option to enable enhanced match.

The Pinterest Tag tracks actions people take on the ad account’ s website after they view the ad account's ad on Pinterest. The advertiser needs to customize this tag to track conversions.

For more information, see:

Set up the Pinterest tag

Pinterest Tag

Enhanced match +Create a conversion tag, also known as Pinterest tag, with the option to enable enhanced match.

The Pinterest Tag tracks actions people take on the ad account’ s website after they view the ad account's ad on Pinterest. The advertiser needs to customize this tag to track conversions.

For more information, see:

Set up the Pinterest tag

Pinterest Tag

Enhanced match ### Example @@ -365,6 +365,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import conversion_tags_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.conversion_event_response import ConversionEventResponse from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -389,7 +390,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = conversion_tags_api.ConversionTagsApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) @@ -417,7 +418,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ad_account_id** | **str**| Unique identifier of an ad account. | - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] diff --git a/docs/CountryFilter.md b/docs/CountryFilter.md new file mode 100644 index 0000000..8928aa6 --- /dev/null +++ b/docs/CountryFilter.md @@ -0,0 +1,11 @@ +# CountryFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | **CatalogsProductGroupMultipleCountriesCriteria** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAssetAccessRequestBody.md b/docs/CreateAssetAccessRequestBody.md new file mode 100644 index 0000000..b1b3027 --- /dev/null +++ b/docs/CreateAssetAccessRequestBody.md @@ -0,0 +1,13 @@ +# CreateAssetAccessRequestBody + +An object containing a list of all the asset access requests + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_requests** | [**[CreateAssetAccessRequestBodyAssetRequests]**](CreateAssetAccessRequestBodyAssetRequests.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAssetAccessRequestBodyAssetRequests.md b/docs/CreateAssetAccessRequestBodyAssetRequests.md new file mode 100644 index 0000000..f804468 --- /dev/null +++ b/docs/CreateAssetAccessRequestBodyAssetRequests.md @@ -0,0 +1,13 @@ +# CreateAssetAccessRequestBodyAssetRequests + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**partner_id** | **str** | Unique identifier of a business partner to request asset access to. | +**asset_id_to_permissions** | [**AssetIdToPermissions**](AssetIdToPermissions.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAssetAccessRequestErrorMessage.md b/docs/CreateAssetAccessRequestErrorMessage.md new file mode 100644 index 0000000..7872836 --- /dev/null +++ b/docs/CreateAssetAccessRequestErrorMessage.md @@ -0,0 +1,12 @@ +# CreateAssetAccessRequestErrorMessage + +A list of errors associated with the asset access requests. Will be returned if there is an error. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type** | A list of errors associated with the asset access requests. Will be returned if there is an error. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAssetAccessRequestResponse.md b/docs/CreateAssetAccessRequestResponse.md new file mode 100644 index 0000000..aafbe05 --- /dev/null +++ b/docs/CreateAssetAccessRequestResponse.md @@ -0,0 +1,13 @@ +# CreateAssetAccessRequestResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exceptions** | [**CreateAssetAccessRequestErrorMessage**](CreateAssetAccessRequestErrorMessage.md) | | [optional] +**invites** | **{str: (str,)}, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAssetGroupBody.md b/docs/CreateAssetGroupBody.md new file mode 100644 index 0000000..a340d3b --- /dev/null +++ b/docs/CreateAssetGroupBody.md @@ -0,0 +1,14 @@ +# CreateAssetGroupBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_group_name** | **str** | Asset Group name | +**asset_group_description** | **str** | Asset group description | +**asset_group_types** | [**AssetGroupTypes**](AssetGroupTypes.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAssetGroupResponse.md b/docs/CreateAssetGroupResponse.md new file mode 100644 index 0000000..3cd5271 --- /dev/null +++ b/docs/CreateAssetGroupResponse.md @@ -0,0 +1,12 @@ +# CreateAssetGroupResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_group** | [**AssetGroupBinding**](AssetGroupBinding.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAssetInvitesRequest.md b/docs/CreateAssetInvitesRequest.md new file mode 100644 index 0000000..9b221a5 --- /dev/null +++ b/docs/CreateAssetInvitesRequest.md @@ -0,0 +1,13 @@ +# CreateAssetInvitesRequest + +Request body for updating asset roles for existing invites. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invites** | [**[CreateAssetInvitesRequestItem]**](CreateAssetInvitesRequestItem.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAssetInvitesRequestItem.md b/docs/CreateAssetInvitesRequestItem.md new file mode 100644 index 0000000..85d8aec --- /dev/null +++ b/docs/CreateAssetInvitesRequestItem.md @@ -0,0 +1,15 @@ +# CreateAssetInvitesRequestItem + +Object declaring an asset role update to an invite. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_id** | **str** | Unique identifier of an invite. | +**invite_type** | [**InviteType**](InviteType.md) | | +**asset_id_to_permissions** | [**AssetIdToPermissions**](AssetIdToPermissions.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateInvitesResultsResponseArray.md b/docs/CreateInvitesResultsResponseArray.md new file mode 100644 index 0000000..2949eed --- /dev/null +++ b/docs/CreateInvitesResultsResponseArray.md @@ -0,0 +1,12 @@ +# CreateInvitesResultsResponseArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[CreateInvitesResultsResponseArrayItems]**](CreateInvitesResultsResponseArrayItems.md) | List of invite/request creation status. If there is an error, an exception object will be returned. If the action was successfully completed, an invite object will be returned. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateInvitesResultsResponseArrayInvite.md b/docs/CreateInvitesResultsResponseArrayInvite.md new file mode 100644 index 0000000..6736219 --- /dev/null +++ b/docs/CreateInvitesResultsResponseArrayInvite.md @@ -0,0 +1,14 @@ +# CreateInvitesResultsResponseArrayInvite + +An invite object if the invite/request was successfully created. Will only be provided if the an invite/request is successfully created. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the invite/request. | [optional] +**user** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Metadata for the member/partner that was sent the invite/request. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateInvitesResultsResponseArrayItems.md b/docs/CreateInvitesResultsResponseArrayItems.md new file mode 100644 index 0000000..7814944 --- /dev/null +++ b/docs/CreateInvitesResultsResponseArrayItems.md @@ -0,0 +1,13 @@ +# CreateInvitesResultsResponseArrayItems + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exception** | [**InviteExceptionResponse**](InviteExceptionResponse.md) | | [optional] +**invite** | [**CreateInvitesResultsResponseArrayInvite**](CreateInvitesResultsResponseArrayInvite.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateMMMReportRequest.md b/docs/CreateMMMReportRequest.md index daaf0eb..1e589c7 100644 --- a/docs/CreateMMMReportRequest.md +++ b/docs/CreateMMMReportRequest.md @@ -9,10 +9,9 @@ Name | Type | Description | Notes **end_date** | **str** | Metric report end date (UTC). Format: YYYY-MM-DD | **granularity** | **str** | DAY - metrics are broken down daily.<br> WEEK - metrics are broken down weekly. | **level** | **str** | Level of the report | -**targeting_types** | **[str]** | List of targeting types | -**columns** | **[str]** | Metric and entity columns | -**custom_column_ids** | [**[Items]**](Items.md) | List of custom column ids | [optional] -**countries** | **[str, none_type]** | A List of country for filtering | [optional] +**targeting_types** | [**[MMMReportingTargetingType]**](MMMReportingTargetingType.md) | List of targeting types | +**columns** | [**[MMMReportingColumn]**](MMMReportingColumn.md) | Metric and entity columns | +**countries** | [**[TargetingAdvertiserCountry]**](TargetingAdvertiserCountry.md) | A List of countries for filtering | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateMMMReportRequestAllOf.md b/docs/CreateMMMReportRequestAllOf.md index 9841d79..0d84b40 100644 --- a/docs/CreateMMMReportRequestAllOf.md +++ b/docs/CreateMMMReportRequestAllOf.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**countries** | **[str, none_type]** | A List of country for filtering | [optional] +**countries** | [**[TargetingAdvertiserCountry]**](TargetingAdvertiserCountry.md) | A List of countries for filtering | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateMembershipOrPartnershipInvitesBody.md b/docs/CreateMembershipOrPartnershipInvitesBody.md new file mode 100644 index 0000000..f180d50 --- /dev/null +++ b/docs/CreateMembershipOrPartnershipInvitesBody.md @@ -0,0 +1,16 @@ +# CreateMembershipOrPartnershipInvitesBody + +Body to be used on path to send Members or Partners Invite or Request + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**business_role** | **str** | The business access level to grant member/partner. Note, values are case-sensitive. - EMPLOYEE: Can only view and access assets you assign them to. They cannot see details about other employees, partners, or other assets. - BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access. - PARTNER: Can only view and access assets you assign them to/or they assign to you. | +**invite_type** | [**InviteType**](InviteType.md) | | +**members** | **[str]** | A list of usernames, emails, or a mix of them. Should be used if invite_type is MEMBER_INVITE | [optional] +**partners** | **[str]** | A list of partner_id. Should be used if invite_type is PARTNER_INVITE or PARTNER_REQUEST | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreativeAssetsIdFilter.md b/docs/CreativeAssetsIdFilter.md new file mode 100644 index 0000000..378c175 --- /dev/null +++ b/docs/CreativeAssetsIdFilter.md @@ -0,0 +1,11 @@ +# CreativeAssetsIdFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_assets_id** | **CatalogsProductGroupMultipleStringCriteria** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreativeAssetsProcessingRecord.md b/docs/CreativeAssetsProcessingRecord.md new file mode 100644 index 0000000..4a2d234 --- /dev/null +++ b/docs/CreativeAssetsProcessingRecord.md @@ -0,0 +1,16 @@ +# CreativeAssetsProcessingRecord + +Object describing an item processing record + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_assets_id** | **str** | The catalog creative assets id in the merchant namespace | [optional] +**errors** | [**[ItemValidationEvent]**](ItemValidationEvent.md) | Array with the validation errors for the item processing record. A non empty errors list causes the item processing to fail. | [optional] +**warnings** | [**[ItemValidationEvent]**](ItemValidationEvent.md) | Array with the validation warnings for the item processing record | [optional] +**status** | [**ItemProcessingStatus**](ItemProcessingStatus.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreativeAssetsVisibilityType.md b/docs/CreativeAssetsVisibilityType.md new file mode 100644 index 0000000..069560e --- /dev/null +++ b/docs/CreativeAssetsVisibilityType.md @@ -0,0 +1,12 @@ +# CreativeAssetsVisibilityType + +Creative assets visibility. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Creative assets visibility. | must be one of ["VISIBLE", "HIDDEN", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreativeType.md b/docs/CreativeType.md index d747508..ef78b7d 100644 --- a/docs/CreativeType.md +++ b/docs/CreativeType.md @@ -1,11 +1,11 @@ # CreativeType -Ad creative type enum.

Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead. +Ad creative type enum. For update, only draft ads may update creative type.

Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Ad creative type enum. </p><strong>Note:</strong> SHOP_THE_PIN has been deprecated. Please use COLLECTION instead. | must be one of ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "COLLECTION", "IDEA", "SHOWCASE", "QUIZ", ] +**value** | **str** | Ad creative type enum. For update, only draft ads may update creative type. </p><strong>Note:</strong> SHOP_THE_PIN has been deprecated. Please use COLLECTION instead. | must be one of ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "COLLECTION", "IDEA", "SHOWCASE", "QUIZ", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Currency.md b/docs/Currency.md index 9a0a8d8..3199b17 100644 --- a/docs/Currency.md +++ b/docs/Currency.md @@ -5,7 +5,7 @@ Currency Codes from ISO 4217 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Currency Codes from ISO 4217 | must be one of ["UNK", "USD", "GBP", "CAD", "EUR", "AUD", "NZD", "SEK", "ILS", "CHF", "HKD", "JPY", "SGD", "KRW", "NOK", "DKK", "PLN", "RON", "HUF", "CZK", "BRL", "MXN", "ARS", "CLP", "COP", ] +**value** | **str** | Currency Codes from ISO 4217 | must be one of ["UNK", "USD", "GBP", "CAD", "EUR", "AUD", "NZD", "SEK", "ILS", "CHF", "HKD", "JPY", "SGD", "KRW", "NOK", "DKK", "PLN", "RON", "HUF", "CZK", "BRL", "MXN", "ARS", "CLP", "COP", "INR", "TRY", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerListsApi.md b/docs/CustomerListsApi.md index 223d62f..192f175 100644 --- a/docs/CustomerListsApi.md +++ b/docs/CustomerListsApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description Create customer lists -

Create a customer list from your records(hashed or plain-text email addresses, or hashed MAIDs or IDFAs).

A customer list is one of the four types of Pinterest audiences: for more information, see Audience targeting or the Audiences section of the ads management guide.

Please review our requirements for what type of information is allowed when uploading a customer list.

When you create a customer list, the system scans the list for existing Pinterest accounts; the list must include at least 100 Pinterest accounts. Your original list will be deleted when the matching process is complete. The filtered list – containing only the Pinterest accounts that were included in your starting list – is what will be used to create the audience.

Note that once you have created your customer list, you must convert it into an audience (of the “ CUSTOMER_LIST” type) using the create audience endpoint before it can be used.

+

Create a customer list from your records(hashed or plain-text email addresses, or hashed MAIDs or IDFAs).

A customer list is one of the four types of Pinterest audiences: for more information, see Audience targeting or the Audiences section of the ads management guide.

Please review our requirements for what type of information is allowed when uploading a customer list.

When you create a customer list, the system scans the list for existing Pinterest accounts; the list must include at least 100 Pinterest accounts. Your original list will be deleted when the matching process is complete. The filtered list – containing only the Pinterest accounts that were included in your starting list – is what will be used to create the audience.

Note that once you have created your customer list, you must convert it into an audience (of the “ CUSTOMER_LIST” type) using the create audience endpoint before it can be used.

### Example @@ -185,7 +185,7 @@ Name | Type | Description | Notes Get customer lists -

Get a set of customer lists including id and name based on the filters provided.

(Customer lists are a type of audience.) For more information, see Audience targeting or the Audiences section of the ads management guide.

+

Get a set of customer lists including id and name based on the filters provided.

(Customer lists are a type of audience.) For more information, see Audience targeting or the Audiences section of the ads management guide.

### Example @@ -195,6 +195,7 @@ Get customer lists import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import customer_lists_api +from openapi_generated.pinterest_client.model.customer_list import CustomerList from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint @@ -220,7 +221,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = customer_lists_api.CustomerListsApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) @@ -248,7 +249,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ad_account_id** | **str**| Unique identifier of an ad account. | - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] @@ -280,7 +281,7 @@ Name | Type | Description | Notes Update customer list -

Append or remove records to/from an existing customer list. (A customer list is one of the four types of Pinterest audiences.)

When you add records to an existing customer list, the system scans the additions for existing Pinterest accounts; those are the records that will be added to your “CUSTOMER_LIST” audience. Your original list of records to add will be deleted when the matching process is complete.

For more information, see Audience targeting or the Audiences section of the ads management guide.

+

Append or remove records to/from an existing customer list. (A customer list is one of the four types of Pinterest audiences.)

When you add records to an existing customer list, the system scans the additions for existing Pinterest accounts; those are the records that will be added to your “CUSTOMER_LIST” audience. Your original list of records to add will be deleted when the matching process is complete.

For more information, see Audience targeting or the Audiences section of the ads management guide.

### Example diff --git a/docs/DeleteAssetGroupBody.md b/docs/DeleteAssetGroupBody.md new file mode 100644 index 0000000..1c85955 --- /dev/null +++ b/docs/DeleteAssetGroupBody.md @@ -0,0 +1,13 @@ +# DeleteAssetGroupBody + +Request body used to delete asset groups + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_groups_to_delete** | **[str]** | List of ids of asset groups to be deleted | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteAssetGroupResponse.md b/docs/DeleteAssetGroupResponse.md new file mode 100644 index 0000000..10d1be1 --- /dev/null +++ b/docs/DeleteAssetGroupResponse.md @@ -0,0 +1,13 @@ +# DeleteAssetGroupResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deleted_asset_groups** | **[str]** | A list of ids of successfully deleted asset groups. | [optional] +**exceptions** | [**[DeleteAssetGroupResponseExceptions], none_type**](DeleteAssetGroupResponseExceptions.md) | A list of errors associated with the asset groups. Will be returned if there is an error. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteAssetGroupResponseExceptions.md b/docs/DeleteAssetGroupResponseExceptions.md new file mode 100644 index 0000000..7c865be --- /dev/null +++ b/docs/DeleteAssetGroupResponseExceptions.md @@ -0,0 +1,14 @@ +# DeleteAssetGroupResponseExceptions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Error code associated with the error deleting asset group. | [optional] +**message** | **str** | Error message associated with the error deleting asset group. | [optional] +**asset_group_id** | **str** | Asset group id of the exception. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteInvitesResultsResponseArray.md b/docs/DeleteInvitesResultsResponseArray.md new file mode 100644 index 0000000..4c04ed9 --- /dev/null +++ b/docs/DeleteInvitesResultsResponseArray.md @@ -0,0 +1,13 @@ +# DeleteInvitesResultsResponseArray + +Response to delete invites sent to Members or Partners, if there is an exception, return the exception mapped with the invite id + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[DeleteInvitesResultsResponseArrayItems]**](DeleteInvitesResultsResponseArrayItems.md) | List of invite/Request deletion status. If there is an error, an exception object will be returned. If the invite/request was successfully cancelled, an invite object will be returned for the invite that was cancelled. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteInvitesResultsResponseArrayException.md b/docs/DeleteInvitesResultsResponseArrayException.md new file mode 100644 index 0000000..38396f9 --- /dev/null +++ b/docs/DeleteInvitesResultsResponseArrayException.md @@ -0,0 +1,14 @@ +# DeleteInvitesResultsResponseArrayException + +An exception object if there is an error performing the cancellation. It will only be provided if there is an error. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_id** | **str** | Unique identifier of an invite. | [optional] +**message** | **str** | Error message associated with the error in performing the action on the invite/request. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteInvitesResultsResponseArrayItems.md b/docs/DeleteInvitesResultsResponseArrayItems.md new file mode 100644 index 0000000..c6b5531 --- /dev/null +++ b/docs/DeleteInvitesResultsResponseArrayItems.md @@ -0,0 +1,13 @@ +# DeleteInvitesResultsResponseArrayItems + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exception** | [**DeleteInvitesResultsResponseArrayException**](DeleteInvitesResultsResponseArrayException.md) | | [optional] +**invite** | [**BaseInviteDataResponse**](BaseInviteDataResponse.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteMemberAccessResult.md b/docs/DeleteMemberAccessResult.md new file mode 100644 index 0000000..0233fae --- /dev/null +++ b/docs/DeleteMemberAccessResult.md @@ -0,0 +1,14 @@ +# DeleteMemberAccessResult + +The terminated asset access. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_id** | **str** | Unique identifier of the business asset. | [optional] +**member_id** | **str** | Unique identifier of the business member. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteMemberAccessResultsResponseArray.md b/docs/DeleteMemberAccessResultsResponseArray.md new file mode 100644 index 0000000..d990e8c --- /dev/null +++ b/docs/DeleteMemberAccessResultsResponseArray.md @@ -0,0 +1,12 @@ +# DeleteMemberAccessResultsResponseArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[DeleteMemberAccessResult]**](DeleteMemberAccessResult.md) | List of member asset permissions that were deleted. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeletePartnerAssetAccessBody.md b/docs/DeletePartnerAssetAccessBody.md new file mode 100644 index 0000000..dd9723a --- /dev/null +++ b/docs/DeletePartnerAssetAccessBody.md @@ -0,0 +1,12 @@ +# DeletePartnerAssetAccessBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accesses** | [**[DeletePartnerAssetAccessBodyAccesses]**](DeletePartnerAssetAccessBodyAccesses.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeletePartnerAssetAccessBodyAccesses.md b/docs/DeletePartnerAssetAccessBodyAccesses.md new file mode 100644 index 0000000..efd27f4 --- /dev/null +++ b/docs/DeletePartnerAssetAccessBodyAccesses.md @@ -0,0 +1,14 @@ +# DeletePartnerAssetAccessBodyAccesses + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**partner_id** | **str** | Unique identifier of a business partner to update asset access to. | +**asset_id** | **str** | Unique identifier of the business asset. | +**partner_type** | **str** | If partner_type=INTERNAL, the deleted asset access is for the access the partner has to your business asset.<br> If partner_type=EXTERNAL, the deleted asset access is for the access you have to the partner's business asset. | [optional] if omitted the server will use the default value of "INTERNAL" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeletePartnerAssetsResult.md b/docs/DeletePartnerAssetsResult.md new file mode 100644 index 0000000..193189c --- /dev/null +++ b/docs/DeletePartnerAssetsResult.md @@ -0,0 +1,17 @@ +# DeletePartnerAssetsResult + +The terminated asset access. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_id** | **str** | Unique identifier of a business asset. | [optional] +**asset_type** | **str** | Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP. | [optional] +**permissions** | [**PermissionsResponse**](PermissionsResponse.md) | | [optional] +**is_shared_partner** | **bool** | If is_shared_partner=FALSE, you terminated a partner's asset access to your business asset.<br> If is_shared_partner=TRUE, you terminated your asset access to your partner's business asset. | [optional] +**partner_id** | **str** | Unique identifier of a business partner. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeletePartnerAssetsResultsResponseArray.md b/docs/DeletePartnerAssetsResultsResponseArray.md new file mode 100644 index 0000000..cca32d1 --- /dev/null +++ b/docs/DeletePartnerAssetsResultsResponseArray.md @@ -0,0 +1,12 @@ +# DeletePartnerAssetsResultsResponseArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[DeletePartnerAssetsResult]**](DeletePartnerAssetsResult.md) | List of terminated asset access. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeletePartnersRequest.md b/docs/DeletePartnersRequest.md new file mode 100644 index 0000000..c375060 --- /dev/null +++ b/docs/DeletePartnersRequest.md @@ -0,0 +1,13 @@ +# DeletePartnersRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**partner_ids** | **[str]** | | +**partner_type** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeletePartnersResponse.md b/docs/DeletePartnersResponse.md new file mode 100644 index 0000000..cc2e13f --- /dev/null +++ b/docs/DeletePartnersResponse.md @@ -0,0 +1,13 @@ +# DeletePartnersResponse + +An object with a list of partners that were deleted. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deleted_partners** | **[str]** | List of partners whose business partnership have been terminated. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeletedMembersResponse.md b/docs/DeletedMembersResponse.md new file mode 100644 index 0000000..4c5fa4d --- /dev/null +++ b/docs/DeletedMembersResponse.md @@ -0,0 +1,13 @@ +# DeletedMembersResponse + +An object with a list of members that were deleted. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deleted_members** | **[str]** | List of members whose business membership have been terminated. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DetailedError.md b/docs/DetailedError.md new file mode 100644 index 0000000..fb57a0d --- /dev/null +++ b/docs/DetailedError.md @@ -0,0 +1,15 @@ +# DetailedError + +Used for including extra details to a base error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**message** | **str** | | +**details** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntityStatus.md b/docs/EntityStatus.md index d3a21e7..dcac283 100644 --- a/docs/EntityStatus.md +++ b/docs/EntityStatus.md @@ -5,7 +5,7 @@ Entity status ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Entity status | must be one of ["ACTIVE", "PAUSED", "ARCHIVED", ] +**value** | **str** | Entity status | must be one of ["ACTIVE", "PAUSED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FeedFields.md b/docs/FeedFields.md index 012b281..8129282 100644 --- a/docs/FeedFields.md +++ b/docs/FeedFields.md @@ -4,16 +4,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**default_country** | [**Country**](Country.md) | | -**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | -**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | **name** | **str, none_type** | A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. | **format** | [**CatalogsFormat**](CatalogsFormat.md) | | -**default_locale** | **str** | The locale used within a feed for product descriptions. | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | **credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | **location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | **preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | **status** | [**CatalogsStatus**](CatalogsStatus.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | +**default_locale** | **str** | The locale used within a feed for product descriptions. | +**default_country** | [**Country**](Country.md) | | +**catalog_id** | **str, none_type** | Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FeedFields1.md b/docs/FeedFields1.md new file mode 100644 index 0000000..f34cf91 --- /dev/null +++ b/docs/FeedFields1.md @@ -0,0 +1,21 @@ +# FeedFields1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str, none_type** | A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. | +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | +**status** | [**CatalogsStatus**](CatalogsStatus.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | +**default_locale** | **str** | The locale used within a feed for product descriptions. | +**catalog_id** | **str, none_type** | Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FeedFields2.md b/docs/FeedFields2.md new file mode 100644 index 0000000..dee79ac --- /dev/null +++ b/docs/FeedFields2.md @@ -0,0 +1,22 @@ +# FeedFields2 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str, none_type** | A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. | +**format** | [**CatalogsFormat**](CatalogsFormat.md) | | +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | +**credentials** | [**CatalogsFeedCredentials**](CatalogsFeedCredentials.md) | | +**location** | **str** | The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. | +**preferred_processing_schedule** | [**CatalogsFeedProcessingSchedule**](CatalogsFeedProcessingSchedule.md) | | +**status** | [**CatalogsStatus**](CatalogsStatus.md) | | +**default_currency** | [**NullableCurrency**](NullableCurrency.md) | | +**default_locale** | **str** | The locale used within a feed for product descriptions. | +**default_country** | [**Country**](Country.md) | | +**default_availability** | [**ProductAvailabilityType**](ProductAvailabilityType.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetBusinessAssetTypeResponse.md b/docs/GetBusinessAssetTypeResponse.md new file mode 100644 index 0000000..59c7bfc --- /dev/null +++ b/docs/GetBusinessAssetTypeResponse.md @@ -0,0 +1,12 @@ +# GetBusinessAssetTypeResponse + +Type of asset. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Type of asset. | must be one of ["AD_ACCOUNT", "PROFILE", "ASSET_GROUP", "CONVERSION_TAG", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetBusinessAssetsResponse.md b/docs/GetBusinessAssetsResponse.md new file mode 100644 index 0000000..bed0de9 --- /dev/null +++ b/docs/GetBusinessAssetsResponse.md @@ -0,0 +1,15 @@ +# GetBusinessAssetsResponse + +An object containing the permissions a business has on the asset. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_id** | **str** | Unique identifier of a business asset. | [optional] +**asset_type** | **str** | Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP. | [optional] +**asset_group_info** | [**AssetGroupBinding**](AssetGroupBinding.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetPartnerAssetsResponse.md b/docs/GetPartnerAssetsResponse.md new file mode 100644 index 0000000..5fe2e18 --- /dev/null +++ b/docs/GetPartnerAssetsResponse.md @@ -0,0 +1,16 @@ +# GetPartnerAssetsResponse + +An object containing the permissions a you/your business partner has on the asset. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_id** | **str** | Unique identifier of a business asset. | [optional] +**asset_type** | **str** | Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP. | [optional] +**permissions** | **[str]** | The permissions you or your partner has on the asset. If partner_type=INTERNAL, the permission levels are for the access the partner has to your business asset.<br> If partner_type=EXTERNAL, the permission levels are for the access you have to the partner's business asset. | [optional] +**asset_group_info** | [**AssetGroupBinding**](AssetGroupBinding.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GridClickType.md b/docs/GridClickType.md new file mode 100644 index 0000000..95ffa40 --- /dev/null +++ b/docs/GridClickType.md @@ -0,0 +1,12 @@ +# GridClickType + +Where a user is taken after clicking on an ad in grid.

Note: This parameter is read-only and is set to DIRECT_TO_DESTINATION by default for direct links supported ads. grid_click_type values provided will be ignored. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Where a user is taken after clicking on an ad in grid. </p><strong>Note:</strong> This parameter is read-only and is set to DIRECT_TO_DESTINATION by default for direct links supported ads. grid_click_type values provided will be ignored. | must be one of ["CLOSEUP", "DIRECT_TO_DESTINATION", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HotelIdFilter.md b/docs/HotelIdFilter.md new file mode 100644 index 0000000..208811d --- /dev/null +++ b/docs/HotelIdFilter.md @@ -0,0 +1,11 @@ +# HotelIdFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hotel_id** | **CatalogsProductGroupMultipleStringCriteria** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HotelProcessingRecord.md b/docs/HotelProcessingRecord.md new file mode 100644 index 0000000..8cc88ad --- /dev/null +++ b/docs/HotelProcessingRecord.md @@ -0,0 +1,16 @@ +# HotelProcessingRecord + +Object describing an item processing record + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hotel_id** | **str** | The catalog hotel id in the merchant namespace | [optional] +**errors** | [**[ItemValidationEvent]**](ItemValidationEvent.md) | Array with the validation errors for the item processing record. A non empty errors list causes the item processing to fail. | [optional] +**warnings** | [**[ItemValidationEvent]**](ItemValidationEvent.md) | Array with the validation warnings for the item processing record | [optional] +**status** | [**ItemProcessingStatus**](ItemProcessingStatus.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageMetadata.md b/docs/ImageMetadata.md index d244d85..9be42f9 100644 --- a/docs/ImageMetadata.md +++ b/docs/ImageMetadata.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **title** | **str, none_type** | | [optional] **description** | **str, none_type** | | [optional] **link** | **str, none_type** | | [optional] -**images** | [**{str: (ImageDetails,)}**](ImageDetails.md) | | [optional] +**images** | [**ImageMetadataImages**](ImageMetadataImages.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ImageMetadataImages.md b/docs/ImageMetadataImages.md new file mode 100644 index 0000000..a335372 --- /dev/null +++ b/docs/ImageMetadataImages.md @@ -0,0 +1,15 @@ +# ImageMetadataImages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_150x150** | **ImageDetails** | | [optional] +**_400x300** | **ImageDetails** | | [optional] +**_600x** | **ImageDetails** | | [optional] +**_1200x** | **ImageDetails** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineObject.md b/docs/InlineObject.md index 4a26811..a4a7037 100644 --- a/docs/InlineObject.md +++ b/docs/InlineObject.md @@ -4,8 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**board_id** | **str** | Unique identifier of the board to which the pin will be saved. | [optional] -**board_section_id** | **str, none_type** | Unique identifier of the board section to which the pin will be saved. | [optional] +**accesses** | [**[BusinessesBusinessIdMembersAssetsAccessAccesses]**](BusinessesBusinessIdMembersAssetsAccessAccesses.md) | List of members asset access to be deleted | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineObject1.md b/docs/InlineObject1.md new file mode 100644 index 0000000..0a75346 --- /dev/null +++ b/docs/InlineObject1.md @@ -0,0 +1,13 @@ +# InlineObject1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**board_id** | **str, none_type** | Unique identifier of the board to which the pin will be saved. | [optional] +**board_section_id** | **str, none_type** | Unique identifier of the board section to which the pin will be saved. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationLog.md b/docs/IntegrationLog.md new file mode 100644 index 0000000..bf745b3 --- /dev/null +++ b/docs/IntegrationLog.md @@ -0,0 +1,24 @@ +# IntegrationLog + +Schema for log sent from an integration application. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_timestamp** | **int** | Timestamp in milliseconds of when the log was executed at the client. | +**event_type** | **str** | Log event type | +**log_level** | **str** | Log level type | +**external_business_id** | **str, none_type** | | [optional] +**advertiser_id** | **str, none_type** | | [optional] +**merchant_id** | **str, none_type** | | [optional] +**tag_id** | **str, none_type** | | [optional] +**feed_profile_id** | **str, none_type** | | [optional] +**message** | **str** | Explanation of the event that occured. | [optional] +**app_version_number** | **str** | Version number of the integration application. | [optional] +**platform_version_number** | **str** | Version number of the platform the integration application is running on. | [optional] +**error** | [**IntegrationLogClientError**](IntegrationLogClientError.md) | | [optional] +**request** | [**IntegrationLogClientRequest**](IntegrationLogClientRequest.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationLogClientError.md b/docs/IntegrationLogClientError.md new file mode 100644 index 0000000..99d05b0 --- /dev/null +++ b/docs/IntegrationLogClientError.md @@ -0,0 +1,20 @@ +# IntegrationLogClientError + +System error details included in the log sent by the client. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cause** | **str** | Original cause of the error. | [optional] +**column_number** | **int** | Column number in the line of the file that raised the error. | [optional] +**file_name** | **str** | Filename where the error happened. | [optional] +**line_number** | **int** | Line number where the error happened. | [optional] +**message** | **str** | Human-readable description of the error. | [optional] +**message_detail** | **str** | More detail about the message. | [optional] +**name** | **str** | Filename where the error happened. | [optional] +**number** | **int** | Integer that specifies the error code. | [optional] +**stack_trace** | **str** | Stack trace of where the error happened. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationLogClientRequest.md b/docs/IntegrationLogClientRequest.md new file mode 100644 index 0000000..9f29454 --- /dev/null +++ b/docs/IntegrationLogClientRequest.md @@ -0,0 +1,17 @@ +# IntegrationLogClientRequest + +HTTP request details included in the log sent by the client. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | **str** | | +**host** | **str** | HTTP request host from host header. | +**path** | **str** | HTTP request path. | +**request_headers** | **{str: (str,)}** | HTTP request headers as key-value pairs. | [optional] +**response_headers** | **{str: (str,)}** | HTTP response headers as key-value pairs. | [optional] +**response_status_code** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationLogsInvalidLogResponse.md b/docs/IntegrationLogsInvalidLogResponse.md new file mode 100644 index 0000000..b621cba --- /dev/null +++ b/docs/IntegrationLogsInvalidLogResponse.md @@ -0,0 +1,13 @@ +# IntegrationLogsInvalidLogResponse + +Schema describing the response when a log has invalid fields. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rejected_logs** | [**[IntegrationLogsInvalidLogResponseRejectedLogs]**](IntegrationLogsInvalidLogResponseRejectedLogs.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationLogsInvalidLogResponseRejectedLogs.md b/docs/IntegrationLogsInvalidLogResponseRejectedLogs.md new file mode 100644 index 0000000..619d5e2 --- /dev/null +++ b/docs/IntegrationLogsInvalidLogResponseRejectedLogs.md @@ -0,0 +1,15 @@ +# IntegrationLogsInvalidLogResponseRejectedLogs + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **str** | The field name containing an invalid value. | +**value** | **str** | The value that is invalid. | +**reason** | **str** | The reason the value is invalid. | +**log_index** | **int** | Index of the log in the batch. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationLogsRequest.md b/docs/IntegrationLogsRequest.md new file mode 100644 index 0000000..dc46fd4 --- /dev/null +++ b/docs/IntegrationLogsRequest.md @@ -0,0 +1,12 @@ +# IntegrationLogsRequest + +Batch of logs sent from an integration application. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**logs** | [**[IntegrationLog]**](IntegrationLog.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationLogsSuccessResponse.md b/docs/IntegrationLogsSuccessResponse.md new file mode 100644 index 0000000..25cfa1b --- /dev/null +++ b/docs/IntegrationLogsSuccessResponse.md @@ -0,0 +1,13 @@ +# IntegrationLogsSuccessResponse + +Response when logs are successfully processed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationRequest.md b/docs/IntegrationRequest.md index d7241ae..e3e5403 100644 --- a/docs/IntegrationRequest.md +++ b/docs/IntegrationRequest.md @@ -13,8 +13,8 @@ Name | Type | Description | Notes **partner_access_token** | **str** | | [optional] **partner_refresh_token** | **str** | | [optional] **partner_primary_email** | **str** | | [optional] -**partner_access_token_expiry** | **float** | | [optional] -**partner_refresh_token_expiry** | **float** | | [optional] +**partner_access_token_expiry** | **int** | | [optional] +**partner_refresh_token_expiry** | **int** | | [optional] **scopes** | **str** | | [optional] **additional_id_1** | **str** | | [optional] **partner_metadata** | **str** | | [optional] diff --git a/docs/IntegrationsApi.md b/docs/IntegrationsApi.md index 180ef91..cc0186c 100644 --- a/docs/IntegrationsApi.md +++ b/docs/IntegrationsApi.md @@ -10,6 +10,7 @@ Method | HTTP request | Description [**integrations_commerce_post**](IntegrationsApi.md#integrations_commerce_post) | **POST** /integrations/commerce | Create commerce integration [**integrations_get_by_id**](IntegrationsApi.md#integrations_get_by_id) | **GET** /integrations/{id} | Get integration metadata [**integrations_get_list**](IntegrationsApi.md#integrations_get_list) | **GET** /integrations | Get integration metadata list +[**integrations_logs_post**](IntegrationsApi.md#integrations_logs_post) | **POST** /integrations/logs | Receives batched logs from integration applications. # **integrations_commerce_del** @@ -17,7 +18,7 @@ Method | HTTP request | Description Delete commerce integration -Delete commerce integration metadata for the given external business ID. +Delete commerce integration metadata for the given external business ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. ### Example @@ -95,7 +96,7 @@ void (empty response body) Get commerce integration -Get commerce integration metadata associated with the given external business ID +Get commerce integration metadata associated with the given external business ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. ### Example @@ -177,7 +178,7 @@ Name | Type | Description | Notes Update commerce integration -Update commerce integration metadata for the given external business ID +Update commerce integration metadata for the given external business ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. ### Example @@ -284,7 +285,7 @@ Name | Type | Description | Notes Create commerce integration -Create commerce integration metadata to link an external business ID with a Pinterest merchant & ad account. +Create commerce integration metadata to link an external business ID with a Pinterest merchant & ad account. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. ### Example @@ -328,8 +329,8 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: partner_access_token="partner_access_token_example", partner_refresh_token="partner_refresh_token_example", partner_primary_email="partner_primary_email_example", - partner_access_token_expiry=3.14, - partner_refresh_token_expiry=3.14, + partner_access_token_expiry=1, + partner_refresh_token_expiry=1, scopes="scopes_example", additional_id_1="additional_id_1_example", partner_metadata="partner_metadata_example", @@ -382,7 +383,7 @@ Name | Type | Description | Notes Get integration metadata -Get integration metadata by ID. +Get integration metadata by ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. ### Example @@ -463,7 +464,7 @@ Name | Type | Description | Notes Get integration metadata list -Get integration metadata list. +Get integration metadata list. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. ### Example @@ -475,6 +476,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import integrations_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.integration_record import IntegrationRecord from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -498,7 +500,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = integrations_api.IntegrationsApi(api_client) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set # and optional values @@ -516,7 +518,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 ### Return type @@ -541,3 +543,125 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **integrations_logs_post** +> IntegrationLogsSuccessResponse integrations_logs_post(integration_logs_request) + +Receives batched logs from integration applications. + +This endpoint receives batched logs from integration applications on partner platforms. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import integrations_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.integration_logs_success_response import IntegrationLogsSuccessResponse +from openapi_generated.pinterest_client.model.detailed_error import DetailedError +from openapi_generated.pinterest_client.model.integration_logs_request import IntegrationLogsRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = integrations_api.IntegrationsApi(api_client) + integration_logs_request = IntegrationLogsRequest( + logs=[ + IntegrationLog( + client_timestamp=1, + event_type="APP", + log_level="INFO", + external_business_id="external_business_id_example", + advertiser_id="advertiser_id_example", + merchant_id="merchant_id_example", + tag_id="tag_id_example", + feed_profile_id="feed_profile_id_example", + message="message_example", + app_version_number="app_version_number_example", + platform_version_number="platform_version_number_example", + error=IntegrationLogClientError( + cause="cause_example", + column_number=1, + file_name="file_name_example", + line_number=1, + message="message_example", + message_detail="message_detail_example", + name="name_example", + number=1, + stack_trace="stack_trace_example", + ), + request=IntegrationLogClientRequest( + method="GET", + host="host_example", + path="path_example", + request_headers={ + "key": "key_example", + }, + response_headers={ + "key": "key_example", + }, + response_status_code=1, + ), + ), + ], + ) # IntegrationLogsRequest | Ingest log information from external integration application. + + # example passing only required values which don't have defaults set + try: + # Receives batched logs from integration applications. + api_response = api_instance.integrations_logs_post(integration_logs_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling IntegrationsApi->integrations_logs_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integration_logs_request** | [**IntegrationLogsRequest**](IntegrationLogsRequest.md)| Ingest log information from external integration application. | + +### Return type + +[**IntegrationLogsSuccessResponse**](IntegrationLogsSuccessResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success. | - | +**400** | Bad request. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InviteAssetsSummary.md b/docs/InviteAssetsSummary.md new file mode 100644 index 0000000..095a605 --- /dev/null +++ b/docs/InviteAssetsSummary.md @@ -0,0 +1,14 @@ +# InviteAssetsSummary + +Ad accounts and profiles the member/partner will be granted access to with this invite/request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ad_accounts** | [**[InviteAssetsSummaryAdAccounts]**](InviteAssetsSummaryAdAccounts.md) | List of ad account IDs and respective permission levels that will be assigned. | [optional] +**profiles** | [**[InviteAssetsSummaryProfiles]**](InviteAssetsSummaryProfiles.md) | List of profile IDs and respective permission levels that will be assigned. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteAssetsSummaryAdAccounts.md b/docs/InviteAssetsSummaryAdAccounts.md new file mode 100644 index 0000000..87ceffe --- /dev/null +++ b/docs/InviteAssetsSummaryAdAccounts.md @@ -0,0 +1,13 @@ +# InviteAssetsSummaryAdAccounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of a business ad account. | [optional] +**permissions** | [**PermissionsResponse**](PermissionsResponse.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteAssetsSummaryProfiles.md b/docs/InviteAssetsSummaryProfiles.md new file mode 100644 index 0000000..10ec184 --- /dev/null +++ b/docs/InviteAssetsSummaryProfiles.md @@ -0,0 +1,13 @@ +# InviteAssetsSummaryProfiles + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of a business profile. | [optional] +**permissions** | [**PermissionsResponse**](PermissionsResponse.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteBusinessRoleBinding.md b/docs/InviteBusinessRoleBinding.md new file mode 100644 index 0000000..4a82c1f --- /dev/null +++ b/docs/InviteBusinessRoleBinding.md @@ -0,0 +1,18 @@ +# InviteBusinessRoleBinding + +An invite object if the invite/request was successfully updated. Will only be provided if the an invite/request is successfully updated. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by_business_id** | **str** | Unique identifier for the business that created the invite/request. | [optional] +**created_by_user_id** | **str** | Unique identifier for the user that created the invite/request. | [optional] +**user** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Metadata for the user that updated the invite/request. | [optional] +**id** | **str** | Unique identifier of the invite/request. | [optional] +**invite_data** | [**BaseInviteDataResponseInviteData**](BaseInviteDataResponseInviteData.md) | | [optional] +**is_received_invite** | **bool** | Indicates whether the invite/request was received. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteExceptionResponse.md b/docs/InviteExceptionResponse.md new file mode 100644 index 0000000..621d4ed --- /dev/null +++ b/docs/InviteExceptionResponse.md @@ -0,0 +1,16 @@ +# InviteExceptionResponse + +An exception object if there is an error performing the action. Will only be provided if there is an error. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_or_request_id** | **str, none_type** | Unique identifier of the invite/request. | [optional] +**code** | **int** | Error code associated with the error in performing the action on the invite/request. | [optional] +**message** | **str** | Error message associated with the error in performing the action on the invite/request. | [optional] +**users_or_partner_ids** | **[str], none_type** | A list of users' usernames or emails OR a list of partner ids that caused the error. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteResponse.md b/docs/InviteResponse.md new file mode 100644 index 0000000..6638035 --- /dev/null +++ b/docs/InviteResponse.md @@ -0,0 +1,20 @@ +# InviteResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets_summary** | [**InviteAssetsSummary**](InviteAssetsSummary.md) | | [optional] +**business_roles** | **[str]** | The access level a user would be granted on the business if the invite/request is accepted. This can be EMPLOYEE, BIZ_ADMIN, or PARTNER. | [optional] +**created_by_business** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Metadata for the business that created the invite/request. | [optional] +**created_by_user** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Metadata for the user that created the invite/request. | [optional] +**created_time** | **int** | The time the invite/request was created. Returned in milliseconds. | [optional] +**id** | **str** | Unique identifier of the invite/request. | [optional] +**invite_data** | [**BaseInviteDataResponseInviteData**](BaseInviteDataResponseInviteData.md) | | [optional] +**is_received_invite** | **bool** | Indicates whether the invite/request was received. | [optional] +**user** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Metadata for the member/partner that was sent the invite/request. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteStatus.md b/docs/InviteStatus.md new file mode 100644 index 0000000..7f5f439 --- /dev/null +++ b/docs/InviteStatus.md @@ -0,0 +1,12 @@ +# InviteStatus + +The current status of the invite. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The current status of the invite. | must be one of ["PENDING", "ACCEPTED", "DECLINED", "CANCELLED", "EXPIRED", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteType.md b/docs/InviteType.md new file mode 100644 index 0000000..0c1fb51 --- /dev/null +++ b/docs/InviteType.md @@ -0,0 +1,12 @@ +# InviteType + +The type of invite.
'MEMBER_INVITE' is to invite a member to access your business assets.
'PARTNER INVITE' is to invite a partner to access your business assets.
'PARTNER_REQUEST' is to request access a partner's business assets. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The type of invite. <br>'MEMBER_INVITE' is to invite a member to access your business assets. <br>'PARTNER INVITE' is to invite a partner to access your business assets. <br>'PARTNER_REQUEST' is to request access a partner's business assets. | must be one of ["MEMBER_INVITE", "PARTNER_INVITE", "PARTNER_REQUEST", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ItemAttributes.md b/docs/ItemAttributes.md index 6bc7d1e..8cc4f07 100644 --- a/docs/ItemAttributes.md +++ b/docs/ItemAttributes.md @@ -6,13 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **additional_image_link** | **[str], none_type** | <p><= 2000 characters</p> <p>The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.</p> | [optional] **image_link** | **[str]** | <p><= 2000 characters</p> <p>The link to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.</p> | [optional] +**video_link** | **str, none_type** | <p><= 2,000 characters</p> <p>Hosted link to the product video.</p> <p>File types for linked videos must be .mp4, .mov or .m4v.</p> <p>File size cannot exceed 2GB.</p> | [optional] **ad_link** | **str, none_type** | Allows advertisers to specify a separate URL that can be used to track traffic coming from Pinterest shopping ads. Must send full URL including tracking—do not send tracking parameters only. At this time we do not support impression tracking. Must begin with http:// or https://. | [optional] **adult** | **bool, none_type** | Set this attribute to TRUE if you're submitting items that are considered “adult”. These will not be shown on Pinterest. | [optional] **age_group** | **str, none_type** | The age group to apply a demographic range to the product. Must be one of the following values (upper or lowercased): ‘newborn’ , ‘infant’, ‘toddler’, ‘kids’, or ‘adult’. | [optional] **availability** | **str** | The availability of the product. Must be one of the following values (upper or lowercased): ‘in stock’, ‘out of stock’ , ‘preorder’. | [optional] **average_review_rating** | **float, none_type** | Average reviews for the item. Can be a number from 1-5. | [optional] **brand** | **str, none_type** | The brand of the product. | [optional] -**checkout_enabled** | **bool, none_type** | Set this attribute to FALSE to indicate items that should be excluded from the Pinterest Checkout program. Note, this product is currently being tested and your account must be enrolled. Please contact your Account Manager or contact us for more information. | [optional] +**checkout_enabled** | **bool, none_type** | This attribute is not supported anymore. | [optional] **color** | **str, none_type** | The primary color of the product. | [optional] **condition** | **str, none_type** | The condition of the product. Must be one of the following values (upper or lowercased): ‘new’, ‘used’, or ‘refurbished’. | [optional] **custom_label_0** | **str, none_type** | <p><= 1000 characters</p> <p>Custom grouping of products.</p> | [optional] diff --git a/docs/ItemAttributesAllOf.md b/docs/ItemAttributesAllOf.md index bfb453d..8577fcf 100644 --- a/docs/ItemAttributesAllOf.md +++ b/docs/ItemAttributesAllOf.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **additional_image_link** | **[str], none_type** | <p><= 2000 characters</p> <p>The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.</p> | [optional] **image_link** | **[str]** | <p><= 2000 characters</p> <p>The link to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.</p> | [optional] +**video_link** | **str, none_type** | <p><= 2,000 characters</p> <p>Hosted link to the product video.</p> <p>File types for linked videos must be .mp4, .mov or .m4v.</p> <p>File size cannot exceed 2GB.</p> | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ItemAttributesRequest.md b/docs/ItemAttributesRequest.md new file mode 100644 index 0000000..05aa368 --- /dev/null +++ b/docs/ItemAttributesRequest.md @@ -0,0 +1,59 @@ +# ItemAttributesRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additional_image_link** | **[str], none_type** | <p><= 2000 characters</p> <p>The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.</p> | [optional] +**image_link** | **bool, date, datetime, dict, float, int, list, str, none_type** | <p><= 2000 characters</p> <p>The links to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.</p> | [optional] +**video_link** | **str, none_type** | <p><= 2,000 characters</p> <p>Hosted link to the product video.</p> <p>File types for linked videos must be .mp4, .mov or .m4v.</p> <p>File size cannot exceed 2GB.</p> | [optional] +**ad_link** | **str, none_type** | Allows advertisers to specify a separate URL that can be used to track traffic coming from Pinterest shopping ads. Must send full URL including tracking—do not send tracking parameters only. At this time we do not support impression tracking. Must begin with http:// or https://. | [optional] +**adult** | **bool, none_type** | Set this attribute to TRUE if you're submitting items that are considered “adult”. These will not be shown on Pinterest. | [optional] +**age_group** | **str, none_type** | The age group to apply a demographic range to the product. Must be one of the following values (upper or lowercased): ‘newborn’ , ‘infant’, ‘toddler’, ‘kids’, or ‘adult’. | [optional] +**availability** | **str** | The availability of the product. Must be one of the following values (upper or lowercased): ‘in stock’, ‘out of stock’ , ‘preorder’. | [optional] +**average_review_rating** | **float, none_type** | Average reviews for the item. Can be a number from 1-5. | [optional] +**brand** | **str, none_type** | The brand of the product. | [optional] +**checkout_enabled** | **bool, none_type** | This attribute is not supported anymore. | [optional] +**color** | **str, none_type** | The primary color of the product. | [optional] +**condition** | **str, none_type** | The condition of the product. Must be one of the following values (upper or lowercased): ‘new’, ‘used’, or ‘refurbished’. | [optional] +**custom_label_0** | **str, none_type** | <p><= 1000 characters</p> <p>Custom grouping of products.</p> | [optional] +**custom_label_1** | **str, none_type** | <p><= 1000 characters</p> <p>Custom grouping of products.</p> | [optional] +**custom_label_2** | **str, none_type** | <p><= 1000 characters</p> <p>Custom grouping of products.</p> | [optional] +**custom_label_3** | **str, none_type** | <p><= 1000 characters</p> <p>Custom grouping of products.</p> | [optional] +**custom_label_4** | **str, none_type** | <p><= 1000 characters</p> <p>Custom grouping of products.</p> | [optional] +**description** | **str** | <p><= 10000 characters</p> <p>The description of the product.</p> | [optional] +**free_shipping_label** | **bool, none_type** | The item is free to ship. | [optional] +**free_shipping_limit** | **str, none_type** | The minimum order purchase necessary for the customer to get free shipping. Only relevant if free shipping is offered. | [optional] +**gender** | **str, none_type** | The gender associated with the product. Must be one of the following values (upper or lowercased): ‘male’, ‘female’ , or ‘unisex’. | [optional] +**google_product_category** | **str, none_type** | The categorization of the product based on the standardized Google Product Taxonomy. This is a set taxonomy. Both the text values and numeric codes are accepted. | [optional] +**gtin** | **int, none_type** | The unique universal product identifier. | [optional] +**id** | **str** | <p><= 127 characters</p> <p>The user-created unique ID that represents the product. Only Unicode characters are accepted.</p> | [optional] +**item_group_id** | **str, none_type** | <p><= 127 characters</p> <p>The parent ID of the product.</p> | [optional] +**last_updated_time** | **int, none_type** | The millisecond timestamp when the item was lastly modified by the merchant. | [optional] +**link** | **str** | <p><= 511 characters</p> <p>The landing page for the product.</p> | [optional] +**material** | **str, none_type** | The material used to make the product. | [optional] +**min_ad_price** | **str, none_type** | The minimum advertised price of the product. It supports the following formats, \"19.99 USD\", \"19.99USD\" and \"19.99\". If the currency is not included, we default to US dollars. | [optional] +**mobile_link** | **str, none_type** | The mobile-optimized version of your landing page. Must begin with http:// or https://. | [optional] +**mpn** | **str, none_type** | Manufacturer Part Number are alpha-numeric codes created by the manufacturer of a product to uniquely identify it among all products from the same manufacturer. | [optional] +**number_of_ratings** | **int, none_type** | The number of ratings for the item. | [optional] +**number_of_reviews** | **int, none_type** | The number of reviews available for the item. | [optional] +**pattern** | **str, none_type** | The description of the pattern used for the product. | [optional] +**price** | **str** | The price of the product. It supports the following formats, \"24.99 USD\", \"24.99USD\" and \"24.99\". If the currency is not included, we default to US dollars. | [optional] +**product_type** | **str, none_type** | <p><= 1000 characters</p> <p>The categorization of your product based on your custom product taxonomy. Subcategories must be sent separated by “ > “. The > must be wrapped by spaces. We do not recognize any other delimiters such as comma or pipe.</p> | [optional] +**sale_price** | **str, none_type** | The discounted price of the product. The sale_price must be lower than the price. It supports the following formats, \"14.99 USD\", \"14.99USD\" and \"14.99\". If the currency is not included, we default to US dollars. | [optional] +**shipping** | **str, none_type** | Shipping consists of one group of up to four elements, country, region, service (all optional) and price (required). All colons, even for blank values, are required. | [optional] +**shipping_height** | **str, none_type** | The height of the package needed to ship the product. Ensure there is a space between the numeric string and the metric. | [optional] +**shipping_weight** | **str, none_type** | The weight of the product. Ensure there is a space between the numeric string and the metric. | [optional] +**shipping_width** | **str, none_type** | The width of the package needed to ship the product. Ensure there is a space between the numeric string and the metric. | [optional] +**size** | **str, none_type** | The size of the product. | [optional] +**size_system** | **str, none_type** | Indicates the country’s sizing system in which you are submitting your product. Must be one of the following values (upper or lowercased): ‘US’, ‘UK’, ‘EU’, ‘DE’ , ‘FR’, ‘JP’, ‘CN’, ‘IT’, ‘ BR’, ‘MEX’, or ‘AU’. | [optional] +**size_type** | **str, none_type** | Additional description for the size. Must be one of the following values (upper or lowercased): ‘regular’, ‘petite’ , ‘plus’, ‘big_and_tall’, or ‘maternity’. | [optional] +**tax** | **str, none_type** | Tax consists of one group of up to four elements, country, region, rate (all required) and tax_ship (optional). All colons, even for blank values, are required. | [optional] +**title** | **str** | <p><= 500 characters</p> <p>The name of the product.</p> | [optional] +**variant_names** | **[str], none_type** | Options for this variant. People will see these options next to your Pin and can select the one they want. List them in the order you want them displayed. | [optional] +**variant_values** | **[str], none_type** | Option values for this variant. People will see these options next to your Pin and can select the one they want. List them in the order you want them displayed. The order of the variant values must be consistent with the order of the variant names. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ItemAttributesRequestAllOf.md b/docs/ItemAttributesRequestAllOf.md new file mode 100644 index 0000000..b09fc89 --- /dev/null +++ b/docs/ItemAttributesRequestAllOf.md @@ -0,0 +1,14 @@ +# ItemAttributesRequestAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additional_image_link** | **[str], none_type** | <p><= 2000 characters</p> <p>The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.</p> | [optional] +**image_link** | **bool, date, datetime, dict, float, int, list, str, none_type** | <p><= 2000 characters</p> <p>The links to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.</p> | [optional] +**video_link** | **str, none_type** | <p><= 2,000 characters</p> <p>Hosted link to the product video.</p> <p>File types for linked videos must be .mp4, .mov or .m4v.</p> <p>File size cannot exceed 2GB.</p> | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ItemBatchRecord.md b/docs/ItemBatchRecord.md index 88ecf71..913b63c 100644 --- a/docs/ItemBatchRecord.md +++ b/docs/ItemBatchRecord.md @@ -6,8 +6,8 @@ Object describing an item batch record Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **item_id** | **str** | The catalog item id in the merchant namespace | [optional] -**attributes** | [**UpdatableItemAttributes**](UpdatableItemAttributes.md) | | [optional] -**update_mask** | **[str], none_type** | The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item. | [optional] +**attributes** | [**ItemAttributesRequest**](ItemAttributesRequest.md) | | [optional] +**update_mask** | [**[UpdateMaskFieldType], none_type**](UpdateMaskFieldType.md) | The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ItemCreateBatchRecord.md b/docs/ItemCreateBatchRecord.md index 4008544..365457c 100644 --- a/docs/ItemCreateBatchRecord.md +++ b/docs/ItemCreateBatchRecord.md @@ -6,7 +6,7 @@ Object describing an item batch record to create items Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **item_id** | **str** | The catalog item id in the merchant namespace | [optional] -**attributes** | [**ItemAttributes**](ItemAttributes.md) | | [optional] +**attributes** | [**ItemAttributesRequest**](ItemAttributesRequest.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ItemResponse.md b/docs/ItemResponse.md index 07b6886..aa6a31b 100644 --- a/docs/ItemResponse.md +++ b/docs/ItemResponse.md @@ -5,10 +5,7 @@ Object describing an item record ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**item_id** | **str** | The catalog item id in the merchant namespace | [optional] -**pins** | [**[Pin], none_type**](Pin.md) | <p><= 2000 characters</p> <p>The pins mapped to the item</p> | [optional] -**attributes** | [**ItemAttributes**](ItemAttributes.md) | | [optional] -**errors** | [**[ItemValidationEvent]**](ItemValidationEvent.md) | Array with the errors for the item id requested | [optional] +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ItemResponseAnyOf.md b/docs/ItemResponseAnyOf.md index bddc915..57f6c4e 100644 --- a/docs/ItemResponseAnyOf.md +++ b/docs/ItemResponseAnyOf.md @@ -4,9 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**item_id** | **str** | The catalog item id in the merchant namespace | [optional] -**pins** | [**[Pin], none_type**](Pin.md) | <p><= 2000 characters</p> <p>The pins mapped to the item</p> | [optional] -**attributes** | [**ItemAttributes**](ItemAttributes.md) | | [optional] +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ItemResponseAnyOf1.md b/docs/ItemResponseAnyOf1.md index 86a9e05..cd73c4c 100644 --- a/docs/ItemResponseAnyOf1.md +++ b/docs/ItemResponseAnyOf1.md @@ -4,8 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**item_id** | **str** | The catalog item id in the merchant namespace | [optional] -**errors** | [**[ItemValidationEvent]**](ItemValidationEvent.md) | Array with the errors for the item id requested | [optional] +**catalog_type** | [**CatalogsType**](CatalogsType.md) | | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ItemUpdateBatchRecord.md b/docs/ItemUpdateBatchRecord.md index 682aa34..e2f32c9 100644 --- a/docs/ItemUpdateBatchRecord.md +++ b/docs/ItemUpdateBatchRecord.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **item_id** | **str** | The catalog item id in the merchant namespace | [optional] **attributes** | [**UpdatableItemAttributes**](UpdatableItemAttributes.md) | | [optional] -**update_mask** | **[str], none_type** | The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item. | [optional] +**update_mask** | [**[UpdateMaskFieldType], none_type**](UpdateMaskFieldType.md) | The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ItemUpsertBatchRecord.md b/docs/ItemUpsertBatchRecord.md new file mode 100644 index 0000000..559dd0e --- /dev/null +++ b/docs/ItemUpsertBatchRecord.md @@ -0,0 +1,14 @@ +# ItemUpsertBatchRecord + +Object describing an item batch record to upsert items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_id** | **str** | The catalog item id in the merchant namespace | [optional] +**attributes** | [**ItemAttributesRequest**](ItemAttributesRequest.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Keyword.md b/docs/Keyword.md index d5676e2..957ffd2 100644 --- a/docs/Keyword.md +++ b/docs/Keyword.md @@ -6,12 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **match_type** | [**MatchTypeResponse**](MatchTypeResponse.md) | | **value** | **str** | Keyword value (120 chars max). | +**bid** | **int, none_type** | </p><strong>Note:</strong> bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group. | [optional] **archived** | **bool** | | [optional] **id** | **str** | Keyword ID . | [optional] **parent_id** | **str** | Keyword parent entity ID (advertiser, campaign, ad group). | [optional] **parent_type** | **str** | Parent entity type | [optional] **type** | **str** | Always keyword | [optional] -**bid** | **int, none_type** | Keyword custom bid in microcurrency - null if inherited from parent ad group. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/KeywordAllOf.md b/docs/KeywordAllOf.md new file mode 100644 index 0000000..4d04ec2 --- /dev/null +++ b/docs/KeywordAllOf.md @@ -0,0 +1,16 @@ +# KeywordAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**archived** | **bool** | | [optional] +**id** | **str** | Keyword ID . | [optional] +**parent_id** | **str** | Keyword parent entity ID (advertiser, campaign, ad group). | [optional] +**parent_type** | **str** | Parent entity type | [optional] +**type** | **str** | Always keyword | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KeywordList.md b/docs/KeywordList.md new file mode 100644 index 0000000..58c1e20 --- /dev/null +++ b/docs/KeywordList.md @@ -0,0 +1,11 @@ +# KeywordList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **[str]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KeywordUpdate.md b/docs/KeywordUpdate.md index 9361f90..0c06692 100644 --- a/docs/KeywordUpdate.md +++ b/docs/KeywordUpdate.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Keyword ID. | **archived** | **bool** | Is keyword archived? | [optional] -**bid** | **int, none_type** | Keyword custom bid in microcurrency - null if inherited from parent ad group. | [optional] +**bid** | **int, none_type** | </p><strong>Note:</strong> bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/KeywordUpdateBody.md b/docs/KeywordUpdateBody.md index b4ed521..b36e86f 100644 --- a/docs/KeywordUpdateBody.md +++ b/docs/KeywordUpdateBody.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**keywords** | [**[KeywordUpdate]**](KeywordUpdate.md) | Keywords to update. Object array. Each object has 3 possible fields:<br>1. \"id\": (required) keyword ID<br>2. \"archived\": boolean. Should keyword be archived?<br>3. \"bid\": number<br>For example: [{\"id\":\"2886610576653\", \"archived\": false, \"bid\": 20000}, {\"id\":\"2886610576654\", \"archived\": true, \"bid\": 20000}, ...] | +**keywords** | [**[KeywordUpdate]**](KeywordUpdate.md) | Keywords to update. Object array. Each object has 2 possible fields:<br>1. \"id\": (required) keyword ID<br>2. \"archived\": boolean. Should keyword be archived?<br>For example: [{\"id\":\"2886610576653\", \"archived\": false}, {\"id\":\"2886610576654\", \"archived\": true}, ...] | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/KeywordsApi.md b/docs/KeywordsApi.md index 4f61878..e424192 100644 --- a/docs/KeywordsApi.md +++ b/docs/KeywordsApi.md @@ -102,7 +102,7 @@ Name | Type | Description | Notes Create keywords -

Create keywords for following entity types(advertiser, campaign, ad group or ad).

For more information, see Keyword targeting.

Notes:

For more information on match types, see match type enums.

Returns:

Rate limit: WRITE.

+

Create keywords for following entity types(advertiser, campaign, ad group or ad).

For more information, see Keyword targeting.

Notes:

For more information on match types, see match type enums.

Returns:

Rate limit: WRITE.

### Example @@ -141,7 +141,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: keywords_request = KeywordsRequest( keywords=[ KeywordsCommon( - bid=200000, + bid=1, match_type=MatchTypeResponse("BROAD"), value="value_example", ), @@ -194,7 +194,7 @@ Name | Type | Description | Notes Get keywords -

Get a list of keywords based on the filters provided. If no filter is provided, it will default to the ad_account_id filter, which means it will only return keywords that specifically have parent_id set to the ad_account_id. Note: Keywords can have ad_account_ids, campaign_ids, and ad_group_ids set as their parent_ids. Keywords created through Ads Manager will have their parent_id set to an ad_group_id, not ad_account_id.

For more information, see Keyword targeting.

Notes:

For more information on match types, see match type enums.

Returns:

+

Get a list of keywords based on the filters provided. If no filter is provided, it will default to the ad_account_id filter, which means it will only return keywords that specifically have parent_id set to the ad_account_id. Note: Keywords can have ad_account_ids, campaign_ids, and ad_group_ids set as their parent_ids. Keywords created through Ads Manager will have their parent_id set to an ad_group_id, not ad_account_id.

For more information, see Keyword targeting.

Notes:

For more information on match types, see match type enums.

Returns:

### Example @@ -207,6 +207,7 @@ from openapi_generated.pinterest_client.api import keywords_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.match_type import MatchType from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.keyword import Keyword from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -234,8 +235,8 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: ad_group_id = "123123123" # str | Ad group Id. (optional) match_types = [ MatchType("BROAD"), - ] # [MatchType] | Keyword match type (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + ] # [MatchType] | Keyword match type (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) # example passing only required values which don't have defaults set @@ -264,8 +265,8 @@ Name | Type | Description | Notes **ad_account_id** | **str**| Unique identifier of an ad account. | **campaign_id** | **str**| Campaign Id to use to filter the results. | [optional] **ad_group_id** | **str**| Ad group Id. | [optional] - **match_types** | [**[MatchType]**](MatchType.md)| Keyword <a href=\"/docs/redoc/#section/Match-type-(keyword).\">match type</a> | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **match_types** | [**[MatchType]**](MatchType.md)| Keyword <a target=\"_blank\" href=\"/docs/api-features/targeting-overview/\">match type</a> | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] ### Return type @@ -337,7 +338,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: KeywordUpdate( id="2886364308355", archived=False, - bid=200000, + bid=1, ), ], ) # KeywordUpdateBody | @@ -387,7 +388,7 @@ Name | Type | Description | Notes List trending keywords -

Get the top trending search keywords among the Pinterest user audience. This is an alpha endpoint only available to select participants.

Trending keywords can be used to inform ad targeting, budget strategy, and creative decisions about which products and Pins will resonate with your audience.

Geographic, demographic and interest-based filters are available to narrow down to the top trends among a specific audience. Multiple trend types are supported that can be used to identify newly-popular, evergreen or seasonal keywords.

For an interactive way to explore this data, please visit trends.pinterest.com. +

Get the top trending search keywords among the Pinterest user audience.

Trending keywords can be used to inform ad targeting, budget strategy, and creative decisions about which products and Pins will resonate with your audience.

Geographic, demographic and interest-based filters are available to narrow down to the top trends among a specific audience. Multiple trend types are supported that can be used to identify newly-popular, evergreen or seasonal keywords.

For an interactive way to explore this data, please visit trends.pinterest.com. ### Example @@ -401,6 +402,7 @@ from openapi_generated.pinterest_client.model.trend_type import TrendType from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.trends_supported_region import TrendsSupportedRegion from openapi_generated.pinterest_client.model.trending_keywords_response import TrendingKeywordsResponse +from openapi_generated.pinterest_client.model.keyword_list import KeywordList from openapi_generated.pinterest_client.model.gender_list import GenderList from openapi_generated.pinterest_client.model.l1_interest_list import L1InterestList from openapi_generated.pinterest_client.model.age_bucket_list import AgeBucketList @@ -431,6 +433,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: interests = L1InterestList(["beauty","womens_fashion"]) # L1InterestList | If set, filters the results to trends associated with the specified interests.
If unset, trends for all interests will be returned.
The list of supported interests is: - `animals` - Animals - `architecture` - Architecture - `art` - Art - `beauty` - Beauty - `childrens_fashion` - Children's Fashion - `design` - Design - `diy_and_crafts` - DIY & Crafts - `education` - Education - `electronics` - Electronics - `entertainment` - Entertainment - `event_planning` - Event Planning - `finance` - Finance - `food_and_drinks` - Food & Drink - `gardening` - Gardening - `health` - Health - `home_decor` - Home Decor - `mens_fashion` - Men's Fashion - `parenting` - Parenting - `quotes` - Quotes - `sport` - Sports - `travel` - Travel - `vehicles` - Vehicles - `wedding` - Wedding - `womens_fashion` - Women's Fashion (optional) genders = GenderList(["female","unknown"]) # GenderList | If set, filters the results to trends among users who identify with the specified gender(s).
If unset, trends among all genders will be returned.
The `unknown` group includes users with unspecified or customized gender profile settings. (optional) ages = AgeBucketList(["35-44","50-54"]) # AgeBucketList | If set, filters the results to trends among users in the specified age range(s).
If unset, trends among all age groups will be returned. (optional) + include_keywords = KeywordList(["recipes","dessert"]) # KeywordList | If set, filters the results to top trends which include at least one of the specified keywords.
If unset, no keyword filtering logic is applied. (optional) normalize_against_group = True # bool | Governs how the resulting time series data will be normalized to a [0-100] scale.
By default (`false`), the data will be normalized independently for each keyword. The peak search volume observation in *each* keyword's time series will be represented by the value 100. This is ideal for analyzing when an individual keyword is expected to peak in interest.
If set to `true`, the data will be normalized as a group. The peak search volume observation across *all* keywords in the response will be represented by the value 100, and all other values scaled accordingly. Use this option when you wish to compare relative search volume between multiple keywords. (optional) if omitted the server will use the default value of False limit = 25 # int | The maximum number of trending keywords that will be returned. Keywords are returned in trend-ranked order, so a `limit` of 50 will return the top 50 trends. (optional) if omitted the server will use the default value of 50 @@ -446,7 +449,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # and optional values try: # List trending keywords - api_response = api_instance.trending_keywords_list(region, trend_type, interests=interests, genders=genders, ages=ages, normalize_against_group=normalize_against_group, limit=limit) + api_response = api_instance.trending_keywords_list(region, trend_type, interests=interests, genders=genders, ages=ages, include_keywords=include_keywords, normalize_against_group=normalize_against_group, limit=limit) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling KeywordsApi->trending_keywords_list: %s\n" % e) @@ -462,6 +465,7 @@ Name | Type | Description | Notes **interests** | **L1InterestList**| If set, filters the results to trends associated with the specified interests.<br /> If unset, trends for all interests will be returned.<br /> The list of supported interests is: - `animals` - Animals - `architecture` - Architecture - `art` - Art - `beauty` - Beauty - `childrens_fashion` - Children's Fashion - `design` - Design - `diy_and_crafts` - DIY & Crafts - `education` - Education - `electronics` - Electronics - `entertainment` - Entertainment - `event_planning` - Event Planning - `finance` - Finance - `food_and_drinks` - Food & Drink - `gardening` - Gardening - `health` - Health - `home_decor` - Home Decor - `mens_fashion` - Men's Fashion - `parenting` - Parenting - `quotes` - Quotes - `sport` - Sports - `travel` - Travel - `vehicles` - Vehicles - `wedding` - Wedding - `womens_fashion` - Women's Fashion | [optional] **genders** | **GenderList**| If set, filters the results to trends among users who identify with the specified gender(s).<br /> If unset, trends among all genders will be returned.<br /> The `unknown` group includes users with unspecified or customized gender profile settings. | [optional] **ages** | **AgeBucketList**| If set, filters the results to trends among users in the specified age range(s).<br /> If unset, trends among all age groups will be returned. | [optional] + **include_keywords** | **KeywordList**| If set, filters the results to top trends which include at least one of the specified keywords.<br /> If unset, no keyword filtering logic is applied. | [optional] **normalize_against_group** | **bool**| Governs how the resulting time series data will be normalized to a [0-100] scale.<br /> By default (`false`), the data will be normalized independently for each keyword. The peak search volume observation in *each* keyword's time series will be represented by the value 100. This is ideal for analyzing when an individual keyword is expected to peak in interest.<br /> If set to `true`, the data will be normalized as a group. The peak search volume observation across *all* keywords in the response will be represented by the value 100, and all other values scaled accordingly. Use this option when you wish to compare relative search volume between multiple keywords. | [optional] if omitted the server will use the default value of False **limit** | **int**| The maximum number of trending keywords that will be returned. Keywords are returned in trend-ranked order, so a `limit` of 50 will return the top 50 trends. | [optional] if omitted the server will use the default value of 50 diff --git a/docs/KeywordsCommon.md b/docs/KeywordsCommon.md index aa60e8b..5742b0d 100644 --- a/docs/KeywordsCommon.md +++ b/docs/KeywordsCommon.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **match_type** | [**MatchTypeResponse**](MatchTypeResponse.md) | | **value** | **str** | Keyword value (120 chars max). | -**bid** | **int, none_type** | Keyword custom bid in microcurrency - null if inherited from parent ad group. | [optional] +**bid** | **int, none_type** | </p><strong>Note:</strong> bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LeadAdsApi.md b/docs/LeadAdsApi.md new file mode 100644 index 0000000..b84a757 --- /dev/null +++ b/docs/LeadAdsApi.md @@ -0,0 +1,368 @@ +# openapi_generated.pinterest_client.LeadAdsApi + +All URIs are relative to *https://api.pinterest.com/v5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ad_accounts_subscriptions_del_by_id**](LeadAdsApi.md#ad_accounts_subscriptions_del_by_id) | **DELETE** /ad_accounts/{ad_account_id}/leads/subscriptions/{subscription_id} | Delete lead ads subscription +[**ad_accounts_subscriptions_get_by_id**](LeadAdsApi.md#ad_accounts_subscriptions_get_by_id) | **GET** /ad_accounts/{ad_account_id}/leads/subscriptions/{subscription_id} | Get lead ads subscription +[**ad_accounts_subscriptions_get_list**](LeadAdsApi.md#ad_accounts_subscriptions_get_list) | **GET** /ad_accounts/{ad_account_id}/leads/subscriptions | Get lead ads subscriptions +[**ad_accounts_subscriptions_post**](LeadAdsApi.md#ad_accounts_subscriptions_post) | **POST** /ad_accounts/{ad_account_id}/leads/subscriptions | Create lead ads subscription + + +# **ad_accounts_subscriptions_del_by_id** +> ad_accounts_subscriptions_del_by_id(ad_account_id, subscription_id) + +Delete lead ads subscription + +Delete an existing lead ads webhook subscription by ID. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. This endpoint is currently in beta and not available to all apps. Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import lead_ads_api +from openapi_generated.pinterest_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = lead_ads_api.LeadAdsApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + subscription_id = "4" # str | Unique identifier of a subscription. + + # example passing only required values which don't have defaults set + try: + # Delete lead ads subscription + api_instance.ad_accounts_subscriptions_del_by_id(ad_account_id, subscription_id) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling LeadAdsApi->ad_accounts_subscriptions_del_by_id: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **subscription_id** | **str**| Unique identifier of a subscription. | + +### Return type + +void (empty response body) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Subscription deleted successfully | - | +**400** | Invalid input parameters. | - | +**403** | You are not authorized to delete this subscription. | - | +**404** | Subscription not found. | - | +**0** | Unexpected error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ad_accounts_subscriptions_get_by_id** +> AdAccountGetSubscriptionResponse ad_accounts_subscriptions_get_by_id(ad_account_id, subscription_id) + +Get lead ads subscription + +Get a specific lead ads subscription record. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. This endpoint is currently in beta and not available to all apps. Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import lead_ads_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.ad_account_get_subscription_response import AdAccountGetSubscriptionResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = lead_ads_api.LeadAdsApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + subscription_id = "4" # str | Unique identifier of a subscription. + + # example passing only required values which don't have defaults set + try: + # Get lead ads subscription + api_response = api_instance.ad_accounts_subscriptions_get_by_id(ad_account_id, subscription_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling LeadAdsApi->ad_accounts_subscriptions_get_by_id: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **subscription_id** | **str**| Unique identifier of a subscription. | + +### Return type + +[**AdAccountGetSubscriptionResponse**](AdAccountGetSubscriptionResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid input parameters. | - | +**403** | Can't access this subscription. | - | +**404** | Subscription not found. | - | +**0** | Unexpected error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ad_accounts_subscriptions_get_list** +> bool, date, datetime, dict, float, int, list, str, none_type ad_accounts_subscriptions_get_list(ad_account_id) + +Get lead ads subscriptions + +Get the advertiser's list of lead ads subscriptions. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. This endpoint is currently in beta and not available to all apps. Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import lead_ads_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.ad_account_get_subscription_response import AdAccountGetSubscriptionResponse +from openapi_generated.pinterest_client.model.paginated import Paginated +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = lead_ads_api.LeadAdsApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + + # example passing only required values which don't have defaults set + try: + # Get lead ads subscriptions + api_response = api_instance.ad_accounts_subscriptions_get_list(ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling LeadAdsApi->ad_accounts_subscriptions_get_list: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get lead ads subscriptions + api_response = api_instance.ad_accounts_subscriptions_get_list(ad_account_id, page_size=page_size, bookmark=bookmark) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling LeadAdsApi->ad_accounts_subscriptions_get_list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Can't access this subscription. | - | +**0** | Unexpected error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ad_accounts_subscriptions_post** +> AdAccountCreateSubscriptionResponse ad_accounts_subscriptions_post(ad_account_id, ad_account_create_subscription_request) + +Create lead ads subscription + +Create a lead ads webhook subscription. Subscriptions allow Pinterest to deliver lead data from Ads Manager directly to the subscriber. Subscriptions can exist for a specific lead form or at ad account level. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. - Advertisers can set up multiple integrations using ad_account_id + lead_form_id but only one integration per unique records. - For data security, egress lead data is encrypted with AES-256-GCM. This endpoint is currently in beta and not available to all apps. Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import lead_ads_api +from openapi_generated.pinterest_client.model.ad_account_create_subscription_response import AdAccountCreateSubscriptionResponse +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.ad_account_create_subscription_request import AdAccountCreateSubscriptionRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = lead_ads_api.LeadAdsApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + ad_account_create_subscription_request = AdAccountCreateSubscriptionRequest( + webhook_url="https://webhook.example.com/xyz", + lead_form_id="383791336903426390", + partner_access_token="partner_access_token_example", + partner_refresh_token="partner_refresh_token_example", + partner_metadata=AdAccountCreateSubscriptionRequestPartnerMetadata( + subscriber_key="subscriber_key_example", + ), + ) # AdAccountCreateSubscriptionRequest | Subscription to create. + + # example passing only required values which don't have defaults set + try: + # Create lead ads subscription + api_response = api_instance.ad_accounts_subscriptions_post(ad_account_id, ad_account_create_subscription_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling LeadAdsApi->ad_accounts_subscriptions_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **ad_account_create_subscription_request** | [**AdAccountCreateSubscriptionRequest**](AdAccountCreateSubscriptionRequest.md)| Subscription to create. | + +### Return type + +[**AdAccountCreateSubscriptionResponse**](AdAccountCreateSubscriptionResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid input parameters. | - | +**403** | Can't access this subscription. | - | +**0** | Unexpected error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/LeadFormArrayResponse.md b/docs/LeadFormArrayResponse.md new file mode 100644 index 0000000..d60ba75 --- /dev/null +++ b/docs/LeadFormArrayResponse.md @@ -0,0 +1,12 @@ +# LeadFormArrayResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[LeadFormArrayResponseItems]**](LeadFormArrayResponseItems.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadFormArrayResponseItems.md b/docs/LeadFormArrayResponseItems.md new file mode 100644 index 0000000..7ec9bc7 --- /dev/null +++ b/docs/LeadFormArrayResponseItems.md @@ -0,0 +1,13 @@ +# LeadFormArrayResponseItems + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**LeadFormResponse**](LeadFormResponse.md) | | [optional] +**exceptions** | [**[Exception]**](Exception.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadFormCommon.md b/docs/LeadFormCommon.md index b9a8c10..fa44052 100644 --- a/docs/LeadFormCommon.md +++ b/docs/LeadFormCommon.md @@ -7,11 +7,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str, none_type** | Internal name of the lead form. | [optional] **privacy_policy_link** | **str, none_type** | A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language. | [optional] -**has_accepted_terms** | **bool** | Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. | [optional] +**has_accepted_terms** | **bool** | Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's <a href=\"https://policy.pinterest.com/en/lead-ad-terms\">Lead Ad Terms</a>. As a reminder, all advertising on Pinterest is subject to the <a href=\"https://business.pinterest.com/en/pinterest-advertising-services-agreement/\">Pinterest Advertising Services Agreement</a> or an equivalent agreement as set forth on an IO | [optional] **completion_message** | **str, none_type** | A message for people who complete the form to let them know what happens next. | [optional] **status** | [**LeadFormStatus**](LeadFormStatus.md) | | [optional] **disclosure_language** | **str, none_type** | Additional disclosure language to be included in the lead form. | [optional] **questions** | [**[LeadFormQuestion]**](LeadFormQuestion.md) | List of questions to be displayed on the lead form. | [optional] +**policy_links** | [**[LeadFormCommonPolicyLinks]**](LeadFormCommonPolicyLinks.md) | List of additional policy links to be displayed on the lead form. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LeadFormCommonPolicyLinks.md b/docs/LeadFormCommonPolicyLinks.md new file mode 100644 index 0000000..34b9e2e --- /dev/null +++ b/docs/LeadFormCommonPolicyLinks.md @@ -0,0 +1,13 @@ +# LeadFormCommonPolicyLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Policy label for an additional policy link. | [optional] +**link** | **str** | Policy link for an additional policy link. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadFormCreateRequest.md b/docs/LeadFormCreateRequest.md new file mode 100644 index 0000000..3e968ec --- /dev/null +++ b/docs/LeadFormCreateRequest.md @@ -0,0 +1,19 @@ +# LeadFormCreateRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str, none_type** | Internal name of the lead form. | +**privacy_policy_link** | **str, none_type** | A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language. | +**has_accepted_terms** | **bool** | Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's <a href=\"https://policy.pinterest.com/en/lead-ad-terms\">Lead Ad Terms</a>. As a reminder, all advertising on Pinterest is subject to the <a href=\"https://business.pinterest.com/en/pinterest-advertising-services-agreement/\">Pinterest Advertising Services Agreement</a> or an equivalent agreement as set forth on an IO | +**completion_message** | **str, none_type** | A message for people who complete the form to let them know what happens next. | +**questions** | [**[LeadFormQuestion]**](LeadFormQuestion.md) | List of questions to be displayed on the lead form. | +**status** | [**LeadFormStatus**](LeadFormStatus.md) | | [optional] +**disclosure_language** | **str, none_type** | Additional disclosure language to be included in the lead form. | [optional] +**policy_links** | [**[LeadFormCommonPolicyLinks]**](LeadFormCommonPolicyLinks.md) | List of additional policy links to be displayed on the lead form. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadFormQuestionFieldType.md b/docs/LeadFormQuestionFieldType.md index 5ac8081..cc41ead 100644 --- a/docs/LeadFormQuestionFieldType.md +++ b/docs/LeadFormQuestionFieldType.md @@ -5,7 +5,7 @@ Lead form question field type ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Lead form question field type | must be one of ["TEXT_FIELD", "TEXT_AREA", "RADIO_LIST", "CHECKBOX", "DROPDOWN", "null", ] +**value** | **str** | Lead form question field type | must be one of ["TEXT_FIELD", "TEXT_AREA", "RADIO_LIST", "CHECKBOX", "null", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LeadFormQuestionType.md b/docs/LeadFormQuestionType.md index 278553b..c3f6a63 100644 --- a/docs/LeadFormQuestionType.md +++ b/docs/LeadFormQuestionType.md @@ -5,7 +5,7 @@ Lead form question type ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Lead form question type | must be one of ["CUSTOM", "FULL_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "ZIP_CODE", "AGE", "GENDER", "CITY", "COUNTRY", "PREFERRED_CONTACT_METHOD", "STATE_PROVINCE", ] +**value** | **str** | Lead form question type | must be one of ["CUSTOM", "FULL_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "ZIP_CODE", "GENDER", "CITY", "COUNTRY", "STATE_PROVINCE", "ADDRESS", "DATE_OF_BIRTH", "AGE", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LeadFormResponse.md b/docs/LeadFormResponse.md index 8a50d5f..94e89df 100644 --- a/docs/LeadFormResponse.md +++ b/docs/LeadFormResponse.md @@ -6,11 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str, none_type** | Internal name of the lead form. | [optional] **privacy_policy_link** | **str, none_type** | A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language. | [optional] -**has_accepted_terms** | **bool** | Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. | [optional] +**has_accepted_terms** | **bool** | Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's <a href=\"https://policy.pinterest.com/en/lead-ad-terms\">Lead Ad Terms</a>. As a reminder, all advertising on Pinterest is subject to the <a href=\"https://business.pinterest.com/en/pinterest-advertising-services-agreement/\">Pinterest Advertising Services Agreement</a> or an equivalent agreement as set forth on an IO | [optional] **completion_message** | **str, none_type** | A message for people who complete the form to let them know what happens next. | [optional] **status** | [**LeadFormStatus**](LeadFormStatus.md) | | [optional] **disclosure_language** | **str, none_type** | Additional disclosure language to be included in the lead form. | [optional] **questions** | [**[LeadFormQuestion]**](LeadFormQuestion.md) | List of questions to be displayed on the lead form. | [optional] +**policy_links** | [**[LeadFormCommonPolicyLinks]**](LeadFormCommonPolicyLinks.md) | List of additional policy links to be displayed on the lead form. | [optional] **id** | **str** | The ID of this lead form | [optional] **ad_account_id** | **str** | The Ad Account ID that this lead form belongs to. | [optional] **created_time** | **int** | Lead form creation time. Unix timestamp in seconds. | [optional] diff --git a/docs/LeadFormTestRequest.md b/docs/LeadFormTestRequest.md new file mode 100644 index 0000000..7e6c6b9 --- /dev/null +++ b/docs/LeadFormTestRequest.md @@ -0,0 +1,13 @@ +# LeadFormTestRequest + +Request to create test data for lead data test API. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**answers** | **[str]** | Test lead answers. Should follow the creation order. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadFormTestResponse.md b/docs/LeadFormTestResponse.md new file mode 100644 index 0000000..5fbb475 --- /dev/null +++ b/docs/LeadFormTestResponse.md @@ -0,0 +1,13 @@ +# LeadFormTestResponse + +Response for lead data test API. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subscription_id** | **str** | Subscription ID. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadFormUpdateRequest.md b/docs/LeadFormUpdateRequest.md new file mode 100644 index 0000000..d2bb3f9 --- /dev/null +++ b/docs/LeadFormUpdateRequest.md @@ -0,0 +1,20 @@ +# LeadFormUpdateRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The ID of this lead form to be updated | +**name** | **str, none_type** | Internal name of the lead form. | [optional] +**privacy_policy_link** | **str, none_type** | A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language. | [optional] +**has_accepted_terms** | **bool** | Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's <a href=\"https://policy.pinterest.com/en/lead-ad-terms\">Lead Ad Terms</a>. As a reminder, all advertising on Pinterest is subject to the <a href=\"https://business.pinterest.com/en/pinterest-advertising-services-agreement/\">Pinterest Advertising Services Agreement</a> or an equivalent agreement as set forth on an IO | [optional] +**completion_message** | **str, none_type** | A message for people who complete the form to let them know what happens next. | [optional] +**status** | [**LeadFormStatus**](LeadFormStatus.md) | | [optional] +**disclosure_language** | **str, none_type** | Additional disclosure language to be included in the lead form. | [optional] +**questions** | [**[LeadFormQuestion]**](LeadFormQuestion.md) | List of questions to be displayed on the lead form. | [optional] +**policy_links** | [**[LeadFormCommonPolicyLinks]**](LeadFormCommonPolicyLinks.md) | List of additional policy links to be displayed on the lead form. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadFormUpdateRequestAllOf.md b/docs/LeadFormUpdateRequestAllOf.md new file mode 100644 index 0000000..142a579 --- /dev/null +++ b/docs/LeadFormUpdateRequestAllOf.md @@ -0,0 +1,12 @@ +# LeadFormUpdateRequestAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The ID of this lead form to be updated | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadFormsApi.md b/docs/LeadFormsApi.md index e25d2ad..08f05ab 100644 --- a/docs/LeadFormsApi.md +++ b/docs/LeadFormsApi.md @@ -5,7 +5,10 @@ All URIs are relative to *https://api.pinterest.com/v5* Method | HTTP request | Description ------------- | ------------- | ------------- [**lead_form_get**](LeadFormsApi.md#lead_form_get) | **GET** /ad_accounts/{ad_account_id}/lead_forms/{lead_form_id} | Get lead form by id -[**lead_forms_list**](LeadFormsApi.md#lead_forms_list) | **GET** /ad_accounts/{ad_account_id}/lead_forms | Get lead forms +[**lead_form_test_create**](LeadFormsApi.md#lead_form_test_create) | **POST** /ad_accounts/{ad_account_id}/lead_forms/{lead_form_id}/test | Create lead form test data +[**lead_forms_create**](LeadFormsApi.md#lead_forms_create) | **POST** /ad_accounts/{ad_account_id}/lead_forms | Create lead forms +[**lead_forms_list**](LeadFormsApi.md#lead_forms_list) | **GET** /ad_accounts/{ad_account_id}/lead_forms | List lead forms +[**lead_forms_update**](LeadFormsApi.md#lead_forms_update) | **PATCH** /ad_accounts/{ad_account_id}/lead_forms | Update lead forms # **lead_form_get** @@ -13,7 +16,7 @@ Method | HTTP request | Description Get lead form by id -Gets a lead form given it's ID. It must also be associated with the provided ad account ID. Retrieving an advertiser's lead form will only contain results if you're a part of the Lead ads beta. If you're interested in joining the beta, please reach out to your Pinterest account manager. +This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. Gets a lead form given it's ID. It must also be associated with the provided ad account ID. For more, see Lead ads. ### Example @@ -92,12 +95,187 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **lead_form_test_create** +> LeadFormTestResponse lead_form_test_create(ad_account_id, lead_form_id, lead_form_test_request) + +Create lead form test data + +Create lead form test data based on the list of answers provided as part of the body. - List of answers should follow the questions creation order. This endpoint is currently in beta and not available to all apps. Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import lead_forms_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.lead_form_test_response import LeadFormTestResponse +from openapi_generated.pinterest_client.model.lead_form_test_request import LeadFormTestRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = lead_forms_api.LeadFormsApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + lead_form_id = "1234567890123" # str | Unique identifier of a lead form. + lead_form_test_request = LeadFormTestRequest( + answers=["John","Doe","abc@email.com","987654321"], + ) # LeadFormTestRequest | Subscription to create. + + # example passing only required values which don't have defaults set + try: + # Create lead form test data + api_response = api_instance.lead_form_test_create(ad_account_id, lead_form_id, lead_form_test_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling LeadFormsApi->lead_form_test_create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **lead_form_id** | **str**| Unique identifier of a lead form. | + **lead_form_test_request** | [**LeadFormTestRequest**](LeadFormTestRequest.md)| Subscription to create. | + +### Return type + +[**LeadFormTestResponse**](LeadFormTestResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid parameters. | - | +**404** | Lead not found. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **lead_forms_create** +> LeadFormArrayResponse lead_forms_create(ad_account_id, lead_form_create_request) + +Create lead forms + +This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. Create lead forms. Lead forms are used in lead ads and allow you to control what text appears on the lead form’ s description, questions and confirmation sections. For more, see Lead ads. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import lead_forms_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.lead_form_array_response import LeadFormArrayResponse +from openapi_generated.pinterest_client.model.lead_form_create_request import LeadFormCreateRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = lead_forms_api.LeadFormsApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + lead_form_create_request = [ + LeadFormCreateRequest(), + ] # [LeadFormCreateRequest] | List of lead forms to create, size limit [1, 30]. + + # example passing only required values which don't have defaults set + try: + # Create lead forms + api_response = api_instance.lead_forms_create(ad_account_id, lead_form_create_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling LeadFormsApi->lead_forms_create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **lead_form_create_request** | [**[LeadFormCreateRequest]**](LeadFormCreateRequest.md)| List of lead forms to create, size limit [1, 30]. | + +### Return type + +[**LeadFormArrayResponse**](LeadFormArrayResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account lead forms parameters. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **lead_forms_list** > bool, date, datetime, dict, float, int, list, str, none_type lead_forms_list(ad_account_id) -Get lead forms +List lead forms -Gets all Lead Forms associated with an ad account ID. Retrieving an advertiser's list of lead forms will only contain results if you're a part of the Lead ads beta. If you're interested in joining the beta, please reach out to your Pinterest account manager. +This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. List lead forms associated with an ad account ID. For more, see Lead ads. ### Example @@ -109,6 +287,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import lead_forms_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.lead_form_response import LeadFormResponse from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -132,13 +311,13 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lead_forms_api.LeadFormsApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) # example passing only required values which don't have defaults set try: - # Get lead forms + # List lead forms api_response = api_instance.lead_forms_list(ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: @@ -147,7 +326,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Get lead forms + # List lead forms api_response = api_instance.lead_forms_list(ad_account_id, page_size=page_size, order=order, bookmark=bookmark) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: @@ -160,7 +339,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ad_account_id** | **str**| Unique identifier of an ad account. | - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] @@ -188,3 +367,89 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **lead_forms_update** +> LeadFormArrayResponse lead_forms_update(ad_account_id, lead_form_update_request) + +Update lead forms + +This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. Update lead forms. Lead ads help you reach people who are actively looking for, and interested in, your goods and services. The lead form can be associated with an ad to allow people to fill out the form. For more, see Lead ads. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import lead_forms_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.lead_form_array_response import LeadFormArrayResponse +from openapi_generated.pinterest_client.model.lead_form_update_request import LeadFormUpdateRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = lead_forms_api.LeadFormsApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + lead_form_update_request = [ + LeadFormUpdateRequest(), + ] # [LeadFormUpdateRequest] | List of lead forms to update, size limit [1, 30]. + + # example passing only required values which don't have defaults set + try: + # Update lead forms + api_response = api_instance.lead_forms_update(ad_account_id, lead_form_update_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling LeadFormsApi->lead_forms_update: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **lead_form_update_request** | [**[LeadFormUpdateRequest]**](LeadFormUpdateRequest.md)| List of lead forms to update, size limit [1, 30]. | + +### Return type + +[**LeadFormArrayResponse**](LeadFormArrayResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account lead forms parameters. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/LeadsExportApi.md b/docs/LeadsExportApi.md new file mode 100644 index 0000000..0ec0e29 --- /dev/null +++ b/docs/LeadsExportApi.md @@ -0,0 +1,182 @@ +# openapi_generated.pinterest_client.LeadsExportApi + +All URIs are relative to *https://api.pinterest.com/v5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**leads_export_create**](LeadsExportApi.md#leads_export_create) | **POST** /ad_accounts/{ad_account_id}/leads_export | Create a request to export leads collected from a lead ad +[**leads_export_get**](LeadsExportApi.md#leads_export_get) | **GET** /ad_accounts/{ad_account_id}/leads_export/{leads_export_id} | Get the lead export from the lead export create call + + +# **leads_export_create** +> LeadsExportCreateResponse leads_export_create(ad_account_id, leads_export_create_request) + +Create a request to export leads collected from a lead ad + +This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. Create an export of leads collected from a lead ad. This returns a lead_export_id token that you can use to download the export when it is ready. Note: Lead ad data will be available up to 30 days after the lead has been submitted. For more, see Lead ads. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import leads_export_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.leads_export_create_request import LeadsExportCreateRequest +from openapi_generated.pinterest_client.model.leads_export_create_response import LeadsExportCreateResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = leads_export_api.LeadsExportApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + leads_export_create_request = LeadsExportCreateRequest( + start_date="2020-12-20", + end_date="2020-12-20", + ad_id="687201361754", + ) # LeadsExportCreateRequest | + + # example passing only required values which don't have defaults set + try: + # Create a request to export leads collected from a lead ad + api_response = api_instance.leads_export_create(ad_account_id, leads_export_create_request) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling LeadsExportApi->leads_export_create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **leads_export_create_request** | [**LeadsExportCreateRequest**](LeadsExportCreateRequest.md)| | + +### Return type + +[**LeadsExportCreateResponse**](LeadsExportCreateResponse.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account parameter. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **leads_export_get** +> LeadsExportResponseData leads_export_get(ad_account_id, leads_export_id) + +Get the lead export from the lead export create call + +This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. Get the export of leads collected from a lead ad. This returns a URL to a list of lead export given a lead_export_id token returned from the create a lead export call. You can use the URL to download the report. Note: Lead ad data will be available up to 30 days after the lead has been submitted. For more, see Lead ads. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import leads_export_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.leads_export_response_data import LeadsExportResponseData +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = leads_export_api.LeadsExportApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + leads_export_id = "123755885175" # str | lead_export_id token returned from the create a lead export endpoint + + # example passing only required values which don't have defaults set + try: + # Get the lead export from the lead export create call + api_response = api_instance.leads_export_get(ad_account_id, leads_export_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling LeadsExportApi->leads_export_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **leads_export_id** | **str**| lead_export_id token returned from the create a lead export endpoint | + +### Return type + +[**LeadsExportResponseData**](LeadsExportResponseData.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account parameter. | - | +**404** | Invalid leads export id parameter. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/LeadsExportCreateRequest.md b/docs/LeadsExportCreateRequest.md new file mode 100644 index 0000000..0c5a2e1 --- /dev/null +++ b/docs/LeadsExportCreateRequest.md @@ -0,0 +1,14 @@ +# LeadsExportCreateRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **str** | Export leads collected on and after start date (UTC). Format: YYYY-MM-DD | +**end_date** | **str** | Export leads collected on and before end date (UTC). Format: YYYY-MM-DD | +**ad_id** | **str** | ID for the ad collecting leads | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadsExportCreateResponse.md b/docs/LeadsExportCreateResponse.md new file mode 100644 index 0000000..1cc43c3 --- /dev/null +++ b/docs/LeadsExportCreateResponse.md @@ -0,0 +1,12 @@ +# LeadsExportCreateResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**leads_export_id** | **str** | ID for the leads export job | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadsExportResponseData.md b/docs/LeadsExportResponseData.md new file mode 100644 index 0000000..d42b47f --- /dev/null +++ b/docs/LeadsExportResponseData.md @@ -0,0 +1,13 @@ +# LeadsExportResponseData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**export_status** | [**LeadsExportStatus**](LeadsExportStatus.md) | | [optional] +**download_url** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LeadsExportStatus.md b/docs/LeadsExportStatus.md new file mode 100644 index 0000000..1b2d3b2 --- /dev/null +++ b/docs/LeadsExportStatus.md @@ -0,0 +1,12 @@ +# LeadsExportStatus + +Status of a leads export job + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Status of a leads export job | must be one of ["IN_PROGRESS", "FINISHED", "FAILED", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MMMReportingColumn.md b/docs/MMMReportingColumn.md new file mode 100644 index 0000000..488dbf3 --- /dev/null +++ b/docs/MMMReportingColumn.md @@ -0,0 +1,12 @@ +# MMMReportingColumn + +Marketing Mix Modeling (MMM) Reporting Columns + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Marketing Mix Modeling (MMM) Reporting Columns | must be one of ["SPEND_IN_DOLLAR", "SPEND_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "ECTR", "CAMPAIGN_NAME", "TOTAL_ENGAGEMENT", "EENGAGEMENT_RATE", "ECPM_IN_DOLLAR", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_GROUP_ID", "AD_GROUP_NAME", "CLICKTHROUGH_1", "IMPRESSION_1", "CLICKTHROUGH_2", "IMPRESSION_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "ADVERTISER_NAME", "SPEND_ORDER_LINE_PAID_TYPE", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MMMReportingTargetingType.md b/docs/MMMReportingTargetingType.md new file mode 100644 index 0000000..34f29e0 --- /dev/null +++ b/docs/MMMReportingTargetingType.md @@ -0,0 +1,12 @@ +# MMMReportingTargetingType + +Ad targeting types for MMM report + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Ad targeting types for MMM report | must be one of ["APPTYPE", "COUNTRY", "CREATIVE_TYPE", "GENDER", "LOCATION", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaApi.md b/docs/MediaApi.md index f9b7555..357c5f1 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -14,7 +14,7 @@ Method | HTTP request | Description Register media upload -Register your intent to upload media The response includes all of the information needed to upload the media to Pinterest. To upload the media, make an HTTP POST request (using curl, for example) to upload_url using the Content-Type header value. Send the media file's contents as the request's file parameter and also include all of the parameters from upload_parameters. Learn more about video Pin creation. +Register your intent to upload media The response includes all of the information needed to upload the media to Pinterest. To upload the media, make an HTTP POST request (using curl, for example) to upload_url using the Content-Type header value. Send the media file's contents as the request's file parameter and also include all of the parameters from upload_parameters. Learn more about video Pin creation. ### Example @@ -97,7 +97,7 @@ Name | Type | Description | Notes Get media upload details -Get details for a registered media upload, including its current status. Learn more about video Pin creation. +Get details for a registered media upload, including its current status. Learn more about video Pin creation. ### Example @@ -178,7 +178,7 @@ Name | Type | Description | Notes List media uploads -List media uploads filtered by given parameters. Learn more about video Pin creation. +List media uploads filtered by given parameters. Learn more about video Pin creation. ### Example @@ -189,6 +189,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import media_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.media_upload_details import MediaUploadDetails from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -213,7 +214,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = media_api.MediaApi(api_client) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set # and optional values @@ -231,7 +232,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 ### Return type diff --git a/docs/MediaType.md b/docs/MediaType.md new file mode 100644 index 0000000..a0b4135 --- /dev/null +++ b/docs/MediaType.md @@ -0,0 +1,11 @@ +# MediaType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | must be one of ["IMAGE", "VIDEO", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaTypeFilter.md b/docs/MediaTypeFilter.md new file mode 100644 index 0000000..b799804 --- /dev/null +++ b/docs/MediaTypeFilter.md @@ -0,0 +1,11 @@ +# MediaTypeFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**media_type** | **CatalogsProductGroupMultipleMediaTypesCriteria** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MemberBusinessRole.md b/docs/MemberBusinessRole.md new file mode 100644 index 0000000..6a9e30c --- /dev/null +++ b/docs/MemberBusinessRole.md @@ -0,0 +1,12 @@ +# MemberBusinessRole + +The access level a member/partner has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access ad accounts you assign to them. They cannot see details about other employees, external partners or other ad accounts.
- BIZ_ADMIN: Have full control of roles and can add employees, external partners as well as grant ad account access. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The access level a member/partner has to the business. Values are case-sensitive. <br> - EMPLOYEE: Can only view and access ad accounts you assign to them. They cannot see details about other employees, external partners or other ad accounts. <br> - BIZ_ADMIN: Have full control of roles and can add employees, external partners as well as grant ad account access. | must be one of ["EMPLOYEE", "BIZ_ADMIN", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MembersToDeleteBody.md b/docs/MembersToDeleteBody.md new file mode 100644 index 0000000..4c66130 --- /dev/null +++ b/docs/MembersToDeleteBody.md @@ -0,0 +1,12 @@ +# MembersToDeleteBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**[MembersToDeleteBodyMembers]**](MembersToDeleteBodyMembers.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MembersToDeleteBodyMembers.md b/docs/MembersToDeleteBodyMembers.md new file mode 100644 index 0000000..7aab6fc --- /dev/null +++ b/docs/MembersToDeleteBodyMembers.md @@ -0,0 +1,13 @@ +# MembersToDeleteBodyMembers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**member_id** | **str** | Unique identifier of the member | +**business_role** | [**BusinessRoleForMembers**](BusinessRoleForMembers.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MetricsReportingLevel.md b/docs/MetricsReportingLevel.md index 8583262..0372c87 100644 --- a/docs/MetricsReportingLevel.md +++ b/docs/MetricsReportingLevel.md @@ -5,7 +5,7 @@ Level of the reporting request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Level of the reporting request | must be one of ["ADVERTISER", "ADVERTISER_TARGETING", "CAMPAIGN", "CAMPAIGN_TARGETING", "AD_GROUP", "AD_GROUP_TARGETING", "PIN_PROMOTION", "PIN_PROMOTION_TARGETING", "KEYWORD", "PRODUCT_GROUP", "PRODUCT_GROUP_TARGETING", "PRODUCT_ITEM", ] +**value** | **str** | Level of the reporting request | must be one of ["ADVERTISER", "ADVERTISER_TARGETING", "CAMPAIGN", "CAMPAIGN_TARGETING", "AD_GROUP", "AD_GROUP_TARGETING", "PIN_PROMOTION", "PIN_PROMOTION_TARGETING", "KEYWORD", "PRODUCT_GROUP", "PRODUCT_GROUP_TARGETING", "PRODUCT_ITEM", "PRODUCT_ITEM_TARGETING", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OauthAccessTokenRequestClientCredentials.md b/docs/OauthAccessTokenRequestClientCredentials.md new file mode 100644 index 0000000..f9fcd23 --- /dev/null +++ b/docs/OauthAccessTokenRequestClientCredentials.md @@ -0,0 +1,14 @@ +# OauthAccessTokenRequestClientCredentials + +A request to receive a client token. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**grant_type** | **str** | | +**scope** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OauthAccessTokenRequestClientCredentialsAllOf.md b/docs/OauthAccessTokenRequestClientCredentialsAllOf.md new file mode 100644 index 0000000..31bf83c --- /dev/null +++ b/docs/OauthAccessTokenRequestClientCredentialsAllOf.md @@ -0,0 +1,12 @@ +# OauthAccessTokenRequestClientCredentialsAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OauthAccessTokenRequestCode.md b/docs/OauthAccessTokenRequestCode.md index 2a7d06c..a9f6187 100644 --- a/docs/OauthAccessTokenRequestCode.md +++ b/docs/OauthAccessTokenRequestCode.md @@ -5,9 +5,9 @@ A request to exchange an authorization code for an access token. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**grant_type** | **str** | | **code** | **str** | | **redirect_uri** | **str** | | -**grant_type** | **str** | | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OauthAccessTokenRequestRefresh.md b/docs/OauthAccessTokenRequestRefresh.md index 4343866..1f5fd21 100644 --- a/docs/OauthAccessTokenRequestRefresh.md +++ b/docs/OauthAccessTokenRequestRefresh.md @@ -5,9 +5,10 @@ A request to exchange a refresh token for a new access token. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**refresh_token** | **str** | | **grant_type** | **str** | | +**refresh_token** | **str** | | **scope** | **str** | | [optional] +**refresh_on** | **bool** | Setting this field to <code>true</code> will add a new refresh token to your 200 response, as well as the refresh_token_expires_in and refresh_token_expires_at fields. To see the structure of this payload, set the 200 response_type to \"everlasting_refresh\". | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OauthAccessTokenRequestRefreshAllOf.md b/docs/OauthAccessTokenRequestRefreshAllOf.md index 6e337e7..5819dd6 100644 --- a/docs/OauthAccessTokenRequestRefreshAllOf.md +++ b/docs/OauthAccessTokenRequestRefreshAllOf.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **refresh_token** | **str** | | **scope** | **str** | | [optional] +**refresh_on** | **bool** | Setting this field to <code>true</code> will add a new refresh token to your 200 response, as well as the refresh_token_expires_in and refresh_token_expires_at fields. To see the structure of this payload, set the 200 response_type to \"everlasting_refresh\". | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OauthAccessTokenResponseClientCredentials.md b/docs/OauthAccessTokenResponseClientCredentials.md new file mode 100644 index 0000000..4911e11 --- /dev/null +++ b/docs/OauthAccessTokenResponseClientCredentials.md @@ -0,0 +1,17 @@ +# OauthAccessTokenResponseClientCredentials + +A successful OAuth client token response for the client token flow. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**expires_in** | **int** | | +**scope** | **str** | | +**token_type** | **str** | | defaults to "bearer" +**response_type** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OauthAccessTokenResponseCode.md b/docs/OauthAccessTokenResponseCode.md index b05bbb3..2132113 100644 --- a/docs/OauthAccessTokenResponseCode.md +++ b/docs/OauthAccessTokenResponseCode.md @@ -5,11 +5,11 @@ A successful OAuth access token response for the authorization code flow. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**refresh_token** | **str** | | -**refresh_token_expires_in** | **int** | | **access_token** | **str** | | **expires_in** | **int** | | **scope** | **str** | | +**refresh_token** | **str** | | +**refresh_token_expires_in** | **int** | | **token_type** | **str** | | defaults to "bearer" **response_type** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/OauthAccessTokenResponseEverlastingRefresh.md b/docs/OauthAccessTokenResponseEverlastingRefresh.md new file mode 100644 index 0000000..535e199 --- /dev/null +++ b/docs/OauthAccessTokenResponseEverlastingRefresh.md @@ -0,0 +1,20 @@ +# OauthAccessTokenResponseEverlastingRefresh + +A successful OAuth access token response for the refresh token flow, with an added everlasting refresh token. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**expires_in** | **int** | | +**scope** | **str** | | +**refresh_token** | **str** | | +**refresh_token_expires_in** | **int** | | +**refresh_token_expires_at** | **int** | | +**token_type** | **str** | | defaults to "bearer" +**response_type** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OauthAccessTokenResponseEverlastingRefreshAllOf.md b/docs/OauthAccessTokenResponseEverlastingRefreshAllOf.md new file mode 100644 index 0000000..ceb7f25 --- /dev/null +++ b/docs/OauthAccessTokenResponseEverlastingRefreshAllOf.md @@ -0,0 +1,14 @@ +# OauthAccessTokenResponseEverlastingRefreshAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**refresh_token** | **str** | | +**refresh_token_expires_in** | **int** | | +**refresh_token_expires_at** | **int** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OauthAccessTokenResponseIntegrationRefresh.md b/docs/OauthAccessTokenResponseIntegrationRefresh.md index 2d38992..560a239 100644 --- a/docs/OauthAccessTokenResponseIntegrationRefresh.md +++ b/docs/OauthAccessTokenResponseIntegrationRefresh.md @@ -5,11 +5,11 @@ A successful OAuth access token response for the refresh token flow, with an add ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**refresh_token** | **str** | | -**refresh_token_expires_in** | **int** | | **access_token** | **str** | | **expires_in** | **int** | | **scope** | **str** | | +**refresh_token** | **str** | | +**refresh_token_expires_in** | **int** | | **token_type** | **str** | | defaults to "bearer" **response_type** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/OauthAccessTokenResponseRefreshAllOf.md b/docs/OauthAccessTokenResponseRefreshAllOf.md new file mode 100644 index 0000000..98c2120 --- /dev/null +++ b/docs/OauthAccessTokenResponseRefreshAllOf.md @@ -0,0 +1,16 @@ +# OauthAccessTokenResponseRefreshAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**expires_in** | **int** | | +**scope** | **str** | | +**token_type** | **str** | | defaults to "bearer" +**response_type** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OauthApi.md b/docs/OauthApi.md index d4cc14e..ff9d5cc 100644 --- a/docs/OauthApi.md +++ b/docs/OauthApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description Generate OAuth access token -Generate an OAuth access token by using an authorization code or a refresh token. IMPORTANT: You need to start the OAuth flow via www.pinterest.com/oauth before calling this endpoint (or have an existing refresh token). See Authentication for more. +Generate an OAuth access token by using an authorization code or a refresh token. IMPORTANT: You need to start the OAuth flow via www.pinterest.com/oauth before calling this endpoint (or have an existing refresh token). See Authentication for more. Parameter refresh_on and its corresponding response type everlasting_refresh are now available to all apps! Later this year, continuous refresh will become the default behavior (ie you will no longer need to send this parameter). Learn more. Grant type client_credentials and its corresponding response type are not fully available. You will likely get a default error if you attempt to use this grant_type. ### Example diff --git a/docs/ObjectiveType.md b/docs/ObjectiveType.md index 3b5594f..1856f50 100644 --- a/docs/ObjectiveType.md +++ b/docs/ObjectiveType.md @@ -1,11 +1,11 @@ # ObjectiveType -Campaign objective type. [\"WEB_SESSIONS\"] in BETA. +Campaign objective type. If set as one of [\"AWARENESS\", \"CONSIDERATION\", \"WEB_CONVERSION\", \"CATALOG_SALES\", \"VIDEO_COMPLETION\"] the campaign is considered as a Campaign Budget Optimization (CBO) campaign, meaning budget needs to be set at the campaign level rather than at the ad group level. [\"WEB_SESSIONS\"] is DEPRECATED. For update, only draft campaigns may update objective type. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Campaign objective type. [\"WEB_SESSIONS\"] in BETA. | must be one of ["AWARENESS", "CONSIDERATION", "VIDEO_VIEW", "WEB_CONVERSION", "CATALOG_SALES", "WEB_SESSIONS", ] +**value** | **str** | Campaign objective type. If set as one of [\"AWARENESS\", \"CONSIDERATION\", \"WEB_CONVERSION\", \"CATALOG_SALES\", \"VIDEO_COMPLETION\"] the campaign is considered as a Campaign Budget Optimization (CBO) campaign, meaning budget needs to be set at the campaign level rather than at the ad group level. [\"WEB_SESSIONS\"] is DEPRECATED. For update, only draft campaigns may update objective type. | must be one of ["AWARENESS", "CONSIDERATION", "VIDEO_VIEW", "WEB_CONVERSION", "CATALOG_SALES", "WEB_SESSIONS", "VIDEO_COMPLETION", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OperationType.md b/docs/OperationType.md new file mode 100644 index 0000000..f1035ce --- /dev/null +++ b/docs/OperationType.md @@ -0,0 +1,12 @@ +# OperationType + +Operation type to share a specific audience or revoke access to a previously shared audience + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Operation type to share a specific audience or revoke access to a previously shared audience | must be one of ["SHARE", "REVOKE", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptimizationGoalMetadataConversionTagV3GoalMetadata.md b/docs/OptimizationGoalMetadataConversionTagV3GoalMetadata.md index ddd4c3b..32ddf1b 100644 --- a/docs/OptimizationGoalMetadataConversionTagV3GoalMetadata.md +++ b/docs/OptimizationGoalMetadataConversionTagV3GoalMetadata.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **conversion_event** | **str** | | [optional] **conversion_tag_id** | **str** | | [optional] **cpa_goal_value_in_micro_currency** | **str** | | [optional] -**is_roas_optimized** | **bool, none_type** | Ad group is ROAS optimized | [optional] +**is_roas_optimized** | **bool, none_type** | ROAS optimization is not supported | [optional] **learning_mode_type** | **str, none_type** | Conversion learning model type | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/OrderLinesApi.md b/docs/OrderLinesApi.md index b27b907..1ed5cf9 100644 --- a/docs/OrderLinesApi.md +++ b/docs/OrderLinesApi.md @@ -105,6 +105,7 @@ List existing order lines associated with an ad account. import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import order_lines_api +from openapi_generated.pinterest_client.model.order_line import OrderLine from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint @@ -130,7 +131,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = order_lines_api.OrderLinesApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) @@ -158,7 +159,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ad_account_id** | **str**| Unique identifier of an ad account. | - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] diff --git a/docs/PartnerType.md b/docs/PartnerType.md new file mode 100644 index 0000000..c1467d0 --- /dev/null +++ b/docs/PartnerType.md @@ -0,0 +1,11 @@ +# PartnerType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | must be one of ["INTERNAL", "EXTERNAL", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Permissions.md b/docs/Permissions.md new file mode 100644 index 0000000..5bd23eb --- /dev/null +++ b/docs/Permissions.md @@ -0,0 +1,11 @@ +# Permissions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | must be one of ["ADMIN", "ANALYST", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "PROFILE_PUBLISHER", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PermissionsResponse.md b/docs/PermissionsResponse.md new file mode 100644 index 0000000..2b6f297 --- /dev/null +++ b/docs/PermissionsResponse.md @@ -0,0 +1,12 @@ +# PermissionsResponse + +Permission levels member or partner has on an asset. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **[str]** | Permission levels member or partner has on an asset. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PermissionsWithOwner.md b/docs/PermissionsWithOwner.md new file mode 100644 index 0000000..b0ab3dd --- /dev/null +++ b/docs/PermissionsWithOwner.md @@ -0,0 +1,11 @@ +# PermissionsWithOwner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | must be one of ["ADMIN", "ANALYST", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "CATALOGS_VIEWER", "PROFILE_PUBLISHER", "OWNER", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Pin.md b/docs/Pin.md index b3957c8..68fa728 100644 --- a/docs/Pin.md +++ b/docs/Pin.md @@ -20,9 +20,10 @@ Name | Type | Description | Notes **media** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] [readonly] **media_source** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] **parent_pin_id** | **str, none_type** | The source pin id if this pin was saved from another pin. <a href=\"https://help.pinterest.com/article/save-pins-on-pinterest\">Learn more</a>. | [optional] -**is_standard** | **bool** | Whether the Pin is standard or not. See documentation on <a href=\"https://developers.pinterest.com/docs/content/update/\">Changes to Pin creation</a> for more information. | [optional] +**is_standard** | **bool** | Whether the Pin is standard or not. See documentation on <a href=\"/docs/api-features/content-overview/\">Changes to Pin creation</a> for more information. | [optional] **has_been_promoted** | **bool** | Whether the Pin has been promoted or not. | [optional] [readonly] **note** | **str, none_type** | Private note for this Pin. <a href=\"https://help.pinterest.com/en/article/add-notes-to-your-pins\">Learn more</a>. | [optional] +**pin_metrics** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Pin metrics with associated time intervals if any. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PinAnalyticsMetricsResponse.md b/docs/PinAnalyticsMetricsResponse.md index 7af514f..746b196 100644 --- a/docs/PinAnalyticsMetricsResponse.md +++ b/docs/PinAnalyticsMetricsResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **lifetime_metrics** | **{str: (int,)}** | The lifetime metric name and value. | [optional] -**daily_metrics** | [**[AnalyticsDailyMetrics]**](AnalyticsDailyMetrics.md) | Array with the requested daily metric records | [optional] +**daily_metrics** | [**[PinAnalyticsMetricsResponseDailyMetrics]**](PinAnalyticsMetricsResponseDailyMetrics.md) | Array with the requested daily metric records | [optional] **summary_metrics** | **{str: (float,)}** | The metric name and value over the requested period for each requested metric | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/PinAnalyticsMetricsResponseDailyMetrics.md b/docs/PinAnalyticsMetricsResponseDailyMetrics.md new file mode 100644 index 0000000..354372a --- /dev/null +++ b/docs/PinAnalyticsMetricsResponseDailyMetrics.md @@ -0,0 +1,14 @@ +# PinAnalyticsMetricsResponseDailyMetrics + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_status** | [**DataStatus**](DataStatus.md) | | [optional] +**date** | **str** | Metrics date (UTC): YYYY-MM-DD. | [optional] +**metrics** | **{str: (float,)}** | The metric name and daily value for each requested metric | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PinMediaMetadata.md b/docs/PinMediaMetadata.md index 4db1947..77fbaa1 100644 --- a/docs/PinMediaMetadata.md +++ b/docs/PinMediaMetadata.md @@ -8,8 +8,9 @@ Name | Type | Description | Notes **title** | **str, none_type** | | [optional] **description** | **str, none_type** | | [optional] **link** | **str, none_type** | | [optional] -**images** | [**{str: (ImageDetails,)}**](ImageDetails.md) | | [optional] +**images** | [**ImageMetadataImages**](ImageMetadataImages.md) | | [optional] **cover_image_url** | **str** | | [optional] +**video_url** | **str, none_type** | Video url (720p). </p><strong>Note:</strong> This field is limited and not available to all apps. | [optional] **duration** | **float** | Duration (in milliseconds) | [optional] **height** | **int** | Height (in pixels) | [optional] **width** | **int** | Width (in pixels) | [optional] diff --git a/docs/PinMediaSource.md b/docs/PinMediaSource.md index 720feb7..3cb02b0 100644 --- a/docs/PinMediaSource.md +++ b/docs/PinMediaSource.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **cover_image_content_type** | **str** | Content type for cover image Base64. | [optional] **cover_image_data** | **str** | Cover image Base64. | [optional] **index** | **int** | | [optional] +**is_affiliate_link** | **bool** | This is an affiliate link or sponsored product. The FTC requires disclosure for paid partnerships and affiliate products. | [optional] if omitted the server will use the default value of False **content_type** | **str** | | [optional] **data** | **str** | | [optional] **url** | **str** | | [optional] diff --git a/docs/PinMediaSourcePinURL.md b/docs/PinMediaSourcePinURL.md index e87c455..6e5565b 100644 --- a/docs/PinMediaSourcePinURL.md +++ b/docs/PinMediaSourcePinURL.md @@ -6,6 +6,7 @@ Pin URL-based media source for product pin creation. Currently the field is only Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **source_type** | **str** | | defaults to "pin_url" +**is_affiliate_link** | **bool** | This is an affiliate link or sponsored product. The FTC requires disclosure for paid partnerships and affiliate products. | [optional] if omitted the server will use the default value of False **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PinMediaWithImage.md b/docs/PinMediaWithImage.md index 6a20da3..d8da20d 100644 --- a/docs/PinMediaWithImage.md +++ b/docs/PinMediaWithImage.md @@ -5,7 +5,7 @@ Pin with image. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**images** | [**{str: (ImageDetails,)}**](ImageDetails.md) | | [optional] +**images** | [**ImageMetadataImages**](ImageMetadataImages.md) | | [optional] **media_type** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/PinMediaWithImageAllOf.md b/docs/PinMediaWithImageAllOf.md index 1fb21bb..01abf00 100644 --- a/docs/PinMediaWithImageAllOf.md +++ b/docs/PinMediaWithImageAllOf.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**images** | [**{str: (ImageDetails,)}**](ImageDetails.md) | | [optional] +**images** | [**ImageMetadataImages**](ImageMetadataImages.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PinMediaWithVideo.md b/docs/PinMediaWithVideo.md index 9b75691..80dce57 100644 --- a/docs/PinMediaWithVideo.md +++ b/docs/PinMediaWithVideo.md @@ -5,8 +5,9 @@ Pin with video. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**images** | [**{str: (ImageDetails,)}**](ImageDetails.md) | | [optional] +**images** | [**ImageMetadataImages**](ImageMetadataImages.md) | | [optional] **cover_image_url** | **str** | | [optional] +**video_url** | **str, none_type** | Video url (720p). </p><strong>Note:</strong> This field is limited and not available to all apps. | [optional] **duration** | **float** | Duration (in milliseconds) | [optional] **height** | **int** | Height (in pixels) | [optional] **width** | **int** | Width (in pixels) | [optional] diff --git a/docs/PinMediaWithVideoAllOf.md b/docs/PinMediaWithVideoAllOf.md index fafe262..24b0204 100644 --- a/docs/PinMediaWithVideoAllOf.md +++ b/docs/PinMediaWithVideoAllOf.md @@ -4,8 +4,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**images** | [**{str: (ImageDetails,)}**](ImageDetails.md) | | [optional] +**images** | [**ImageMetadataImages**](ImageMetadataImages.md) | | [optional] **cover_image_url** | **str** | | [optional] +**video_url** | **str, none_type** | Video url (720p). </p><strong>Note:</strong> This field is limited and not available to all apps. | [optional] **duration** | **float** | Duration (in milliseconds) | [optional] **height** | **int** | Height (in pixels) | [optional] **width** | **int** | Width (in pixels) | [optional] diff --git a/docs/PinPromotionSummaryStatus.md b/docs/PinPromotionSummaryStatus.md index 6d29971..40228e2 100644 --- a/docs/PinPromotionSummaryStatus.md +++ b/docs/PinPromotionSummaryStatus.md @@ -5,7 +5,7 @@ Summary status for pin promotions ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Summary status for pin promotions | must be one of ["APPROVED", "PAUSED", "PENDING", "REJECTED", "ADVERTISER_DISABLED", "ARCHIVED", ] +**value** | **str** | Summary status for pin promotions | must be one of ["APPROVED", "PAUSED", "PENDING", "REJECTED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PinUpdate.md b/docs/PinUpdate.md index 9993e7d..8e03db4 100644 --- a/docs/PinUpdate.md +++ b/docs/PinUpdate.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **alt_text** | **str, none_type** | Pin's alternative text. | [optional] **board_id** | **str, none_type** | The id of the board to move the Pin onto. | [optional] **board_section_id** | **str, none_type** | <a href=\"https://help.pinterest.com/en/article/create-a-board-section\">Board section</a> ID. | [optional] -**description** | **str, none_type** | Pin description - 500 characters maximum. | [optional] +**description** | **str, none_type** | Pin description - 800 characters maximum. | [optional] **link** | **str, none_type** | URL viewer is taken to when they click pin. | [optional] **title** | **str, none_type** | The native pin title that creators explicitly prefer to display. | [optional] **carousel_slots** | [**[PinUpdateCarouselSlots]**](PinUpdateCarouselSlots.md) | Carousel Pin slots data. | [optional] diff --git a/docs/PinsApi.md b/docs/PinsApi.md index 97dcf2d..62a5308 100644 --- a/docs/PinsApi.md +++ b/docs/PinsApi.md @@ -4,6 +4,7 @@ All URIs are relative to *https://api.pinterest.com/v5* Method | HTTP request | Description ------------- | ------------- | ------------- +[**multi_pins_analytics**](PinsApi.md#multi_pins_analytics) | **GET** /pins/analytics | Get multiple Pin analytics [**pins_analytics**](PinsApi.md#pins_analytics) | **GET** /pins/{pin_id}/analytics | Get Pin analytics [**pins_create**](PinsApi.md#pins_create) | **POST** /pins | Create Pin [**pins_delete**](PinsApi.md#pins_delete) | **DELETE** /pins/{pin_id} | Delete Pin @@ -13,15 +14,130 @@ Method | HTTP request | Description [**pins_update**](PinsApi.md#pins_update) | **PATCH** /pins/{pin_id} | Update Pin +# **multi_pins_analytics** +> BulkPinAnalyticsResponse multi_pins_analytics(pin_ids, start_date, end_date, metric_types) + +Get multiple Pin analytics + +This endpoint is currently in beta and not available to all apps. Learn more. Get analytics for multiple pins owned by the \"operation user_account\" - or on a group board that has been shared with this account. - The maximum number of pins supported in a single request is 100. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: - For Pins on public or protected boards: Admin, Analyst. - For Pins on secret boards: Admin. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. + +### Example + +* OAuth Authentication (client_credentials): +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import pins_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.bulk_pin_analytics_response import BulkPinAnalyticsResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pins_api.PinsApi(api_client) + pin_ids = [ + "4", + ] # [str] | List of Pin IDs. + start_date = dateutil_parser('1970-01-01').date() # date | Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. + end_date = dateutil_parser('1970-01-01').date() # date | Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. + metric_types = [ + None, + ] # [bool, date, datetime, dict, float, int, list, str, none_type] | Pin metric types to get data for. + app_types = "ALL" # str | Apps or devices to get data for, default is all. (optional) if omitted the server will use the default value of "ALL" + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + + # example passing only required values which don't have defaults set + try: + # Get multiple Pin analytics + api_response = api_instance.multi_pins_analytics(pin_ids, start_date, end_date, metric_types) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling PinsApi->multi_pins_analytics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get multiple Pin analytics + api_response = api_instance.multi_pins_analytics(pin_ids, start_date, end_date, metric_types, app_types=app_types, ad_account_id=ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling PinsApi->multi_pins_analytics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pin_ids** | **[str]**| List of Pin IDs. | + **start_date** | **date**| Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. | + **end_date** | **date**| Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. | + **metric_types** | [**[bool, date, datetime, dict, float, int, list, str, none_type]**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Pin metric types to get data for. | + **app_types** | **str**| Apps or devices to get data for, default is all. | [optional] if omitted the server will use the default value of "ALL" + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + +### Return type + +[**BulkPinAnalyticsResponse**](BulkPinAnalyticsResponse.md) + +### Authorization + +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | response | - | +**400** | Invalid pins analytics parameters. | - | +**401** | Not authorized to access board or Pin. | - | +**404** | Pin not found. | - | +**429** | This request exceeded a rate limit. This can happen if the client exceeds one of the published rate limits or if multiple write operations are applied to an object within a short time window. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **pins_analytics** > PinAnalyticsResponse pins_analytics(pin_id, start_date, end_date, metric_types) Get Pin analytics -Get analytics for a Pin owned by the \"operation user_account\" - or on a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: - For Pins on public or protected boards: Admin, Analyst. - For Pins on secret boards: Admin. +Get analytics for a Pin owned by the \"operation user_account\" - or on a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: - For Pins on public or protected boards: Admin, Analyst. - For Pins on secret boards: Admin. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -42,6 +158,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -57,7 +179,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: end_date = dateutil_parser('1970-01-01').date() # date | Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. metric_types = [ None, - ] # [bool, date, datetime, dict, float, int, list, str, none_type] | Pin metric types to get data for, default is all. + ] # [bool, date, datetime, dict, float, int, list, str, none_type] | Pin metric types to get data for. VIDEO_MRC_VIEW are Video views, VIDEO_V50_WATCH_TIME is Total play time. If Pin was created before 2023-03-20, Profile visits and Follows will only be available for Idea Pins. These metrics are available for all Pin formats since then. Keep in mind this cannot have ALL if split_field is set to any value other than NO_SPLIT. app_types = "ALL" # str | Apps or devices to get data for, default is all. (optional) if omitted the server will use the default value of "ALL" split_field = "NO_SPLIT" # str | How to split the data into groups. Not including this param means data won't be split. (optional) if omitted the server will use the default value of "NO_SPLIT" ad_account_id = "4" # str | Unique identifier of an ad account. (optional) @@ -88,7 +210,7 @@ Name | Type | Description | Notes **pin_id** | **str**| Unique identifier of a Pin. | **start_date** | **date**| Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. | **end_date** | **date**| Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. | - **metric_types** | [**[bool, date, datetime, dict, float, int, list, str, none_type]**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Pin metric types to get data for, default is all. | + **metric_types** | [**[bool, date, datetime, dict, float, int, list, str, none_type]**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Pin metric types to get data for. VIDEO_MRC_VIEW are Video views, VIDEO_V50_WATCH_TIME is Total play time. If Pin was created before <code>2023-03-20</code>, Profile visits and Follows will only be available for Idea Pins. These metrics are available for all Pin formats since then. Keep in mind this cannot have ALL if split_field is set to any value other than <code>NO_SPLIT</code>. | **app_types** | **str**| Apps or devices to get data for, default is all. | [optional] if omitted the server will use the default value of "ALL" **split_field** | **str**| How to split the data into groups. Not including this param means data won't be split. | [optional] if omitted the server will use the default value of "NO_SPLIT" **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] @@ -99,7 +221,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -124,7 +246,7 @@ Name | Type | Description | Notes Create Pin -Create a Pin on a board or board section owned by the \"operation user_account\". Note: If the current \"operation user_account\" (defined by the access token) has access to another user's Ad Accounts via Pinterest Business Access, you can modify your request to make use of the current operation_user_account's permissions to those Ad Accounts by including the ad_account_id in the path parameters for the request (e.g. .../?ad_account_id=12345&...). - This function is intended solely for publishing new content created by the user. If you are interested in saving content created by others to your Pinterest boards, sometimes called 'curated content', please use our Save button instead. For more tips on creating fresh content for Pinterest, review our Content App Solutions Guide. Learn more about video Pin creation. +Create a Pin on a board or board section owned by the \"operation user_account\". Note: If the current \"operation user_account\" (defined by the access token) has access to another user's Ad Accounts via Pinterest Business Access, you can modify your request to make use of the current operation_user_account's permissions to those Ad Accounts by including the ad_account_id in the path parameters for the request (e.g. .../?ad_account_id=12345&...). - This function is intended solely for publishing new content created by the user. If you are interested in saving content created by others to your Pinterest boards, sometimes called 'curated content', please use our Save button instead. For more tips on creating fresh content for Pinterest, review our Content App Solutions Guide. Learn more about video Pin creation. ### Example @@ -325,6 +447,7 @@ Get a Pin owned by the \"operation user_account\" - or on a group board that has ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -345,6 +468,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -356,6 +485,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = pins_api.PinsApi(api_client) pin_id = "pin_id_example" # str | Unique identifier of a Pin. + pin_metrics = False # bool | Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. (optional) if omitted the server will use the default value of False ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set @@ -370,7 +500,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # and optional values try: # Get Pin - api_response = api_instance.pins_get(pin_id, ad_account_id=ad_account_id) + api_response = api_instance.pins_get(pin_id, pin_metrics=pin_metrics, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling PinsApi->pins_get: %s\n" % e) @@ -382,6 +512,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pin_id** | **str**| Unique identifier of a Pin. | + **pin_metrics** | **bool**| Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before <code>2023-03-20</code> lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. | [optional] if omitted the server will use the default value of False **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type @@ -390,7 +521,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -414,10 +545,11 @@ Name | Type | Description | Notes List Pins -Get a list of the Pins owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. - All Pins owned by the \"operation user_account\" are included, regardless of who owns the board they are on. Optional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". +Get a list of the Pins owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. - All Pins owned by the \"operation user_account\" are included, regardless of who owns the board they are on. Optional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". Disclaimer: there are known performance issues when filtering by field creative_type and including protected pins. If your request is timing out in this scenario we encourage you to use GET List Pins on Board. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -425,6 +557,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import pins_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.pin import Pin from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -438,6 +571,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -449,6 +588,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = pins_api.PinsApi(api_client) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 pin_filter = "exclude_native" # str | Pin filter. (optional) include_protected_pins = False # bool | Specify if return pins from protected boards (optional) if omitted the server will use the default value of False pin_type = "PRIVATE" # str | The type of pins to return, currently only enabled for private pins (optional) if omitted the server will use the default value of "PRIVATE" @@ -456,12 +596,13 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: "REGULAR", ] # [str] | Pin creative types filter.

Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead. (optional) ad_account_id = "4" # str | Unique identifier of an ad account. (optional) + pin_metrics = False # bool | Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. (optional) if omitted the server will use the default value of False # example passing only required values which don't have defaults set # and optional values try: # List Pins - api_response = api_instance.pins_list(bookmark=bookmark, pin_filter=pin_filter, include_protected_pins=include_protected_pins, pin_type=pin_type, creative_types=creative_types, ad_account_id=ad_account_id) + api_response = api_instance.pins_list(bookmark=bookmark, page_size=page_size, pin_filter=pin_filter, include_protected_pins=include_protected_pins, pin_type=pin_type, creative_types=creative_types, ad_account_id=ad_account_id, pin_metrics=pin_metrics) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling PinsApi->pins_list: %s\n" % e) @@ -473,11 +614,13 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **pin_filter** | **str**| Pin filter. | [optional] **include_protected_pins** | **bool**| Specify if return pins from protected boards | [optional] if omitted the server will use the default value of False **pin_type** | **str**| The type of pins to return, currently only enabled for private pins | [optional] if omitted the server will use the default value of "PRIVATE" **creative_types** | **[str]**| Pin creative types filter. </p><strong>Note:</strong> SHOP_THE_PIN has been deprecated. Please use COLLECTION instead. | [optional] **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] + **pin_metrics** | **bool**| Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before <code>2023-03-20</code> lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. | [optional] if omitted the server will use the default value of False ### Return type @@ -485,7 +628,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -504,7 +647,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **pins_save** -> Pin pins_save(pin_id, inline_object) +> Pin pins_save(pin_id, inline_object1) Save Pin @@ -520,7 +663,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import pins_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.pin import Pin -from openapi_generated.pinterest_client.model.inline_object import InlineObject +from openapi_generated.pinterest_client.model.inline_object1 import InlineObject1 from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -544,16 +687,16 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = pins_api.PinsApi(api_client) pin_id = "pin_id_example" # str | Unique identifier of a Pin. - inline_object = InlineObject( + inline_object1 = InlineObject1( board_id="4", board_section_id="4", - ) # InlineObject | + ) # InlineObject1 | ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: # Save Pin - api_response = api_instance.pins_save(pin_id, inline_object) + api_response = api_instance.pins_save(pin_id, inline_object1) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling PinsApi->pins_save: %s\n" % e) @@ -562,7 +705,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # and optional values try: # Save Pin - api_response = api_instance.pins_save(pin_id, inline_object, ad_account_id=ad_account_id) + api_response = api_instance.pins_save(pin_id, inline_object1, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling PinsApi->pins_save: %s\n" % e) @@ -574,7 +717,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pin_id** | **str**| Unique identifier of a Pin. | - **inline_object** | [**InlineObject**](InlineObject.md)| | + **inline_object1** | [**InlineObject1**](InlineObject1.md)| | **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type @@ -607,7 +750,7 @@ Name | Type | Description | Notes Update Pin -Update a pin owned by the \"operating user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: - For Pins on public or protected boards: Owner, Admin, Analyst, Campaign Manager. - For Pins on secret boards: Owner, Admin. This endpoint is currently in beta and not available to all apps. Learn more. +Update a pin owned by the \"operating user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: - For Pins on public or protected boards: Owner, Admin, Analyst, Campaign Manager. - For Pins on secret boards: Owner, Admin. This endpoint is currently in beta and not available to all apps. Learn more. ### Example diff --git a/docs/PlacementGroupType.md b/docs/PlacementGroupType.md index 642d18e..ead4786 100644 --- a/docs/PlacementGroupType.md +++ b/docs/PlacementGroupType.md @@ -5,7 +5,7 @@ Campaign placement group type ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Campaign placement group type | must be one of ["ALL", "SEARCH", "BROWSE", "OTHER", ] +**value** | **str** | Campaign placement group type | defaults to "ALL", must be one of ["ALL", "SEARCH", "BROWSE", "OTHER", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PlacementMultipliers.md b/docs/PlacementMultipliers.md new file mode 100644 index 0000000..049e452 --- /dev/null +++ b/docs/PlacementMultipliers.md @@ -0,0 +1,13 @@ +# PlacementMultipliers + +This represents a mapping from placement to a bid price adjustment. Multiplier values must be between 0 and 10. A value of 10 represents a 900% increase in bid price (from $1 to $10 for example). A value of 0 will stop distribution for this item on the specified placement in `MAX_BID` ad groups in `CATALOG_SALES` campaigns. All placement multipliers must be set at the same time. If a multiplier is not provided it is assumed to be 1 (no bid adjustment). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**placement** | **str** | | [optional] +**any string name** | **float** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PriceFilter.md b/docs/PriceFilter.md new file mode 100644 index 0000000..7bf9846 --- /dev/null +++ b/docs/PriceFilter.md @@ -0,0 +1,11 @@ +# PriceFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**price** | [**CatalogsProductGroupPricingCurrencyCriteria**](CatalogsProductGroupPricingCurrencyCriteria.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProductGroupPromotion.md b/docs/ProductGroupPromotion.md index 1d85fb2..19b0a6f 100644 --- a/docs/ProductGroupPromotion.md +++ b/docs/ProductGroupPromotion.md @@ -18,9 +18,9 @@ Name | Type | Description | Notes **tracking_url** | **str, none_type** | Tracking template for proudct group promotions. 4000 limit | [optional] **catalog_product_group_id** | **str, none_type** | ID of the catalogs product group that this product group promotion references | [optional] **catalog_product_group_name** | **str, none_type** | Catalogs product group name | [optional] -**creative_type** | [**CreativeType**](CreativeType.md) | | [optional] **collections_hero_pin_id** | **str, none_type** | Hero Pin ID if this PG is promoted as a Collection | [optional] **collections_hero_destination_url** | **str, none_type** | Collections Hero Destination Url | [optional] +**grid_click_type** | [**GridClickType**](GridClickType.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProductGroupPromotionCreateRequest.md b/docs/ProductGroupPromotionCreateRequest.md index aee49d8..ddbaa7d 100644 --- a/docs/ProductGroupPromotionCreateRequest.md +++ b/docs/ProductGroupPromotionCreateRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ad_group_id** | **str** | ID of the Ad Group the Product Group Promotion belongs to. | -**product_group_promotion** | [**[ProductGroupPromotion]**](ProductGroupPromotion.md) | | +**product_group_promotion** | [**[ProductGroupPromotionCreateRequestElement]**](ProductGroupPromotionCreateRequestElement.md) | | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProductGroupPromotionCreateRequestElement.md b/docs/ProductGroupPromotionCreateRequestElement.md new file mode 100644 index 0000000..1f2b929 --- /dev/null +++ b/docs/ProductGroupPromotionCreateRequestElement.md @@ -0,0 +1,29 @@ +# ProductGroupPromotionCreateRequestElement + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the product group promotion. | [optional] +**ad_group_id** | **str** | ID of the ad group the product group belongs to. | [optional] +**bid_in_micro_currency** | **int, none_type** | The bid in micro currency. | [optional] +**included** | **bool, none_type** | True if the group is BIDDABLE, false if it should be EXCLUDED from serving ads. | [optional] +**definition** | **str, none_type** | The full product group definition path | [optional] +**relative_definition** | **str, none_type** | The definition of the product group, relative to its parent - an attribute name/value pair | [optional] +**parent_id** | **str, none_type** | The parent Product Group ID of this Product Group | [optional] +**slideshow_collections_title** | **str, none_type** | Slideshow Collections Title | [optional] +**slideshow_collections_description** | **str, none_type** | Slideshow Collections Description | [optional] +**is_mdl** | **bool, none_type** | If set to true products promoted in this product group will use the Mobile Deep Link specified in your catalog | [optional] +**status** | [**EntityStatus**](EntityStatus.md) | | [optional] +**tracking_url** | **str, none_type** | Tracking template for proudct group promotions. 4000 limit | [optional] +**catalog_product_group_id** | **str, none_type** | ID of the catalogs product group that this product group promotion references | [optional] +**catalog_product_group_name** | **str, none_type** | Catalogs product group name | [optional] +**collections_hero_pin_id** | **str, none_type** | Hero Pin ID if this PG is promoted as a Collection | [optional] +**collections_hero_destination_url** | **str, none_type** | Collections Hero Destination Url | [optional] +**grid_click_type** | [**GridClickType**](GridClickType.md) | | [optional] +**creative_type** | [**CreativeType**](CreativeType.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProductGroupPromotionCreateRequestElementAllOf.md b/docs/ProductGroupPromotionCreateRequestElementAllOf.md new file mode 100644 index 0000000..5cb70a2 --- /dev/null +++ b/docs/ProductGroupPromotionCreateRequestElementAllOf.md @@ -0,0 +1,12 @@ +# ProductGroupPromotionCreateRequestElementAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creative_type** | [**CreativeType**](CreativeType.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProductGroupPromotionResponseElement.md b/docs/ProductGroupPromotionResponseElement.md new file mode 100644 index 0000000..5eb5f5c --- /dev/null +++ b/docs/ProductGroupPromotionResponseElement.md @@ -0,0 +1,29 @@ +# ProductGroupPromotionResponseElement + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the product group promotion. | [optional] +**ad_group_id** | **str** | ID of the ad group the product group belongs to. | [optional] +**bid_in_micro_currency** | **int, none_type** | The bid in micro currency. | [optional] +**included** | **bool, none_type** | True if the group is BIDDABLE, false if it should be EXCLUDED from serving ads. | [optional] +**definition** | **str, none_type** | The full product group definition path | [optional] +**relative_definition** | **str, none_type** | The definition of the product group, relative to its parent - an attribute name/value pair | [optional] +**parent_id** | **str, none_type** | The parent Product Group ID of this Product Group | [optional] +**slideshow_collections_title** | **str, none_type** | Slideshow Collections Title | [optional] +**slideshow_collections_description** | **str, none_type** | Slideshow Collections Description | [optional] +**is_mdl** | **bool, none_type** | If set to true products promoted in this product group will use the Mobile Deep Link specified in your catalog | [optional] +**status** | [**EntityStatus**](EntityStatus.md) | | [optional] +**tracking_url** | **str, none_type** | Tracking template for proudct group promotions. 4000 limit | [optional] +**catalog_product_group_id** | **str, none_type** | ID of the catalogs product group that this product group promotion references | [optional] +**catalog_product_group_name** | **str, none_type** | Catalogs product group name | [optional] +**collections_hero_pin_id** | **str, none_type** | Hero Pin ID if this PG is promoted as a Collection | [optional] +**collections_hero_destination_url** | **str, none_type** | Collections Hero Destination Url | [optional] +**grid_click_type** | [**GridClickType**](GridClickType.md) | | [optional] +**creative_type** | [**CreativeType**](CreativeType.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProductGroupPromotionResponseItem.md b/docs/ProductGroupPromotionResponseItem.md index f3ddcda..13b10b4 100644 --- a/docs/ProductGroupPromotionResponseItem.md +++ b/docs/ProductGroupPromotionResponseItem.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**ProductGroupPromotion**](ProductGroupPromotion.md) | | [optional] +**data** | [**ProductGroupPromotionResponseElement**](ProductGroupPromotionResponseElement.md) | | [optional] **exceptions** | [**[Exception], none_type**](Exception.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/ProductGroupPromotionsApi.md b/docs/ProductGroupPromotionsApi.md index be21372..1b6aa2c 100644 --- a/docs/ProductGroupPromotionsApi.md +++ b/docs/ProductGroupPromotionsApi.md @@ -55,25 +55,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: product_group_promotion_create_request = ProductGroupPromotionCreateRequest( ad_group_id="2680059592705", product_group_promotion=[ - ProductGroupPromotion( - id="2680059592705", - ad_group_id="2680059592705", - bid_in_micro_currency=14000000, - included=True, - definition="*/product_type_0='kitchen'/product_type_1='beverage appliances'", - relative_definition="product_type_1='beverage appliances'", - parent_id="1231234", - slideshow_collections_title="slideshow title", - slideshow_collections_description="slideshow description", - is_mdl=True, - status=EntityStatus("ACTIVE"), - tracking_url="https://www.pinterest.com", - catalog_product_group_id="1231235", - catalog_product_group_name="catalogProductGroupName", - creative_type=CreativeType("REGULAR"), - collections_hero_pin_id="123123", - collections_hero_destination_url="http://www.pinterest.com", - ), + ProductGroupPromotionCreateRequestElement(), ], ) # ProductGroupPromotionCreateRequest | List of Product Group Promotions to create, size limit [1, 30]. @@ -216,6 +198,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import product_group_promotions_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.product_group_promotion_response_item import ProductGroupPromotionResponseItem from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -244,7 +227,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: ] # [str] | List of Product group promotion Ids. (optional) entity_statuses = ["ACTIVE","PAUSED"] # [str] | Entity status (optional) if omitted the server will use the default value of ["ACTIVE","PAUSED"] ad_group_id = "123123123" # str | Ad group Id. (optional) - page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) @@ -275,7 +258,7 @@ Name | Type | Description | Notes **product_group_promotion_ids** | **[str]**| List of Product group promotion Ids. | [optional] **entity_statuses** | **[str]**| Entity status | [optional] if omitted the server will use the default value of ["ACTIVE","PAUSED"] **ad_group_id** | **str**| Ad group Id. | [optional] - **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] @@ -361,9 +344,9 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: tracking_url="https://www.pinterest.com", catalog_product_group_id="1231235", catalog_product_group_name="catalogProductGroupName", - creative_type=CreativeType("REGULAR"), collections_hero_pin_id="123123", collections_hero_destination_url="http://www.pinterest.com", + grid_click_type=GridClickType("CLOSEUP"), ), ], ) # ProductGroupPromotionUpdateRequest | Parameters to update Product group promotions diff --git a/docs/ProductGroupReferenceFilter.md b/docs/ProductGroupReferenceFilter.md new file mode 100644 index 0000000..6997345 --- /dev/null +++ b/docs/ProductGroupReferenceFilter.md @@ -0,0 +1,11 @@ +# ProductGroupReferenceFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_group** | **CatalogsProductGroupMultipleStringCriteria** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProductGroupsApi.md b/docs/ProductGroupsApi.md index afd8295..5df0f1a 100644 --- a/docs/ProductGroupsApi.md +++ b/docs/ProductGroupsApi.md @@ -22,6 +22,7 @@ This endpoint is completely deprecated. Please use Organic Analytics and Ads Analytics for more information. +Get the definitions for ads and organic metrics available across both synchronous and asynchronous report endpoints. The `display_name` attribute will match how the metric is named in our native tools like Ads Manager. See Organic Analytics and Ads Analytics for more information. ### Example @@ -239,6 +240,80 @@ Name | Type | Description | Notes - **Accept**: application/json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **lead_form_questions_get** +> lead_form_questions_get() + +Get lead form questions + +Get a list of all lead form question type names. Some questions might not be used. This endpoint is currently in beta and not available to all apps. Learn more. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import resources_api +from openapi_generated.pinterest_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = resources_api.ResourcesApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Get lead form questions + api_instance.lead_form_questions_get() + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling ResourcesApi->lead_form_questions_get: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | @@ -371,6 +446,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: client_id = "1094834" # str | Client ID. (optional) oauth_signature = "8209f" # str | Oauth signature (optional) timestamp = "1618338184277" # str | Timestamp (optional) + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: @@ -384,7 +460,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # and optional values try: # Get targeting options - api_response = api_instance.targeting_options_get(targeting_type, client_id=client_id, oauth_signature=oauth_signature, timestamp=timestamp) + api_response = api_instance.targeting_options_get(targeting_type, client_id=client_id, oauth_signature=oauth_signature, timestamp=timestamp, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling ResourcesApi->targeting_options_get: %s\n" % e) @@ -399,6 +475,7 @@ Name | Type | Description | Notes **client_id** | **str**| Client ID. | [optional] **oauth_signature** | **str**| Oauth signature | [optional] **timestamp** | **str**| Timestamp | [optional] + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type diff --git a/docs/RespondToInvitesResponseArray.md b/docs/RespondToInvitesResponseArray.md new file mode 100644 index 0000000..cb6013c --- /dev/null +++ b/docs/RespondToInvitesResponseArray.md @@ -0,0 +1,12 @@ +# RespondToInvitesResponseArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[RespondToInvitesResponseArrayItems]**](RespondToInvitesResponseArrayItems.md) | List of invite/request accept/decline status. If there is an error, an exception object will be returned. If the invite/request was successfully accepted/declined, an invite object will be returned. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RespondToInvitesResponseArrayItems.md b/docs/RespondToInvitesResponseArrayItems.md new file mode 100644 index 0000000..c49c007 --- /dev/null +++ b/docs/RespondToInvitesResponseArrayItems.md @@ -0,0 +1,13 @@ +# RespondToInvitesResponseArrayItems + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exception** | [**InviteExceptionResponse**](InviteExceptionResponse.md) | | [optional] +**invite** | [**BaseInviteDataResponse**](BaseInviteDataResponse.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Role.md b/docs/Role.md new file mode 100644 index 0000000..d815511 --- /dev/null +++ b/docs/Role.md @@ -0,0 +1,12 @@ +# Role + +An internal role type used on business access, EMPLOYEE, ADMIN. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | An internal role type used on business access, EMPLOYEE, ADMIN. | must be one of ["UNKNOWN", "OWNER", "ADMIN", "ANALYST", "SOS_READER", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "RESTRICTED_OWNER", "PROFILE_MANAGER", "PROFILE_PUBLISHER", "RESOURCE_PINNER_LIST_OWNER", "RESOURCE_PINNER_LIST_READER", "BIZ_PINNER_LIST_SHARER", "RESOURCE_CONVERSION_TAGS_READER", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOAccountAddress.md b/docs/SSIOAccountAddress.md new file mode 100644 index 0000000..b6ed3f0 --- /dev/null +++ b/docs/SSIOAccountAddress.md @@ -0,0 +1,15 @@ +# SSIOAccountAddress + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display** | **str** | Address display | [optional] +**purpose** | **str** | Purpose for which the address is used, usually Billing or Businness | [optional] +**address_id** | **str** | Salesforce id for address | [optional] +**order_legal_entity** | **str** | Legal entity for this insertion order | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOAccountItem.md b/docs/SSIOAccountItem.md new file mode 100644 index 0000000..19206fa --- /dev/null +++ b/docs/SSIOAccountItem.md @@ -0,0 +1,20 @@ +# SSIOAccountItem + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Salesforce id for billto_info | [optional] +**io_terms_id** | **str** | Salesforce id for IO Terms and Conditions | [optional] +**io_terms** | **str** | Salesforce text for IO Terms and Conditions | [optional] +**us_terms_id** | **str** | Salesforce id for US Terms and Conditions | [optional] +**us_terms** | **str** | Salesforce text for US Terms and Conditions | [optional] +**row_terms_id** | **str** | Salesforce id for Rest of the World Terms and Conditions | [optional] +**row_terms** | **str** | Salesforce text for Rest of the World Terms and Conditions | [optional] +**io_type** | **str** | Insertion Order Type - Pinterest Paper or Agency Paper | [optional] +**addresses** | [**[SSIOAccountAddress]**](SSIOAccountAddress.md) | Address information that is associated with this account. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOAccountPMPName.md b/docs/SSIOAccountPMPName.md new file mode 100644 index 0000000..f585d9e --- /dev/null +++ b/docs/SSIOAccountPMPName.md @@ -0,0 +1,13 @@ +# SSIOAccountPMPName + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Display name | [optional] +**id** | **str** | Salesforce id for PMP | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOAccountResponse.md b/docs/SSIOAccountResponse.md new file mode 100644 index 0000000..dcd767e --- /dev/null +++ b/docs/SSIOAccountResponse.md @@ -0,0 +1,17 @@ +# SSIOAccountResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eligible** | **bool** | Advertiser eligible to create order lines | [optional] +**can_edit** | **bool** | Advertiser eligible to update order lines | [optional] +**billto_infos** | [**[SSIOAccountItem]**](SSIOAccountItem.md) | An array of Salesforce account information that includes address, io terms, etc. | [optional] +**currency** | **str** | | [optional] +**pmp_names** | [**[SSIOAccountPMPName]**](SSIOAccountPMPName.md) | | [optional] +**error** | **str** | Error indicator from Salesforce which could be \"No Error\" | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOCreateInsertionOrderRequest.md b/docs/SSIOCreateInsertionOrderRequest.md new file mode 100644 index 0000000..afdc97a --- /dev/null +++ b/docs/SSIOCreateInsertionOrderRequest.md @@ -0,0 +1,33 @@ +# SSIOCreateInsertionOrderRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **str** | Starting date of time period. Format: YYYY-MM-DD | +**po_number** | **str** | The po number | +**billing_contact_firstname** | **str** | The billing contact first name | +**billing_contact_lastname** | **str** | The billing contact last name | +**billing_contact_email** | **str** | The billing contact email | +**media_contact_firstname** | **str** | The media contact first name | +**media_contact_lastname** | **str** | The media contact last name | +**media_contact_email** | **str** | The media contact email | +**pmp_id** | **str** | The pmp id | +**order_name** | **str** | The order name | +**order_line_type** | **str** | Type can be Budget or Perpetual | +**accepted_terms_id** | **str** | The SFDC id for the terms | +**billto_company_id** | **str** | The bill-to company id | +**billto_business_address_id** | **str** | The bill-to business address id | +**billto_billing_address_id** | **str** | The bill-to billing address id | +**currency_info** | [**Currency**](Currency.md) | | +**end_date** | **str** | End date of time period. Format: YYYY-MM-DD | [optional] +**budget_amount** | **float** | If Budget order line, the budget amount. | [optional] +**agency_link** | **str** | URL link for agency | [optional] +**user_email** | **str** | The email of user submitting the insertion order | [optional] +**accepted_terms_time** | **int** | The UTC timestamp (to the nearest sec) of when terms were accepted | [optional] +**estimated_monthly_spend** | **float** | If Ongoing (perpetual) order line, the estimated monthly spend | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOCreateInsertionOrderRequestAllOf.md b/docs/SSIOCreateInsertionOrderRequestAllOf.md new file mode 100644 index 0000000..5bce5a2 --- /dev/null +++ b/docs/SSIOCreateInsertionOrderRequestAllOf.md @@ -0,0 +1,21 @@ +# SSIOCreateInsertionOrderRequestAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pmp_id** | **str** | The pmp id | +**order_name** | **str** | The order name | +**order_line_type** | **str** | Type can be Budget or Perpetual | +**accepted_terms_id** | **str** | The SFDC id for the terms | +**billto_company_id** | **str** | The bill-to company id | +**billto_business_address_id** | **str** | The bill-to business address id | +**billto_billing_address_id** | **str** | The bill-to billing address id | +**currency_info** | [**Currency**](Currency.md) | | +**accepted_terms_time** | **int** | The UTC timestamp (to the nearest sec) of when terms were accepted | [optional] +**estimated_monthly_spend** | **float** | If Ongoing (perpetual) order line, the estimated monthly spend | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOCreateInsertionOrderResponse.md b/docs/SSIOCreateInsertionOrderResponse.md new file mode 100644 index 0000000..8c658f2 --- /dev/null +++ b/docs/SSIOCreateInsertionOrderResponse.md @@ -0,0 +1,12 @@ +# SSIOCreateInsertionOrderResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pin_order_id** | **str** | Salesforce order id | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOEditInsertionOrderRequest.md b/docs/SSIOEditInsertionOrderRequest.md new file mode 100644 index 0000000..1f15cb0 --- /dev/null +++ b/docs/SSIOEditInsertionOrderRequest.md @@ -0,0 +1,27 @@ +# SSIOEditInsertionOrderRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **str** | Starting date of time period. Format: YYYY-MM-DD | [optional] +**end_date** | **str** | End date of time period. Format: YYYY-MM-DD | [optional] +**po_number** | **str** | The po number | [optional] +**budget_amount** | **float** | If Budget order line, the budget amount. | [optional] +**billing_contact_firstname** | **str** | The billing contact first name | [optional] +**billing_contact_lastname** | **str** | The billing contact last name | [optional] +**billing_contact_email** | **str** | The billing contact email | [optional] +**media_contact_firstname** | **str** | The media contact first name | [optional] +**media_contact_lastname** | **str** | The media contact last name | [optional] +**media_contact_email** | **str** | The media contact email | [optional] +**agency_link** | **str** | URL link for agency | [optional] +**user_email** | **str** | The email of user submitting the insertion order | [optional] +**oracle_line_id** | **str** | LineId in the Oracle DB | [optional] +**salesforce_order_id** | **str** | OrderId in SFDC | [optional] +**salesforce_order_line_id** | **str** | OrderLineId in SFDC | [optional] +**ads_manager_order_line_id** | **str** | Ads manager OrderLineId | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOEditInsertionOrderRequestAllOf.md b/docs/SSIOEditInsertionOrderRequestAllOf.md new file mode 100644 index 0000000..2fdee85 --- /dev/null +++ b/docs/SSIOEditInsertionOrderRequestAllOf.md @@ -0,0 +1,15 @@ +# SSIOEditInsertionOrderRequestAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**oracle_line_id** | **str** | LineId in the Oracle DB | [optional] +**salesforce_order_id** | **str** | OrderId in SFDC | [optional] +**salesforce_order_line_id** | **str** | OrderLineId in SFDC | [optional] +**ads_manager_order_line_id** | **str** | Ads manager OrderLineId | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOEditInsertionOrderResponse.md b/docs/SSIOEditInsertionOrderResponse.md new file mode 100644 index 0000000..2168a7a --- /dev/null +++ b/docs/SSIOEditInsertionOrderResponse.md @@ -0,0 +1,12 @@ +# SSIOEditInsertionOrderResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pin_order_id** | **str** | Salesforce order id | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOInsertionOrderCommon.md b/docs/SSIOInsertionOrderCommon.md new file mode 100644 index 0000000..b430dc8 --- /dev/null +++ b/docs/SSIOInsertionOrderCommon.md @@ -0,0 +1,23 @@ +# SSIOInsertionOrderCommon + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **str** | Starting date of time period. Format: YYYY-MM-DD | [optional] +**end_date** | **str** | End date of time period. Format: YYYY-MM-DD | [optional] +**po_number** | **str** | The po number | [optional] +**budget_amount** | **float** | If Budget order line, the budget amount. | [optional] +**billing_contact_firstname** | **str** | The billing contact first name | [optional] +**billing_contact_lastname** | **str** | The billing contact last name | [optional] +**billing_contact_email** | **str** | The billing contact email | [optional] +**media_contact_firstname** | **str** | The media contact first name | [optional] +**media_contact_lastname** | **str** | The media contact last name | [optional] +**media_contact_email** | **str** | The media contact email | [optional] +**agency_link** | **str** | URL link for agency | [optional] +**user_email** | **str** | The email of user submitting the insertion order | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOInsertionOrderStatus.md b/docs/SSIOInsertionOrderStatus.md new file mode 100644 index 0000000..efa1b3b --- /dev/null +++ b/docs/SSIOInsertionOrderStatus.md @@ -0,0 +1,14 @@ +# SSIOInsertionOrderStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pin_order_id** | **str** | Salesforce order id | [optional] +**status** | **str** | Salesforce insertion order status | [optional] +**creation_time** | **str, none_type** | Salesforce insertion order creation time | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOInsertionOrderStatusResponse.md b/docs/SSIOInsertionOrderStatusResponse.md new file mode 100644 index 0000000..21bc11e --- /dev/null +++ b/docs/SSIOInsertionOrderStatusResponse.md @@ -0,0 +1,14 @@ +# SSIOInsertionOrderStatusResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pin_order_id** | **str** | Salesforce order id | [optional] +**status** | **str** | Salesforce insertion order status | [optional] +**creation_time** | **str, none_type** | Salesforce insertion order creation time | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SSIOOrderLine.md b/docs/SSIOOrderLine.md new file mode 100644 index 0000000..036a870 --- /dev/null +++ b/docs/SSIOOrderLine.md @@ -0,0 +1,33 @@ +# SSIOOrderLine + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**salesforce_order_line_id** | **str, none_type** | OrderLineId in SFDC | [optional] +**ads_manager_order_line_id** | **str, none_type** | Ads manager OrderLineId | [optional] +**pin_order_id** | **str, none_type** | The pin order id associated with the order line in SFDC | [optional] +**last_modified_date_time** | **str, none_type** | Last modified date. | [optional] +**start_date** | **date, none_type** | Start date of the order line. | [optional] +**end_date** | **date, none_type** | End date of the order line. | [optional] +**bill_to_company_name** | **str, none_type** | Bill To Company name | [optional] +**billing_contact_firstname** | **str, none_type** | Billing contact first name | [optional] +**billing_contact_lastname** | **str, none_type** | Billing contact last name | [optional] +**billing_contact_email** | **str, none_type** | Billing contact email | [optional] +**media_contact_email** | **str, none_type** | Billing media email | [optional] +**media_contact_firstname** | **str, none_type** | Billing contact first name | [optional] +**media_contact_lastname** | **str, none_type** | Billing contact first name | [optional] +**currency_info** | [**Currency**](Currency.md) | | [optional] +**agency_link** | **str, none_type** | Agency link | [optional] +**po_number** | **str, none_type** | The po number | [optional] +**order_name** | **str, none_type** | The order name | [optional] +**pmp_name** | **str, none_type** | The Pinterest marketing partner name | [optional] +**accepted_terms_id** | **str, none_type** | The SFDC id for the terms | [optional] +**accepted_terms_time** | **str, none_type** | The UTC timestamp (to the nearest sec) of when terms were accepted | [optional] +**budget_amount** | **float, none_type** | If Budget order line, the budget amount. | [optional] +**estimated_monthly_spend** | **float, none_type** | If Ongoing (perpetual) order line, the estimated monthly spend | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchApi.md b/docs/SearchApi.md index 81db263..ddcc739 100644 --- a/docs/SearchApi.md +++ b/docs/SearchApi.md @@ -4,19 +4,120 @@ All URIs are relative to *https://api.pinterest.com/v5* Method | HTTP request | Description ------------- | ------------- | ------------- +[**search_partner_pins**](SearchApi.md#search_partner_pins) | **GET** /search/partner/pins | Search pins by a given search term [**search_user_boards_get**](SearchApi.md#search_user_boards_get) | **GET** /search/boards | Search user's boards [**search_user_pins_list**](SearchApi.md#search_user_pins_list) | **GET** /search/pins | Search user's Pins +# **search_partner_pins** +> bool, date, datetime, dict, float, int, list, str, none_type search_partner_pins(term, country_code) + +Search pins by a given search term + +This endpoint is currently in beta and not available to all apps. Learn more. Get the top 10 Pins by a given search term. + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import search_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.summary_pin import SummaryPin +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = search_api.SearchApi(api_client) + term = "term_example" # str | Search term to look up pins. + country_code = "US" # str | Two letter country code (ISO 3166-1 alpha-2) + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + locale = "locale_example" # str | Search locale. (optional) + limit = 4 # int | Max search result size (optional) if omitted the server will use the default value of 10 + + # example passing only required values which don't have defaults set + try: + # Search pins by a given search term + api_response = api_instance.search_partner_pins(term, country_code) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling SearchApi->search_partner_pins: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Search pins by a given search term + api_response = api_instance.search_partner_pins(term, country_code, bookmark=bookmark, locale=locale, limit=limit) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling SearchApi->search_partner_pins: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **term** | **str**| Search term to look up pins. | + **country_code** | **str**| Two letter country code (ISO 3166-1 alpha-2) | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **locale** | **str**| Search locale. | [optional] + **limit** | **int**| Max search result size | [optional] if omitted the server will use the default value of 10 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid pins | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **search_user_boards_get** > bool, date, datetime, dict, float, int, list, str, none_type search_user_boards_get() Search user's boards -Search for boards for the \"operation user_account\". This includes boards of all board types. - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. +Search for boards for the \"operation user_account\". This includes boards of all board types. - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -24,6 +125,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import search_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.board import Board from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -37,6 +139,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -49,13 +157,14 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: api_instance = search_api.SearchApi(api_client) ad_account_id = "4" # str | Unique identifier of an ad account. (optional) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 query = "query_example" # str | Search query. Can contain pin description keywords or comma-separated pin IDs. (optional) # example passing only required values which don't have defaults set # and optional values try: # Search user's boards - api_response = api_instance.search_user_boards_get(ad_account_id=ad_account_id, bookmark=bookmark, query=query) + api_response = api_instance.search_user_boards_get(ad_account_id=ad_account_id, bookmark=bookmark, page_size=page_size, query=query) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling SearchApi->search_user_boards_get: %s\n" % e) @@ -68,6 +177,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **query** | **str**| Search query. Can contain pin description keywords or comma-separated pin IDs. | [optional] ### Return type @@ -76,7 +186,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -98,7 +208,7 @@ Name | Type | Description | Notes Search user's Pins -Search for pins for the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. +Search for pins for the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. ### Example @@ -109,6 +219,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import search_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.pin import Pin from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 diff --git a/docs/SharedAudience.md b/docs/SharedAudience.md new file mode 100644 index 0000000..d94c0fa --- /dev/null +++ b/docs/SharedAudience.md @@ -0,0 +1,14 @@ +# SharedAudience + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audience_id** | **str** | Unique identifier of an audience | +**operation_type** | [**OperationType**](OperationType.md) | | +**recipient_account_ids** | **[str]** | List of ad account IDs to share with or revoke from. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SharedAudience1.md b/docs/SharedAudience1.md new file mode 100644 index 0000000..502db1d --- /dev/null +++ b/docs/SharedAudience1.md @@ -0,0 +1,12 @@ +# SharedAudience1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recipient_account_ids** | **[str]** | List of ad account IDs to share with or revoke from. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SharedAudienceAccount.md b/docs/SharedAudienceAccount.md new file mode 100644 index 0000000..e941aaf --- /dev/null +++ b/docs/SharedAudienceAccount.md @@ -0,0 +1,15 @@ +# SharedAudienceAccount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **str** | Account ID (ad account or business ID). | +**account_name** | **str** | Account name. | +**account_type** | **str** | account type | +**shared_on_timestamp** | **int** | Epoch timestamp in seconds for the shared audience event | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SharedAudienceCommon.md b/docs/SharedAudienceCommon.md new file mode 100644 index 0000000..e8c8a33 --- /dev/null +++ b/docs/SharedAudienceCommon.md @@ -0,0 +1,13 @@ +# SharedAudienceCommon + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audience_id** | **str** | Unique identifier of an audience | [optional] +**operation_type** | [**OperationType**](OperationType.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SharedAudienceResponse.md b/docs/SharedAudienceResponse.md new file mode 100644 index 0000000..e7a24b4 --- /dev/null +++ b/docs/SharedAudienceResponse.md @@ -0,0 +1,14 @@ +# SharedAudienceResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audience_id** | **str** | Audience ID that was shared | [optional] +**permissions** | [**[Role]**](Role.md) | | [optional] +**recipient_account_ids** | **[str]** | Account IDs that received the audience | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SharedAudienceResponse1.md b/docs/SharedAudienceResponse1.md new file mode 100644 index 0000000..88c412b --- /dev/null +++ b/docs/SharedAudienceResponse1.md @@ -0,0 +1,12 @@ +# SharedAudienceResponse1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recipient_account_ids** | **[str]** | Account IDs that received the audience | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SharedAudienceResponseCommon.md b/docs/SharedAudienceResponseCommon.md new file mode 100644 index 0000000..8d06755 --- /dev/null +++ b/docs/SharedAudienceResponseCommon.md @@ -0,0 +1,13 @@ +# SharedAudienceResponseCommon + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audience_id** | **str** | Audience ID that was shared | [optional] +**permissions** | [**[Role]**](Role.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SummaryPin.md b/docs/SummaryPin.md new file mode 100644 index 0000000..a0f79ea --- /dev/null +++ b/docs/SummaryPin.md @@ -0,0 +1,17 @@ +# SummaryPin + +Summarized pin information + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**media** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] [readonly] +**alt_text** | **str, none_type** | | [optional] +**link** | **str, none_type** | | [optional] +**title** | **str, none_type** | | [optional] +**description** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingAdvertiserCountry.md b/docs/TargetingAdvertiserCountry.md new file mode 100644 index 0000000..9c15aec --- /dev/null +++ b/docs/TargetingAdvertiserCountry.md @@ -0,0 +1,12 @@ +# TargetingAdvertiserCountry + +Advertiser's ISO two character country code. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Advertiser's ISO two character country code. | must be one of ["US", "GB", "CA", "IE", "AU", "NZ", "FR", "SE", "IL", "DE", "AT", "IT", "ES", "NL", "BE", "PT", "CH", "HK", "JP", "KR", "SG", "NO", "DK", "FI", "CY", "LU", "MT", "PL", "RO", "HU", "CZ", "GR", "SK", "BR", "MX", "AR", "CL", "CO", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingSpec.md b/docs/TargetingSpec.md index a2da51b..d975913 100644 --- a/docs/TargetingSpec.md +++ b/docs/TargetingSpec.md @@ -1,6 +1,6 @@ # TargetingSpec -Ad group targeting specification defining the ad group target audience. For example, {\"APPTYPE\":[\"iphone\"], \"GENDER\":[\"male\"], \"LOCALE\":[\"en-US\"], \"LOCATION\":[\"501\"], \"AGE_BUCKET\":[\"25-34\"]} +Ad group targeting specification defining the ad group target audience. For example, `{\"APPTYPE\":[\"iphone\"], \"GENDER\":[\"male\"], \"LOCALE\":[\"en-US\"], \"LOCATION\":[\"501\"], \"AGE_BUCKET\":[\"25-34\"]}` ## Properties Name | Type | Description | Notes @@ -10,10 +10,10 @@ Name | Type | Description | Notes **audience_exclude** | **[str], none_type** | Excluded customer list IDs. Used to drive new customer acquisition goals. For example: [\"2542620905475\"]. Audience lists need to have at least 100 people with Pinterest accounts in them. If the AUDIENCE_EXCLUDE field is missing, the default behavior in terms of ad delivery is that **No users will be excluded**. | [optional] **audience_include** | **[str], none_type** | Targeted customer list IDs. For example: [\"2542620905473\"]. Audience lists need to have at least 100 people with Pinterest accounts in them Audience lists need to have at least 100 people with Pinterest accounts in them. If the AUDIENCE_INCLUDE field is missing, the default behavior in terms of ad delivery is that **All users will be included**. | [optional] **gender** | **[str], none_type** | Targeted genders. Values: [\"unknown\",\"male\",\"female\"]. If the GENDER field is missing, the default behavior in terms of ad delivery is that **All genders will be targeted**. | [optional] -**geo** | **[str], none_type** | Location region codes, e.g., \"BE-VOV\" (East Flanders, Belgium) For complete list, <a href=\"https://help.pinterest.com/sub/helpcenter/partner/pinterest_location_targeting_codes.xlsx\" target=\"_blank\">click here</a> or postal codes, e.g., \"US-94107\". Use either region codes or postal codes but not both. If the GEO field is missing, the default behavior in terms of ad delivery is that **No geos will be selected**. | [optional] +**geo** | **[str], none_type** | Location region codes, e.g., \"BE-VOV\" (East Flanders, Belgium) For complete list, <a href=\"https://help.pinterest.com/sub/helpcenter/partner/pinterest_location_targeting_codes.xlsx\" target=\"_blank\">click here</a> or postal codes, e.g., \"US-94107\". Use either region codes or postal codes but not both. At least one of LOCATION or GEO must be specified. If the GEO field is missing, then only LOCATION values will be targeted (see LOCATION field below). | [optional] **interest** | **[str]** | Array of interest object IDs. If the INTEREST field is missing, the default behavior in terms of ad delivery is that **All interests will be targeted**. | [optional] -**locale** | **[str], none_type** | 24 ISO 639-1 two letter language codes. If the LOCALE field is missing, the default behavior in terms of ad delivery is that **All languages will be target, only english non-sublanguage will be targeted**. | [optional] -**location** | **[str], none_type** | 22 ISO Alpha 2 two letter country codes or US Nielsen DMA (Designated Market Area) codes (location region codes) (e.g., [\"US\", \"807\"]). For complete list, click here. Location-Country and Location-Metro codes apply. If the LOCATION field is missing, the default behavior in terms of ad delivery is that **Selects default country if not specified (US) and all regions within that country**. | [optional] +**locale** | **[str], none_type** | 24 ISO 639-1 two letter language codes. If the LOCALE field is missing, the default behavior in terms of ad delivery is that **All languages will be targeted, only english non-sublanguage will be targeted**. | [optional] +**location** | **[str], none_type** | 22 ISO Alpha 2 two letter country codes or US Nielsen DMA (Designated Market Area) codes (location region codes) (e.g., [\"US\", \"807\"]). For complete list, click here. Location-Country and Location-Metro codes apply. At least one of LOCATION or GEO must be specified. If the LOCATION field is missing, then only GEO values will be targeted (see GEO field above). | [optional] **shopping_retargeting** | [**[TargetingSpecSHOPPINGRETARGETING], none_type**](TargetingSpecSHOPPINGRETARGETING.md) | Array of object: lookback_window [Integer]: Number of days ago to start lookback timeframe for dynamic retargeting tag_types [Array of integer]: Event types to target for dynamic retargeting exclusion_window [Integer]: Number of days ago to stop lookback timeframe for dynamic retargeting | [optional] **targeting_strategy** | **[str], none_type** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/TargetingSpecAppType.md b/docs/TargetingSpecAppType.md new file mode 100644 index 0000000..42a376e --- /dev/null +++ b/docs/TargetingSpecAppType.md @@ -0,0 +1,11 @@ +# TargetingSpecAppType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | must be one of ["android_mobile", "android_tablet", "ipad", "iphone", "web", "web_mobile", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateApi.md b/docs/TargetingTemplateApi.md new file mode 100644 index 0000000..2241abe --- /dev/null +++ b/docs/TargetingTemplateApi.md @@ -0,0 +1,281 @@ +# openapi_generated.pinterest_client.TargetingTemplateApi + +All URIs are relative to *https://api.pinterest.com/v5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**targeting_template_create**](TargetingTemplateApi.md#targeting_template_create) | **POST** /ad_accounts/{ad_account_id}/targeting_templates | Create targeting templates +[**targeting_template_list**](TargetingTemplateApi.md#targeting_template_list) | **GET** /ad_accounts/{ad_account_id}/targeting_templates | List targeting templates +[**targeting_template_update**](TargetingTemplateApi.md#targeting_template_update) | **PATCH** /ad_accounts/{ad_account_id}/targeting_templates | Update targeting templates + + +# **targeting_template_create** +> TargetingTemplateGetResponseData targeting_template_create(ad_account_id, targeting_template_create) + +Create targeting templates + +

Targeting templates allow advertisers to save a set of targeting details including audience lists, keywords & interest, demographics, and placements to use more than once during the campaign creation process.

Templates can be used to build out basic targeting criteria that you plan to use across campaigns and to reuse performance targeting from prior campaigns for new campaigns.

+ +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import targeting_template_api +from openapi_generated.pinterest_client.model.targeting_template_get_response_data import TargetingTemplateGetResponseData +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.targeting_template_create import TargetingTemplateCreate +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = targeting_template_api.TargetingTemplateApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + targeting_template_create = TargetingTemplateCreate() # TargetingTemplateCreate | targeting template creation entity + + # example passing only required values which don't have defaults set + try: + # Create targeting templates + api_response = api_instance.targeting_template_create(ad_account_id, targeting_template_create) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling TargetingTemplateApi->targeting_template_create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **targeting_template_create** | [**TargetingTemplateCreate**](TargetingTemplateCreate.md)| targeting template creation entity | + +### Return type + +[**TargetingTemplateGetResponseData**](TargetingTemplateGetResponseData.md) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account id. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **targeting_template_list** +> bool, date, datetime, dict, float, int, list, str, none_type targeting_template_list(ad_account_id) + +List targeting templates + +Get a list of the targeting templates in the specified ad_account_id + +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import targeting_template_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.targeting_template_response_data import TargetingTemplateResponseData +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = targeting_template_api.TargetingTemplateApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + order = "ASCENDING" # str | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. (optional) + include_sizing = False # bool | Include audience sizing in result or not (optional) if omitted the server will use the default value of False + search_query = "gaming" # str | Search keyword for targeting templates (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + + # example passing only required values which don't have defaults set + try: + # List targeting templates + api_response = api_instance.targeting_template_list(ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling TargetingTemplateApi->targeting_template_list: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List targeting templates + api_response = api_instance.targeting_template_list(ad_account_id, order=order, include_sizing=include_sizing, search_query=search_query, page_size=page_size, bookmark=bookmark) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling TargetingTemplateApi->targeting_template_list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **order** | **str**| The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] + **include_sizing** | **bool**| Include audience sizing in result or not | [optional] if omitted the server will use the default value of False + **search_query** | **str**| Search keyword for targeting templates | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account id. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **targeting_template_update** +> targeting_template_update(ad_account_id, targeting_template_update_request) + +Update targeting templates + +

Update the targeting template given advertiser ID and targeting template ID

+ +### Example + +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import targeting_template_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.targeting_template_update_request import TargetingTemplateUpdateRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = targeting_template_api.TargetingTemplateApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. + targeting_template_update_request = TargetingTemplateUpdateRequest( + operation_type="REMOVE", + id="643", + ) # TargetingTemplateUpdateRequest | Operation type and targeting template ID + + # example passing only required values which don't have defaults set + try: + # Update targeting templates + api_instance.targeting_template_update(ad_account_id, targeting_template_update_request) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling TargetingTemplateApi->targeting_template_update: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | + **targeting_template_update_request** | [**TargetingTemplateUpdateRequest**](TargetingTemplateUpdateRequest.md)| Operation type and targeting template ID | + +### Return type + +void (empty response body) + +### Authorization + +[pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid ad account id. | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/TargetingTemplateAudienceSizing.md b/docs/TargetingTemplateAudienceSizing.md new file mode 100644 index 0000000..98df3f8 --- /dev/null +++ b/docs/TargetingTemplateAudienceSizing.md @@ -0,0 +1,13 @@ +# TargetingTemplateAudienceSizing + +Gets an audience size estimate for a set of given targeting spec data.

Returns:

An object containing an audience size estimate that has a reach estimate (number of unique users) against the given targeting template. This by default provides a monthly estimate. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reach_estimate** | [**TargetingTemplateAudienceSizingReachEstimate**](TargetingTemplateAudienceSizingReachEstimate.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateAudienceSizingReachEstimate.md b/docs/TargetingTemplateAudienceSizingReachEstimate.md new file mode 100644 index 0000000..71a5984 --- /dev/null +++ b/docs/TargetingTemplateAudienceSizingReachEstimate.md @@ -0,0 +1,14 @@ +# TargetingTemplateAudienceSizingReachEstimate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**estimate** | **int** | | [optional] +**lower_bound** | **int** | | [optional] +**upper_bound** | **int** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateCommon.md b/docs/TargetingTemplateCommon.md new file mode 100644 index 0000000..bef3c58 --- /dev/null +++ b/docs/TargetingTemplateCommon.md @@ -0,0 +1,17 @@ +# TargetingTemplateCommon + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | targeting template name | [optional] +**auto_targeting_enabled** | **bool** | Enable auto-targeting for ad group. Also known as <a href=\"https://help.pinterest.com/en/business/article/expanded-targeting\" target=\"_blank\">\"expanded targeting\"</a>. | [optional] if omitted the server will use the default value of True +**targeting_attributes** | [**TargetingSpec**](TargetingSpec.md) | | [optional] +**placement_group** | [**PlacementGroupType**](PlacementGroupType.md) | | [optional] +**keywords** | [**[TargetingTemplateKeyword]**](TargetingTemplateKeyword.md) | | [optional] +**tracking_urls** | [**TrackingUrls**](TrackingUrls.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateCreate.md b/docs/TargetingTemplateCreate.md new file mode 100644 index 0000000..3f37679 --- /dev/null +++ b/docs/TargetingTemplateCreate.md @@ -0,0 +1,17 @@ +# TargetingTemplateCreate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of targeting template. | +**targeting_attributes** | [**TargetingSpec**](TargetingSpec.md) | | +**auto_targeting_enabled** | **bool** | Enable auto-targeting for ad group. Also known as <a href=\"https://help.pinterest.com/en/business/article/expanded-targeting\" target=\"_blank\">\"expanded targeting\"</a>. | [optional] if omitted the server will use the default value of True +**placement_group** | [**PlacementGroupType**](PlacementGroupType.md) | | [optional] +**keywords** | [**[TargetingTemplateKeyword]**](TargetingTemplateKeyword.md) | | [optional] +**tracking_urls** | [**TrackingUrls**](TrackingUrls.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateCreateAllOf.md b/docs/TargetingTemplateCreateAllOf.md new file mode 100644 index 0000000..b594010 --- /dev/null +++ b/docs/TargetingTemplateCreateAllOf.md @@ -0,0 +1,13 @@ +# TargetingTemplateCreateAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of targeting template. | +**targeting_attributes** | [**TargetingSpec**](TargetingSpec.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateGetResponseData.md b/docs/TargetingTemplateGetResponseData.md new file mode 100644 index 0000000..d2f8a09 --- /dev/null +++ b/docs/TargetingTemplateGetResponseData.md @@ -0,0 +1,24 @@ +# TargetingTemplateGetResponseData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | targeting template name | [optional] +**auto_targeting_enabled** | **bool** | Enable auto-targeting for ad group. Also known as <a href=\"https://help.pinterest.com/en/business/article/expanded-targeting\" target=\"_blank\">\"expanded targeting\"</a>. | [optional] if omitted the server will use the default value of True +**targeting_attributes** | [**TargetingSpec**](TargetingSpec.md) | | [optional] +**placement_group** | [**PlacementGroupType**](PlacementGroupType.md) | | [optional] +**keywords** | [**[TargetingTemplateKeyword]**](TargetingTemplateKeyword.md) | | [optional] +**tracking_urls** | [**TrackingUrls**](TrackingUrls.md) | | [optional] +**id** | **str** | Targeting template ID. | [optional] +**created_time** | **int** | Targeting template created time. Unix timestamp in seconds. | [optional] +**updated_time** | **int** | Targeting template updated time.Unix timestamp in seconds. | [optional] +**ad_account_id** | **str** | The ID of the advertiser that this targeting template belongs to. | [optional] +**status** | **str** | Indicate targeting template is active or Deleted | [optional] +**sizing** | [**TargetingTemplateAudienceSizing**](TargetingTemplateAudienceSizing.md) | | [optional] +**valid** | **bool, none_type** | Inform if the targeting template is valid (ex. would be false if has revoked audience) | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateGetResponseData1.md b/docs/TargetingTemplateGetResponseData1.md new file mode 100644 index 0000000..8c416e5 --- /dev/null +++ b/docs/TargetingTemplateGetResponseData1.md @@ -0,0 +1,12 @@ +# TargetingTemplateGetResponseData1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**valid** | **bool, none_type** | Inform if the targeting template is valid (ex. would be false if has revoked audience) | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateKeyword.md b/docs/TargetingTemplateKeyword.md new file mode 100644 index 0000000..09abe8b --- /dev/null +++ b/docs/TargetingTemplateKeyword.md @@ -0,0 +1,13 @@ +# TargetingTemplateKeyword + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**match_type** | [**MatchType**](MatchType.md) | | [optional] +**value** | **str** | The keyword targeting (120 chars max). | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateResponseData.md b/docs/TargetingTemplateResponseData.md new file mode 100644 index 0000000..ad9a3df --- /dev/null +++ b/docs/TargetingTemplateResponseData.md @@ -0,0 +1,23 @@ +# TargetingTemplateResponseData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | targeting template name | [optional] +**auto_targeting_enabled** | **bool** | Enable auto-targeting for ad group. Also known as <a href=\"https://help.pinterest.com/en/business/article/expanded-targeting\" target=\"_blank\">\"expanded targeting\"</a>. | [optional] if omitted the server will use the default value of True +**targeting_attributes** | [**TargetingSpec**](TargetingSpec.md) | | [optional] +**placement_group** | [**PlacementGroupType**](PlacementGroupType.md) | | [optional] +**keywords** | [**[TargetingTemplateKeyword]**](TargetingTemplateKeyword.md) | | [optional] +**tracking_urls** | [**TrackingUrls**](TrackingUrls.md) | | [optional] +**id** | **str** | Targeting template ID. | [optional] +**created_time** | **int** | Targeting template created time. Unix timestamp in seconds. | [optional] +**updated_time** | **int** | Targeting template updated time.Unix timestamp in seconds. | [optional] +**ad_account_id** | **str** | The ID of the advertiser that this targeting template belongs to. | [optional] +**status** | **str** | Indicate targeting template is active or Deleted | [optional] +**sizing** | [**TargetingTemplateAudienceSizing**](TargetingTemplateAudienceSizing.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateResponseData1.md b/docs/TargetingTemplateResponseData1.md new file mode 100644 index 0000000..20e976c --- /dev/null +++ b/docs/TargetingTemplateResponseData1.md @@ -0,0 +1,17 @@ +# TargetingTemplateResponseData1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Targeting template ID. | [optional] +**created_time** | **int** | Targeting template created time. Unix timestamp in seconds. | [optional] +**updated_time** | **int** | Targeting template updated time.Unix timestamp in seconds. | [optional] +**ad_account_id** | **str** | The ID of the advertiser that this targeting template belongs to. | [optional] +**status** | **str** | Indicate targeting template is active or Deleted | [optional] +**sizing** | [**TargetingTemplateAudienceSizing**](TargetingTemplateAudienceSizing.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTemplateUpdateRequest.md b/docs/TargetingTemplateUpdateRequest.md new file mode 100644 index 0000000..0d1b4da --- /dev/null +++ b/docs/TargetingTemplateUpdateRequest.md @@ -0,0 +1,13 @@ +# TargetingTemplateUpdateRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Targeting template ID | +**operation_type** | **str** | | defaults to "REMOVE" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TargetingTypeFilter.md b/docs/TargetingTypeFilter.md index 53c8def..daad3dc 100644 --- a/docs/TargetingTypeFilter.md +++ b/docs/TargetingTypeFilter.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**targeting_types** | [**[AdsAnalyticsTargetingType]**](AdsAnalyticsTargetingType.md) | List of targeting types. Requires `level` to be a value ending in `_TARGETING`. | [optional] +**targeting_types** | [**[AdsAnalyticsTargetingType]**](AdsAnalyticsTargetingType.md) | List of targeting types. Requires `level` to be a value ending in `_TARGETING`. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdatableItemAttributes.md b/docs/UpdatableItemAttributes.md index 0d5963a..51f351c 100644 --- a/docs/UpdatableItemAttributes.md +++ b/docs/UpdatableItemAttributes.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **availability** | **str** | The availability of the product. Must be one of the following values (upper or lowercased): ‘in stock’, ‘out of stock’ , ‘preorder’. | [optional] **average_review_rating** | **float, none_type** | Average reviews for the item. Can be a number from 1-5. | [optional] **brand** | **str, none_type** | The brand of the product. | [optional] -**checkout_enabled** | **bool, none_type** | Set this attribute to FALSE to indicate items that should be excluded from the Pinterest Checkout program. Note, this product is currently being tested and your account must be enrolled. Please contact your Account Manager or contact us for more information. | [optional] +**checkout_enabled** | **bool, none_type** | This attribute is not supported anymore. | [optional] **color** | **str, none_type** | The primary color of the product. | [optional] **condition** | **str, none_type** | The condition of the product. Must be one of the following values (upper or lowercased): ‘new’, ‘used’, or ‘refurbished’. | [optional] **custom_label_0** | **str, none_type** | <p><= 1000 characters</p> <p>Custom grouping of products.</p> | [optional] diff --git a/docs/UpdateAssetGroupBody.md b/docs/UpdateAssetGroupBody.md new file mode 100644 index 0000000..5b6e561 --- /dev/null +++ b/docs/UpdateAssetGroupBody.md @@ -0,0 +1,12 @@ +# UpdateAssetGroupBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_groups_to_update** | [**[UpdateAssetGroupBodyAssetGroupsToUpdate]**](UpdateAssetGroupBodyAssetGroupsToUpdate.md) | A list of asset groups and the data that will be used to update them. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateAssetGroupBodyAssetGroupsToUpdate.md b/docs/UpdateAssetGroupBodyAssetGroupsToUpdate.md new file mode 100644 index 0000000..c849327 --- /dev/null +++ b/docs/UpdateAssetGroupBodyAssetGroupsToUpdate.md @@ -0,0 +1,17 @@ +# UpdateAssetGroupBodyAssetGroupsToUpdate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_group_id** | **str** | Unique identifier of the asset group to update. | +**name** | **str** | Asset Group name | [optional] +**description** | **str** | Asset group description | [optional] +**asset_group_types** | [**AssetGroupTypes**](AssetGroupTypes.md) | | [optional] +**assets_to_add** | **[str]** | A list of asset ids to add to the asset group. | [optional] +**assets_to_remove** | **[str]** | A list of asset ids to remove from the asset group. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateAssetGroupResponse.md b/docs/UpdateAssetGroupResponse.md new file mode 100644 index 0000000..9cfde58 --- /dev/null +++ b/docs/UpdateAssetGroupResponse.md @@ -0,0 +1,13 @@ +# UpdateAssetGroupResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**updated_asset_groups** | [**[AssetGroupBinding]**](AssetGroupBinding.md) | A list of successfully edited asset groups. | [optional] +**exceptions** | [**[UpdateAssetGroupResponseExceptions], none_type**](UpdateAssetGroupResponseExceptions.md) | A list of errors associated with the asset groups. Will be returned if there is an error. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateAssetGroupResponseExceptions.md b/docs/UpdateAssetGroupResponseExceptions.md new file mode 100644 index 0000000..33defa1 --- /dev/null +++ b/docs/UpdateAssetGroupResponseExceptions.md @@ -0,0 +1,14 @@ +# UpdateAssetGroupResponseExceptions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Error code associated with the error editing asset group. | [optional] +**message** | **str** | Error message associated with the error editing asset group. | [optional] +**asset_group_id** | **str** | Asset group id of the exception. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateInvitesResultsResponseArray.md b/docs/UpdateInvitesResultsResponseArray.md new file mode 100644 index 0000000..6ddf918 --- /dev/null +++ b/docs/UpdateInvitesResultsResponseArray.md @@ -0,0 +1,12 @@ +# UpdateInvitesResultsResponseArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[UpdateInvitesResultsResponseArrayItems]**](UpdateInvitesResultsResponseArrayItems.md) | List of invite/Request action status. If there is an error, an exception object will be returned. If the action was successfully completed, an invite object will be returned. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateInvitesResultsResponseArrayItems.md b/docs/UpdateInvitesResultsResponseArrayItems.md new file mode 100644 index 0000000..26dee33 --- /dev/null +++ b/docs/UpdateInvitesResultsResponseArrayItems.md @@ -0,0 +1,13 @@ +# UpdateInvitesResultsResponseArrayItems + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exception** | [**InviteExceptionResponse**](InviteExceptionResponse.md) | | [optional] +**invite** | [**InviteBusinessRoleBinding**](InviteBusinessRoleBinding.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMaskBidOptionField.md b/docs/UpdateMaskBidOptionField.md new file mode 100644 index 0000000..e8239e9 --- /dev/null +++ b/docs/UpdateMaskBidOptionField.md @@ -0,0 +1,12 @@ +# UpdateMaskBidOptionField + +bid option field to apply operation updates to + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | bid option field to apply operation updates to | must be one of ["BID", "APP_TYPE_BID_MULTIPLIER_SET", "PLACEMENT_BID_MULTIPLIER_SET", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMaskFieldType.md b/docs/UpdateMaskFieldType.md new file mode 100644 index 0000000..8770d1b --- /dev/null +++ b/docs/UpdateMaskFieldType.md @@ -0,0 +1,12 @@ +# UpdateMaskFieldType + +The field types supported by the update mask + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The field types supported by the update mask | must be one of ["ad_link", "adult", "age_group", "availability", "average_review_rating", "brand", "checkout_enabled", "color", "condition", "custom_label_0", "custom_label_1", "custom_label_2", "custom_label_3", "custom_label_4", "description", "free_shipping_label", "free_shipping_limit", "gender", "google_product_category", "gtin", "item_group_id", "last_updated_time", "link", "material", "min_ad_price", "mpn", "number_of_ratings", "number_of_reviews", "pattern", "price", "product_type", "sale_price", "shipping", "shipping_height", "shipping_weight", "shipping_width", "size", "size_system", "size_type", "tax", "title", "variant_names", "variant_values", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMemberAssetAccessBody.md b/docs/UpdateMemberAssetAccessBody.md new file mode 100644 index 0000000..cb9ed46 --- /dev/null +++ b/docs/UpdateMemberAssetAccessBody.md @@ -0,0 +1,13 @@ +# UpdateMemberAssetAccessBody + +An object with a list of all the new accesses. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accesses** | [**[UpdateMemberAssetAccessBodyAccesses]**](UpdateMemberAssetAccessBodyAccesses.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMemberAssetAccessBodyAccesses.md b/docs/UpdateMemberAssetAccessBodyAccesses.md new file mode 100644 index 0000000..e46b779 --- /dev/null +++ b/docs/UpdateMemberAssetAccessBodyAccesses.md @@ -0,0 +1,14 @@ +# UpdateMemberAssetAccessBodyAccesses + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_id** | **str** | Id of the asset to update. | +**member_id** | **str** | Unique identifier of the member on which to perform the update | +**permissions** | [**[Permissions]**](Permissions.md) | A non-empty array of permissions to assign to the member. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMemberAssetsResultsResponseArray.md b/docs/UpdateMemberAssetsResultsResponseArray.md new file mode 100644 index 0000000..4f20218 --- /dev/null +++ b/docs/UpdateMemberAssetsResultsResponseArray.md @@ -0,0 +1,12 @@ +# UpdateMemberAssetsResultsResponseArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[UpdateMemberAssetsResultsResponseArrayItems]**](UpdateMemberAssetsResultsResponseArrayItems.md) | List of assigned/updated member asset access. If there is an error, an exception object will be returned. If the action was successfully completed, a response object will be returned. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMemberAssetsResultsResponseArrayItems.md b/docs/UpdateMemberAssetsResultsResponseArrayItems.md new file mode 100644 index 0000000..c872ed9 --- /dev/null +++ b/docs/UpdateMemberAssetsResultsResponseArrayItems.md @@ -0,0 +1,12 @@ +# UpdateMemberAssetsResultsResponseArrayItems + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response** | [**UsersForIndividualAssetResponse**](UsersForIndividualAssetResponse.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMemberBusinessRoleBody.md b/docs/UpdateMemberBusinessRoleBody.md new file mode 100644 index 0000000..0128a5b --- /dev/null +++ b/docs/UpdateMemberBusinessRoleBody.md @@ -0,0 +1,14 @@ +# UpdateMemberBusinessRoleBody + +Single instance of a business member to have its role updated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**business_role** | [**BusinessRoleForMembers**](BusinessRoleForMembers.md) | | +**member_id** | **str** | Unique identifier of the member | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMemberResult.md b/docs/UpdateMemberResult.md new file mode 100644 index 0000000..a9a16aa --- /dev/null +++ b/docs/UpdateMemberResult.md @@ -0,0 +1,13 @@ +# UpdateMemberResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**business_role** | **str** | The access level a member has to the business. Values are case-sensitive. <br> - EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets. <br> - BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access. | [optional] +**member_id** | **str** | Unique identifier of the business member. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMemberResultsResponseArray.md b/docs/UpdateMemberResultsResponseArray.md new file mode 100644 index 0000000..ab1829e --- /dev/null +++ b/docs/UpdateMemberResultsResponseArray.md @@ -0,0 +1,12 @@ +# UpdateMemberResultsResponseArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[UpdateMemberResult]**](UpdateMemberResult.md) | List of members with updated business access role. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdatePartnerAssetAccessBody.md b/docs/UpdatePartnerAssetAccessBody.md new file mode 100644 index 0000000..f1f4c5a --- /dev/null +++ b/docs/UpdatePartnerAssetAccessBody.md @@ -0,0 +1,12 @@ +# UpdatePartnerAssetAccessBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accesses** | [**[UpdatePartnerAssetAccessBodyAccesses]**](UpdatePartnerAssetAccessBodyAccesses.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdatePartnerAssetAccessBodyAccesses.md b/docs/UpdatePartnerAssetAccessBodyAccesses.md new file mode 100644 index 0000000..a7db39c --- /dev/null +++ b/docs/UpdatePartnerAssetAccessBodyAccesses.md @@ -0,0 +1,14 @@ +# UpdatePartnerAssetAccessBodyAccesses + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**partner_id** | **str** | Unique identifier of a business partner to update asset access to. | +**asset_id** | **str** | Unique identifier of the business asset. | +**permissions** | [**[Permissions]**](Permissions.md) | A non-empty array of permissions to assign to the partner. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdatePartnerAssetsResult.md b/docs/UpdatePartnerAssetsResult.md new file mode 100644 index 0000000..771f41f --- /dev/null +++ b/docs/UpdatePartnerAssetsResult.md @@ -0,0 +1,16 @@ +# UpdatePartnerAssetsResult + +An object containing the permissions a business partner has on the asset. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_id** | **str** | Unique identifier of a business asset. | [optional] +**asset_type** | **str** | Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP. | [optional] +**partner_id** | **str** | Unique identifier of a business partner. | [optional] +**permissions** | [**PermissionsResponse**](PermissionsResponse.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdatePartnerAssetsResultsResponseArray.md b/docs/UpdatePartnerAssetsResultsResponseArray.md new file mode 100644 index 0000000..61c6d50 --- /dev/null +++ b/docs/UpdatePartnerAssetsResultsResponseArray.md @@ -0,0 +1,12 @@ +# UpdatePartnerAssetsResultsResponseArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[UpdatePartnerAssetsResult]**](UpdatePartnerAssetsResult.md) | List of assigned/updated partner asset access. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdatePartnerResultsResponseArray.md b/docs/UpdatePartnerResultsResponseArray.md new file mode 100644 index 0000000..addee76 --- /dev/null +++ b/docs/UpdatePartnerResultsResponseArray.md @@ -0,0 +1,12 @@ +# UpdatePartnerResultsResponseArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[UpdatePartnerResultsResponseArrayItems]**](UpdatePartnerResultsResponseArrayItems.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdatePartnerResultsResponseArrayItems.md b/docs/UpdatePartnerResultsResponseArrayItems.md new file mode 100644 index 0000000..af56877 --- /dev/null +++ b/docs/UpdatePartnerResultsResponseArrayItems.md @@ -0,0 +1,13 @@ +# UpdatePartnerResultsResponseArrayItems + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exception** | [**BusinessAccessError**](BusinessAccessError.md) | | [optional] +**member_or_partner_id** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAccountApi.md b/docs/UserAccountApi.md index 2110180..ad60686 100644 --- a/docs/UserAccountApi.md +++ b/docs/UserAccountApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**user_account_analytics**](UserAccountApi.md#user_account_analytics) | **GET** /user_account/analytics | Get user account analytics [**user_account_analytics_top_pins**](UserAccountApi.md#user_account_analytics_top_pins) | **GET** /user_account/analytics/top_pins | Get user account top pins analytics [**user_account_analytics_top_video_pins**](UserAccountApi.md#user_account_analytics_top_video_pins) | **GET** /user_account/analytics/top_video_pins | Get user account top video pins analytics +[**user_account_followed_interests**](UserAccountApi.md#user_account_followed_interests) | **GET** /users/{username}/interests/follow | List following interests [**user_account_get**](UserAccountApi.md#user_account_get) | **GET** /user_account | Get user account [**user_following_get**](UserAccountApi.md#user_following_get) | **GET** /user_account/following | List following [**user_websites_get**](UserAccountApi.md#user_websites_get) | **GET** /user_account/websites | Get user websites @@ -28,6 +29,7 @@ Get a list of the boards a user follows. The request returns a board summary obj ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -35,6 +37,7 @@ import time import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import user_account_api from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.board import Board from openapi_generated.pinterest_client.model.paginated import Paginated from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 @@ -48,6 +51,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -59,6 +68,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = user_account_api.UserAccountApi(api_client) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 explicit_following = False # bool | Whether or not to include implicit user follows, which means followees with board follows. When explicit_following is True, it means we only want explicit user follows. (optional) if omitted the server will use the default value of False ad_account_id = "4" # str | Unique identifier of an ad account. (optional) @@ -66,7 +76,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # and optional values try: # List following boards - api_response = api_instance.boards_user_follows_list(bookmark=bookmark, explicit_following=explicit_following, ad_account_id=ad_account_id) + api_response = api_instance.boards_user_follows_list(bookmark=bookmark, page_size=page_size, explicit_following=explicit_following, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling UserAccountApi->boards_user_follows_list: %s\n" % e) @@ -78,6 +88,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **explicit_following** | **bool**| Whether or not to include implicit user follows, which means followees with board follows. When explicit_following is True, it means we only want explicit user follows. | [optional] if omitted the server will use the default value of False **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] @@ -87,7 +98,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -110,7 +121,7 @@ Name | Type | Description | Notes Follow user -This endpoint is currently in beta and not available to all apps. Learn more. Use this request, as a signed-in user, to follow another user. +This endpoint is currently in beta and not available to all apps. Learn more. Use this request, as a signed-in user, to follow another user. ### Example @@ -196,10 +207,11 @@ Name | Type | Description | Notes List followers -Get a list of your followers, or a specific user's followers. +Get a list of your followers. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -208,6 +220,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import user_account_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.user_summary import UserSummary from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -220,6 +233,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -231,12 +250,13 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = user_account_api.UserAccountApi(api_client) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set # and optional values try: # List followers - api_response = api_instance.followers_list(bookmark=bookmark) + api_response = api_instance.followers_list(bookmark=bookmark, page_size=page_size) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling UserAccountApi->followers_list: %s\n" % e) @@ -248,6 +268,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 ### Return type @@ -255,7 +276,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -282,6 +303,7 @@ Get a list of your linked business accounts. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -302,6 +324,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -332,7 +360,7 @@ This endpoint does not need any parameter. ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -472,6 +500,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: from_claimed_content = "BOTH" # str | Filter on Pins that match your claimed domain. (optional) if omitted the server will use the default value of "BOTH" pin_format = "ALL" # str | Pin formats to get data for, default is all. (optional) if omitted the server will use the default value of "ALL" app_types = "ALL" # str | Apps or devices to get data for, default is all. (optional) if omitted the server will use the default value of "ALL" + content_type = "ALL" # str | Filter to paid or organic data. Default is all. (optional) if omitted the server will use the default value of "ALL" source = "ALL" # str | Filter to activity from Pins created and saved by your, or activity created and saved by others from your claimed accounts (optional) if omitted the server will use the default value of "ALL" metric_types = [ "ENGAGEMENT", @@ -491,7 +520,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # and optional values try: # Get user account analytics - api_response = api_instance.user_account_analytics(start_date, end_date, from_claimed_content=from_claimed_content, pin_format=pin_format, app_types=app_types, source=source, metric_types=metric_types, split_field=split_field, ad_account_id=ad_account_id) + api_response = api_instance.user_account_analytics(start_date, end_date, from_claimed_content=from_claimed_content, pin_format=pin_format, app_types=app_types, content_type=content_type, source=source, metric_types=metric_types, split_field=split_field, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling UserAccountApi->user_account_analytics: %s\n" % e) @@ -507,6 +536,7 @@ Name | Type | Description | Notes **from_claimed_content** | **str**| Filter on Pins that match your claimed domain. | [optional] if omitted the server will use the default value of "BOTH" **pin_format** | **str**| Pin formats to get data for, default is all. | [optional] if omitted the server will use the default value of "ALL" **app_types** | **str**| Apps or devices to get data for, default is all. | [optional] if omitted the server will use the default value of "ALL" + **content_type** | **str**| Filter to paid or organic data. Default is all. | [optional] if omitted the server will use the default value of "ALL" **source** | **str**| Filter to activity from Pins created and saved by your, or activity created and saved by others from your claimed accounts | [optional] if omitted the server will use the default value of "ALL" **metric_types** | **[str]**| Metric types to get data for, default is all. | [optional] **split_field** | **str**| How to split the data into groups. Not including this param means data won't be split. | [optional] if omitted the server will use the default value of "NO_SPLIT" @@ -546,6 +576,7 @@ Gets analytics data about a user's top pins (limited to the top 50). - By defaul ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -566,6 +597,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -633,7 +670,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -660,6 +697,7 @@ Gets analytics data about a user's top video pins (limited to the top 50). - By ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -680,6 +718,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -747,7 +791,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -765,15 +809,120 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **user_account_followed_interests** +> bool, date, datetime, dict, float, int, list, str, none_type user_account_followed_interests(username) + +List following interests + +Get a list of a user's following interests in one place. + +### Example + +* OAuth Authentication (client_credentials): +* OAuth Authentication (pinterest_oauth2): + +```python +import time +import openapi_generated.pinterest_client +from openapi_generated.pinterest_client.api import user_account_api +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.interest import Interest +from openapi_generated.pinterest_client.model.paginated import Paginated +from pprint import pprint +# Defining the host is optional and defaults to https://api.pinterest.com/v5 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Configure OAuth2 access token for authorization: pinterest_oauth2 +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = user_account_api.UserAccountApi(api_client) + username = "username" # str | A valid username + bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + try: + # List following interests + api_response = api_instance.user_account_followed_interests(username) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling UserAccountApi->user_account_followed_interests: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List following interests + api_response = api_instance.user_account_followed_interests(username, bookmark=bookmark, page_size=page_size) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling UserAccountApi->user_account_followed_interests: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| A valid username | + **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid parameters | - | +**401** | Authorization failed | - | +**404** | User not found | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **user_account_get** > Account user_account_get() Get user account -Get account information for the \"operation user_account\" - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. +Get account information for the \"operation user_account\" - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -794,6 +943,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -829,7 +984,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -856,6 +1011,7 @@ Get a list of who a certain user follows. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -865,6 +1021,7 @@ from openapi_generated.pinterest_client.api import user_account_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated from openapi_generated.pinterest_client.model.user_following_feed_type import UserFollowingFeedType +from openapi_generated.pinterest_client.model.user_summary import UserSummary from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -877,6 +1034,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -888,6 +1051,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = user_account_api.UserAccountApi(api_client) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 feed_type = UserFollowingFeedType("CREATOR_ONLY") # UserFollowingFeedType | Thrift param specifying what type of followees will be kept. Default to include all followees. (optional) explicit_following = False # bool | Whether or not to include implicit user follows, which means followees with board follows. When explicit_following is True, it means we only want explicit user follows. (optional) if omitted the server will use the default value of False ad_account_id = "4" # str | Unique identifier of an ad account. (optional) @@ -896,7 +1060,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # and optional values try: # List following - api_response = api_instance.user_following_get(bookmark=bookmark, feed_type=feed_type, explicit_following=explicit_following, ad_account_id=ad_account_id) + api_response = api_instance.user_following_get(bookmark=bookmark, page_size=page_size, feed_type=feed_type, explicit_following=explicit_following, ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling UserAccountApi->user_following_get: %s\n" % e) @@ -908,6 +1072,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 **feed_type** | **UserFollowingFeedType**| Thrift param specifying what type of followees will be kept. Default to include all followees. | [optional] **explicit_following** | **bool**| Whether or not to include implicit user follows, which means followees with board follows. When explicit_following is True, it means we only want explicit user follows. | [optional] if omitted the server will use the default value of False **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] @@ -918,7 +1083,7 @@ Name | Type | Description | Notes ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers @@ -952,6 +1117,7 @@ import openapi_generated.pinterest_client from openapi_generated.pinterest_client.api import user_account_api from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.user_website_summary import UserWebsiteSummary from pprint import pprint # Defining the host is optional and defaults to https://api.pinterest.com/v5 # See configuration.py for a list of all supported configuration parameters. @@ -975,12 +1141,13 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = user_account_api.UserAccountApi(api_client) bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional) + page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set # and optional values try: # Get user websites - api_response = api_instance.user_websites_get(bookmark=bookmark) + api_response = api_instance.user_websites_get(bookmark=bookmark, page_size=page_size) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling UserAccountApi->user_websites_get: %s\n" % e) @@ -992,6 +1159,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bookmark** | **str**| Cursor used to fetch the next page of items | [optional] + **page_size** | **int**| Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 ### Return type @@ -1061,6 +1229,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: website="pintest-website-12345678.test/test_1", verification_method="METATAG", ) # UserWebsiteVerifyRequest | Verify a website. + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) # example passing only required values which don't have defaults set try: @@ -1069,6 +1238,15 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling UserAccountApi->verify_website_update: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Verify website + api_response = api_instance.verify_website_update(user_website_verify_request, ad_account_id=ad_account_id) + pprint(api_response) + except openapi_generated.pinterest_client.ApiException as e: + print("Exception when calling UserAccountApi->verify_website_update: %s\n" % e) ``` @@ -1077,6 +1255,7 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_website_verify_request** | [**UserWebsiteVerifyRequest**](UserWebsiteVerifyRequest.md)| Verify a website. | + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type @@ -1110,6 +1289,7 @@ Get verification code for user to install on the website to claim it. ### Example +* OAuth Authentication (client_credentials): * OAuth Authentication (pinterest_oauth2): ```python @@ -1130,6 +1310,12 @@ configuration = openapi_generated.pinterest_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. +# Configure OAuth2 access token for authorization: client_credentials +configuration = openapi_generated.pinterest_client.Configuration( + host = "https://api.pinterest.com/v5" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Configure OAuth2 access token for authorization: pinterest_oauth2 configuration = openapi_generated.pinterest_client.Configuration( host = "https://api.pinterest.com/v5" @@ -1140,11 +1326,13 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = user_account_api.UserAccountApi(api_client) + ad_account_id = "4" # str | Unique identifier of an ad account. (optional) - # example, this endpoint has no required or optional parameters + # example passing only required values which don't have defaults set + # and optional values try: # Get user verification code for website claiming - api_response = api_instance.website_verification_get() + api_response = api_instance.website_verification_get(ad_account_id=ad_account_id) pprint(api_response) except openapi_generated.pinterest_client.ApiException as e: print("Exception when calling UserAccountApi->website_verification_get: %s\n" % e) @@ -1152,7 +1340,10 @@ with openapi_generated.pinterest_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ad_account_id** | **str**| Unique identifier of an ad account. | [optional] ### Return type @@ -1160,7 +1351,7 @@ This endpoint does not need any parameter. ### Authorization -[pinterest_oauth2](../README.md#pinterest_oauth2) +[client_credentials](../README.md#client_credentials), [pinterest_oauth2](../README.md#pinterest_oauth2) ### HTTP request headers diff --git a/docs/UserBusinessRoleBinding.md b/docs/UserBusinessRoleBinding.md new file mode 100644 index 0000000..9945496 --- /dev/null +++ b/docs/UserBusinessRoleBinding.md @@ -0,0 +1,19 @@ +# UserBusinessRoleBinding + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets_summary** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] +**business_roles** | **[str]** | The access level a user has on the business. This can be EMPLOYEE, BIZ_ADMIN, or PARTNER. | [optional] +**created_by_business** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Metadata for the business that created the business relationship. | [optional] +**created_by_user** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Metadata for the user that created the business relationship. | [optional] +**created_time** | **int, none_type** | The time the business relationship was created. Returned in milliseconds. | [optional] +**id** | **str** | Unique identifier of the business member/business partner/employer. | [optional] +**is_shared_partner** | **bool** | This field is only relevant when business_role=\"PARTNER\". <br>If is_shared_partner=FALSE, the partner can access your business assets. If assets_summary is not empty, the assets listed are your business assets the partner has access to. <br>If is_shared_partner=TRUE, you can access the partner's business asset. If assets_summary is not empty, the assets listed are the partner's business assets you have access to. | [optional] +**user** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Metadata for the business member/business partner/employer. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserSingleAssetBinding.md b/docs/UserSingleAssetBinding.md new file mode 100644 index 0000000..4fe8a41 --- /dev/null +++ b/docs/UserSingleAssetBinding.md @@ -0,0 +1,14 @@ +# UserSingleAssetBinding + +An object containing the permissions a business member/partner has on the asset. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**permissions** | [**PermissionsResponse**](PermissionsResponse.md) | | [optional] +**user** | [**BusinessAccessUserSummary**](BusinessAccessUserSummary.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsersForIndividualAssetResponse.md b/docs/UsersForIndividualAssetResponse.md new file mode 100644 index 0000000..0c7b367 --- /dev/null +++ b/docs/UsersForIndividualAssetResponse.md @@ -0,0 +1,15 @@ +# UsersForIndividualAssetResponse + +An object containing the permissions a business member has on the asset. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_id** | **str** | Unique identifier of a business asset. | [optional] +**member_id** | **str** | Unique identifier of the business member with asset access. | [optional] +**permissions** | [**PermissionsResponse**](PermissionsResponse.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VideoMetadata.md b/docs/VideoMetadata.md index ed22841..7cbb45e 100644 --- a/docs/VideoMetadata.md +++ b/docs/VideoMetadata.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **item_type** | **str** | | [optional] **cover_image_url** | **str** | | [optional] +**video_url** | **str, none_type** | Video url (720p). </p><strong>Note:</strong> This field is limited and not available to all apps. | [optional] **duration** | **float** | Duration (in milliseconds) | [optional] **height** | **int** | Height (in pixels) | [optional] **width** | **int** | Width (in pixels) | [optional] diff --git a/openapi_generated/pinterest_client/__init__.py b/openapi_generated/pinterest_client/__init__.py index 7484a0d..a6fbe81 100644 --- a/openapi_generated/pinterest_client/__init__.py +++ b/openapi_generated/pinterest_client/__init__.py @@ -5,13 +5,13 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ -__version__ = "0.1.8" +__version__ = "0.1.9" # import ApiClient from openapi_generated.pinterest_client.api_client import ApiClient diff --git a/openapi_generated/pinterest_client/api/ad_accounts_api.py b/openapi_generated/pinterest_client/api/ad_accounts_api.py index fdaeaf0..9a5236d 100644 --- a/openapi_generated/pinterest_client/api/ad_accounts_api.py +++ b/openapi_generated/pinterest_client/api/ad_accounts_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -30,10 +30,14 @@ from openapi_generated.pinterest_client.model.ads_analytics_get_async_response import AdsAnalyticsGetAsyncResponse from openapi_generated.pinterest_client.model.ads_analytics_targeting_type import AdsAnalyticsTargetingType from openapi_generated.pinterest_client.model.conversion_report_attribution_type import ConversionReportAttributionType +from openapi_generated.pinterest_client.model.create_mmm_report_request import CreateMMMReportRequest +from openapi_generated.pinterest_client.model.create_mmm_report_response import CreateMMMReportResponse from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.get_mmm_report_response import GetMMMReportResponse from openapi_generated.pinterest_client.model.granularity import Granularity from openapi_generated.pinterest_client.model.metrics_response import MetricsResponse from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.template_response import TemplateResponse class AdAccountsApi(object): @@ -148,6 +152,7 @@ def __init__(self, api_client=None): "TOTAL_IMPRESSION": "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY", + "COST_PER_OUTBOUND_CLICK_IN_DOLLAR": "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD", @@ -183,6 +188,7 @@ def __init__(self, api_client=None): "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS", "CHECKOUT_ROAS": "CHECKOUT_ROAS", "CUSTOM_ROAS": "CUSTOM_ROAS", + "VIDEO_MRC_VIEWS_1": "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2", @@ -191,6 +197,7 @@ def __init__(self, api_client=None): "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2", + "PAID_VIDEO_VIEWABLE_RATE": "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH": "VIDEO_LENGTH", "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR", "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR", @@ -223,6 +230,7 @@ def __init__(self, api_client=None): "LEADS": "LEADS", "COST_PER_LEAD": "COST_PER_LEAD", "QUIZ_COMPLETED": "QUIZ_COMPLETED", + "QUIZ_PIN_RESULT_OPEN": "QUIZ_PIN_RESULT_OPEN", "QUIZ_COMPLETION_RATE": "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH": "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH": "SHOWCASE_SUBPAGE_CLICKTHROUGH", @@ -447,6 +455,7 @@ def __init__(self, api_client=None): "TOTAL_IMPRESSION": "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY", + "COST_PER_OUTBOUND_CLICK_IN_DOLLAR": "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD", @@ -482,6 +491,7 @@ def __init__(self, api_client=None): "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS", "CHECKOUT_ROAS": "CHECKOUT_ROAS", "CUSTOM_ROAS": "CUSTOM_ROAS", + "VIDEO_MRC_VIEWS_1": "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2", @@ -490,6 +500,7 @@ def __init__(self, api_client=None): "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2", + "PAID_VIDEO_VIEWABLE_RATE": "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH": "VIDEO_LENGTH", "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR", "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR", @@ -522,6 +533,7 @@ def __init__(self, api_client=None): "LEADS": "LEADS", "COST_PER_LEAD": "COST_PER_LEAD", "QUIZ_COMPLETED": "QUIZ_COMPLETED", + "QUIZ_PIN_RESULT_OPEN": "QUIZ_PIN_RESULT_OPEN", "QUIZ_COMPLETION_RATE": "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH": "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH": "SHOWCASE_SUBPAGE_CLICKTHROUGH", @@ -820,6 +832,71 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.analytics_create_mmm_report_endpoint = _Endpoint( + settings={ + 'response_type': (CreateMMMReportResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/mmm_reports', + 'operation_id': 'analytics_create_mmm_report', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'create_mmm_report_request', + ], + 'required': [ + 'ad_account_id', + 'create_mmm_report_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'create_mmm_report_request': + (CreateMMMReportRequest,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'create_mmm_report_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) self.analytics_create_report_endpoint = _Endpoint( settings={ 'response_type': (AdsAnalyticsCreateAsyncResponse,), @@ -971,6 +1048,70 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.analytics_get_mmm_report_endpoint = _Endpoint( + settings={ + 'response_type': (GetMMMReportResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/mmm_reports', + 'operation_id': 'analytics_get_mmm_report', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'token', + ], + 'required': [ + 'ad_account_id', + 'token', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'token': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'token': 'token', + }, + 'location_map': { + 'ad_account_id': 'path', + 'token': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.analytics_get_report_endpoint = _Endpoint( settings={ 'response_type': (AdsAnalyticsGetAsyncResponse,), @@ -1300,7 +1441,7 @@ def ad_account_targeting_analytics_get( ad_account_id (str): Unique identifier of an ad account. start_date (date): Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. end_date (date): Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. - targeting_types ([AdsAnalyticsTargetingType]): Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. + targeting_types ([AdsAnalyticsTargetingType]): Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. columns ([str]): Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.
For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned granularity (Granularity): TOTAL - metrics are aggregated over the specified date range.
DAY - metrics are broken down daily.
HOUR - metrics are broken down hourly.
WEEKLY - metrics are broken down weekly.
MONTHLY - metrics are broken down monthly @@ -1552,7 +1693,7 @@ def ad_accounts_list( Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 include_shared_accounts (bool): Include shared ad accounts. [optional] if omitted the server will use the default value of True _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -1612,6 +1753,88 @@ def ad_accounts_list( kwargs['_host_index'] = kwargs.get('_host_index') return self.ad_accounts_list_endpoint.call_with_http_info(**kwargs) + def analytics_create_mmm_report( + self, + ad_account_id, + create_mmm_report_request, + **kwargs + ): + """Create a request for a Marketing Mix Modeling (MMM) report # noqa: E501 + + This creates an asynchronous mmm report based on the given request. It returns a token that you can use to download the report when it is ready. NOTE: An additional limit of 5 queries per minute per advertiser applies to this endpoint while it's in beta release. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.analytics_create_mmm_report(ad_account_id, create_mmm_report_request, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + create_mmm_report_request (CreateMMMReportRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CreateMMMReportResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['create_mmm_report_request'] = \ + create_mmm_report_request + return self.analytics_create_mmm_report_endpoint.call_with_http_info(**kwargs) + def analytics_create_report( self, ad_account_id, @@ -1620,7 +1843,7 @@ def analytics_create_report( ): """Create async request for an account analytics report # noqa: E501 - This returns a token that you can use to download the report when it is ready. Note that this endpoint requires the parameters to be passed as JSON-formatted in the request body. This endpoint does not support URL query parameters. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. - If granularity is not HOUR, the furthest back you can are allowed to pull data is 914 days before the current date in UTC time and the max time range supported is 186 days. - If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days. - If level is PRODUCT_ITEM, the furthest back you can are allowed to pull data is 92 days before the current date in UTC time and the max time range supported is 31 days. # noqa: E501 + This returns a token that you can use to download the report when it is ready. Note that this endpoint requires the parameters to be passed as JSON-formatted in the request body. This endpoint does not support URL query parameters. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. - If granularity is not HOUR, the furthest back you can are allowed to pull data is 914 days before the current date in UTC time and the max time range supported is 186 days. - If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days. - If level is PRODUCT_ITEM, the furthest back you can are allowed to pull data is 92 days before the current date in UTC time and the max time range supported is 31 days. - If level is PRODUCT_ITEM, ad_ids and ad_statuses parameters are not allowed. Any columns related to pin promotion and ad is not allowed either. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1779,6 +2002,88 @@ def analytics_create_template_report( template_id return self.analytics_create_template_report_endpoint.call_with_http_info(**kwargs) + def analytics_get_mmm_report( + self, + ad_account_id, + token, + **kwargs + ): + """Get advertiser Marketing Mix Modeling (MMM) report. # noqa: E501 + + Get an mmm report for an ad account. This returns a URL to an mmm metrics report given a token returned from the create mmm report endpoint. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.analytics_get_mmm_report(ad_account_id, token, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + token (str): Token returned from the post request creation call + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GetMMMReportResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['token'] = \ + token + return self.analytics_get_mmm_report_endpoint.call_with_http_info(**kwargs) + def analytics_get_report( self, ad_account_id, @@ -1787,7 +2092,7 @@ def analytics_get_report( ): """Get the account analytics report created by the async call # noqa: E501 - This returns a URL to an analytics report given a token returned from the post request report creation call. You can use the URL to download the report and it's valid for an hour. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. # noqa: E501 + This returns a URL to an analytics report given a token returned from the post request report creation call. You can use the URL to download the report. The link is valid for five minutes and the report is valid for one hour. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1868,7 +2173,7 @@ def sandbox_delete( ): """Delete ads data for ad account in API Sandbox # noqa: E501 - Delete an ad account and all the ads data associated with that account. A string message is returned indicating the status of the delete operation. Note: This endpoint is only allowed in the Pinterest API Sandbox (https://api-sandbox.pinterest.com/v5). Go to https://developers.pinterest.com/docs/dev-tools/sandbox/ for more information. # noqa: E501 + Delete an ad account and all the ads data associated with that account. A string message is returned indicating the status of the delete operation. Note: This endpoint is only allowed in the Pinterest API Sandbox (https://api-sandbox.pinterest.com/v5). Go to /docs/developer-tools/sandbox/ for more information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1957,7 +2262,7 @@ def templates_list( ad_account_id (str): Unique identifier of an ad account. Keyword Args: - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] _return_http_data_only (bool): response data without head status diff --git a/openapi_generated/pinterest_client/api/ad_groups_api.py b/openapi_generated/pinterest_client/api/ad_groups_api.py index ce53751..4ded301 100644 --- a/openapi_generated/pinterest_client/api/ad_groups_api.py +++ b/openapi_generated/pinterest_client/api/ad_groups_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -23,6 +23,8 @@ validate_and_convert_types ) from openapi_generated.pinterest_client.model.ad_group_array_response import AdGroupArrayResponse +from openapi_generated.pinterest_client.model.ad_group_audience_sizing_request import AdGroupAudienceSizingRequest +from openapi_generated.pinterest_client.model.ad_group_audience_sizing_response import AdGroupAudienceSizingResponse from openapi_generated.pinterest_client.model.ad_group_create_request import AdGroupCreateRequest from openapi_generated.pinterest_client.model.ad_group_response import AdGroupResponse from openapi_generated.pinterest_client.model.ad_group_update_request import AdGroupUpdateRequest @@ -157,6 +159,7 @@ def __init__(self, api_client=None): "TOTAL_IMPRESSION": "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY", + "COST_PER_OUTBOUND_CLICK_IN_DOLLAR": "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD", @@ -192,6 +195,7 @@ def __init__(self, api_client=None): "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS", "CHECKOUT_ROAS": "CHECKOUT_ROAS", "CUSTOM_ROAS": "CUSTOM_ROAS", + "VIDEO_MRC_VIEWS_1": "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2", @@ -200,6 +204,7 @@ def __init__(self, api_client=None): "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2", + "PAID_VIDEO_VIEWABLE_RATE": "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH": "VIDEO_LENGTH", "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR", "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR", @@ -232,6 +237,7 @@ def __init__(self, api_client=None): "LEADS": "LEADS", "COST_PER_LEAD": "COST_PER_LEAD", "QUIZ_COMPLETED": "QUIZ_COMPLETED", + "QUIZ_PIN_RESULT_OPEN": "QUIZ_PIN_RESULT_OPEN", "QUIZ_COMPLETION_RATE": "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH": "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH": "SHOWCASE_SUBPAGE_CLICKTHROUGH", @@ -351,6 +357,70 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.ad_groups_audience_sizing_endpoint = _Endpoint( + settings={ + 'response_type': (AdGroupAudienceSizingResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/ad_groups/audience_sizing', + 'operation_id': 'ad_groups_audience_sizing', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'ad_group_audience_sizing_request', + ], + 'required': [ + 'ad_account_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'ad_group_audience_sizing_request': + (AdGroupAudienceSizingRequest,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'ad_group_audience_sizing_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) self.ad_groups_bid_floor_get_endpoint = _Endpoint( settings={ 'response_type': (BidFloor,), @@ -625,7 +695,9 @@ def __init__(self, api_client=None): "ACTIVE": "ACTIVE", "PAUSED": "PAUSED", - "ARCHIVED": "ARCHIVED" + "ARCHIVED": "ARCHIVED", + "DRAFT": "DRAFT", + "DELETED_DRAFT": "DELETED_DRAFT" }, ('order',): { @@ -803,6 +875,7 @@ def __init__(self, api_client=None): "TOTAL_IMPRESSION": "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY", + "COST_PER_OUTBOUND_CLICK_IN_DOLLAR": "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD", @@ -838,6 +911,7 @@ def __init__(self, api_client=None): "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS", "CHECKOUT_ROAS": "CHECKOUT_ROAS", "CUSTOM_ROAS": "CUSTOM_ROAS", + "VIDEO_MRC_VIEWS_1": "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2", @@ -846,6 +920,7 @@ def __init__(self, api_client=None): "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2", + "PAID_VIDEO_VIEWABLE_RATE": "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH": "VIDEO_LENGTH", "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR", "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR", @@ -878,6 +953,7 @@ def __init__(self, api_client=None): "LEADS": "LEADS", "COST_PER_LEAD": "COST_PER_LEAD", "QUIZ_COMPLETED": "QUIZ_COMPLETED", + "QUIZ_PIN_RESULT_OPEN": "QUIZ_PIN_RESULT_OPEN", "QUIZ_COMPLETION_RATE": "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH": "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH": "SHOWCASE_SUBPAGE_CLICKTHROUGH", @@ -1180,6 +1256,85 @@ def ad_groups_analytics( granularity return self.ad_groups_analytics_endpoint.call_with_http_info(**kwargs) + def ad_groups_audience_sizing( + self, + ad_account_id, + **kwargs + ): + """Get audience sizing # noqa: E501 + + Get potential audience size for an ad group with given targeting criteria. Potential audience size estimates the number of people you may be able to reach per month with your campaign. It is based on historical advertising data and the targeting criteria you select. It does not guarantee results or take into account factors such as bid, budget, schedule, seasonality or product experiments. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ad_groups_audience_sizing(ad_account_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + + Keyword Args: + ad_group_audience_sizing_request (AdGroupAudienceSizingRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AdGroupAudienceSizingResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + return self.ad_groups_audience_sizing_endpoint.call_with_http_info(**kwargs) + def ad_groups_bid_floor_get( self, ad_account_id, @@ -1447,7 +1602,7 @@ def ad_groups_list( campaign_ids ([str]): List of Campaign Ids to use to filter the results.. [optional] ad_group_ids ([str]): List of Ad group Ids to use to filter the results.. [optional] entity_statuses ([str]): Entity status. [optional] if omitted the server will use the default value of ["ACTIVE","PAUSED"] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] translate_interests_to_names (bool): Return interests as text names (if value is true) rather than topic IDs.. [optional] if omitted the server will use the default value of False @@ -1536,7 +1691,7 @@ def ad_groups_targeting_analytics_get( ad_group_ids ([str]): List of Ad group Ids to use to filter the results. start_date (date): Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. end_date (date): Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. - targeting_types ([AdsAnalyticsTargetingType]): Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. + targeting_types ([AdsAnalyticsTargetingType]): Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. columns ([str]): Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.
For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned granularity (Granularity): TOTAL - metrics are aggregated over the specified date range.
DAY - metrics are broken down daily.
HOUR - metrics are broken down hourly.
WEEKLY - metrics are broken down weekly.
MONTHLY - metrics are broken down monthly diff --git a/openapi_generated/pinterest_client/api/ads_api.py b/openapi_generated/pinterest_client/api/ads_api.py index 4421b19..4b0395a 100644 --- a/openapi_generated/pinterest_client/api/ads_api.py +++ b/openapi_generated/pinterest_client/api/ads_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -28,8 +28,8 @@ from openapi_generated.pinterest_client.model.ad_preview_url_response import AdPreviewURLResponse from openapi_generated.pinterest_client.model.ad_response import AdResponse from openapi_generated.pinterest_client.model.ad_update_request import AdUpdateRequest +from openapi_generated.pinterest_client.model.ads_analytics_ad_targeting_type import AdsAnalyticsAdTargetingType from openapi_generated.pinterest_client.model.ads_analytics_response import AdsAnalyticsResponse -from openapi_generated.pinterest_client.model.ads_analytics_targeting_type import AdsAnalyticsTargetingType from openapi_generated.pinterest_client.model.conversion_report_attribution_type import ConversionReportAttributionType from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.granularity import Granularity @@ -178,7 +178,7 @@ def __init__(self, api_client=None): }, ('targeting_types',): { - 'max_items': 15, + 'max_items': 14, 'min_items': 1, }, }, @@ -231,6 +231,7 @@ def __init__(self, api_client=None): "TOTAL_IMPRESSION": "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY", + "COST_PER_OUTBOUND_CLICK_IN_DOLLAR": "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD", @@ -266,6 +267,7 @@ def __init__(self, api_client=None): "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS", "CHECKOUT_ROAS": "CHECKOUT_ROAS", "CUSTOM_ROAS": "CUSTOM_ROAS", + "VIDEO_MRC_VIEWS_1": "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2", @@ -274,6 +276,7 @@ def __init__(self, api_client=None): "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2", + "PAID_VIDEO_VIEWABLE_RATE": "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH": "VIDEO_LENGTH", "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR", "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR", @@ -306,6 +309,7 @@ def __init__(self, api_client=None): "LEADS": "LEADS", "COST_PER_LEAD": "COST_PER_LEAD", "QUIZ_COMPLETED": "QUIZ_COMPLETED", + "QUIZ_PIN_RESULT_OPEN": "QUIZ_PIN_RESULT_OPEN", "QUIZ_COMPLETION_RATE": "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH": "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH": "SHOWCASE_SUBPAGE_CLICKTHROUGH", @@ -376,7 +380,7 @@ def __init__(self, api_client=None): 'end_date': (date,), 'targeting_types': - ([AdsAnalyticsTargetingType],), + ([AdsAnalyticsAdTargetingType],), 'columns': ([str],), 'granularity': @@ -450,19 +454,20 @@ def __init__(self, api_client=None): 'ad_account_id', 'start_date', 'end_date', - 'ad_ids', 'columns', 'granularity', + 'ad_ids', 'click_window_days', 'engagement_window_days', 'view_window_days', 'conversion_report_time', + 'pin_ids', + 'campaign_ids', ], 'required': [ 'ad_account_id', 'start_date', 'end_date', - 'ad_ids', 'columns', 'granularity', ], @@ -478,6 +483,8 @@ def __init__(self, api_client=None): 'validation': [ 'ad_account_id', 'ad_ids', + 'pin_ids', + 'campaign_ids', ] }, root_map={ @@ -490,6 +497,16 @@ def __init__(self, api_client=None): }, ('ad_ids',): { + 'max_items': 100, + 'min_items': 1, + }, + ('pin_ids',): { + + 'max_items': 100, + 'min_items': 1, + }, + ('campaign_ids',): { + 'max_items': 100, 'min_items': 1, }, @@ -543,6 +560,7 @@ def __init__(self, api_client=None): "TOTAL_IMPRESSION": "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY", + "COST_PER_OUTBOUND_CLICK_IN_DOLLAR": "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD", @@ -578,6 +596,7 @@ def __init__(self, api_client=None): "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS", "CHECKOUT_ROAS": "CHECKOUT_ROAS", "CUSTOM_ROAS": "CUSTOM_ROAS", + "VIDEO_MRC_VIEWS_1": "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2", @@ -586,6 +605,7 @@ def __init__(self, api_client=None): "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2", + "PAID_VIDEO_VIEWABLE_RATE": "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH": "VIDEO_LENGTH", "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR", "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR", @@ -618,6 +638,7 @@ def __init__(self, api_client=None): "LEADS": "LEADS", "COST_PER_LEAD": "COST_PER_LEAD", "QUIZ_COMPLETED": "QUIZ_COMPLETED", + "QUIZ_PIN_RESULT_OPEN": "QUIZ_PIN_RESULT_OPEN", "QUIZ_COMPLETION_RATE": "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH": "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH": "SHOWCASE_SUBPAGE_CLICKTHROUGH", @@ -685,12 +706,12 @@ def __init__(self, api_client=None): (date,), 'end_date': (date,), - 'ad_ids': - ([str],), 'columns': ([str],), 'granularity': (Granularity,), + 'ad_ids': + ([str],), 'click_window_days': (int,), 'engagement_window_days': @@ -699,34 +720,44 @@ def __init__(self, api_client=None): (int,), 'conversion_report_time': (str,), + 'pin_ids': + ([str],), + 'campaign_ids': + ([str],), }, 'attribute_map': { 'ad_account_id': 'ad_account_id', 'start_date': 'start_date', 'end_date': 'end_date', - 'ad_ids': 'ad_ids', 'columns': 'columns', 'granularity': 'granularity', + 'ad_ids': 'ad_ids', 'click_window_days': 'click_window_days', 'engagement_window_days': 'engagement_window_days', 'view_window_days': 'view_window_days', 'conversion_report_time': 'conversion_report_time', + 'pin_ids': 'pin_ids', + 'campaign_ids': 'campaign_ids', }, 'location_map': { 'ad_account_id': 'path', 'start_date': 'query', 'end_date': 'query', - 'ad_ids': 'query', 'columns': 'query', 'granularity': 'query', + 'ad_ids': 'query', 'click_window_days': 'query', 'engagement_window_days': 'query', 'view_window_days': 'query', 'conversion_report_time': 'query', + 'pin_ids': 'query', + 'campaign_ids': 'query', }, 'collection_format_map': { - 'ad_ids': 'multi', 'columns': 'csv', + 'ad_ids': 'multi', + 'pin_ids': 'multi', + 'campaign_ids': 'multi', } }, headers_map={ @@ -952,7 +983,9 @@ def __init__(self, api_client=None): "ACTIVE": "ACTIVE", "PAUSED": "PAUSED", - "ARCHIVED": "ARCHIVED" + "ARCHIVED": "ARCHIVED", + "DRAFT": "DRAFT", + "DELETED_DRAFT": "DELETED_DRAFT" }, ('order',): { @@ -1093,7 +1126,7 @@ def ad_previews_create( ): """Create ad preview with pin or image # noqa: E501 - Create an ad preview given an ad account ID and either an existing organic pin ID or the URL for an image to be used to create the Pin and the ad.

If you are creating a preview from an existing Pin, that Pin must be promotable: that is, it must have a clickthrough link and meet other requirements. (See Ads Overview.)

You can view the returned preview URL on a webpage or iframe for 7 days, after which the URL expires. # noqa: E501 + Create an ad preview given an ad account ID and either an existing organic pin ID or the URL for an image to be used to create the Pin and the ad.

If you are creating a preview from an existing Pin, that Pin must be promotable: that is, it must have a clickthrough link and meet other requirements. (See Ads Overview.)

You can view the returned preview URL on a webpage or iframe for 7 days, after which the URL expires. Collection ads are not currently supported ad preview. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1192,7 +1225,7 @@ def ad_targeting_analytics_get( ad_ids ([str]): List of Ad Ids to use to filter the results. start_date (date): Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. end_date (date): Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. - targeting_types ([AdsAnalyticsTargetingType]): Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. + targeting_types ([AdsAnalyticsAdTargetingType]): Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. columns ([str]): Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.
For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned granularity (Granularity): TOTAL - metrics are aggregated over the specified date range.
DAY - metrics are broken down daily.
HOUR - metrics are broken down hourly.
WEEKLY - metrics are broken down weekly.
MONTHLY - metrics are broken down monthly @@ -1279,33 +1312,34 @@ def ads_analytics( ad_account_id, start_date, end_date, - ad_ids, columns, granularity, **kwargs ): """Get ad analytics # noqa: E501 - Get analytics for the specified ads in the specified ad_account_id, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. - If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days. - If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days. # noqa: E501 + Get analytics for the specified ads in the specified ad_account_id, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. - The request must contain either ad_ids or both campaign_ids and pin_ids. - If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days. - If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.ads_analytics(ad_account_id, start_date, end_date, ad_ids, columns, granularity, async_req=True) + >>> thread = api.ads_analytics(ad_account_id, start_date, end_date, columns, granularity, async_req=True) >>> result = thread.get() Args: ad_account_id (str): Unique identifier of an ad account. start_date (date): Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. end_date (date): Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. - ad_ids ([str]): List of Ad Ids to use to filter the results. columns ([str]): Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.
For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned granularity (Granularity): TOTAL - metrics are aggregated over the specified date range.
DAY - metrics are broken down daily.
HOUR - metrics are broken down hourly.
WEEKLY - metrics are broken down weekly.
MONTHLY - metrics are broken down monthly Keyword Args: + ad_ids ([str]): List of Ad Ids to use to filter the results.. [optional] click_window_days (int): Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.. [optional] if omitted the server will use the default value of 30 engagement_window_days (int): Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.. [optional] if omitted the server will use the default value of 30 view_window_days (int): Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.. [optional] if omitted the server will use the default value of 1 conversion_report_time (str): The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.. [optional] if omitted the server will use the default value of "TIME_OF_AD_ACTION" + pin_ids ([str]): List of Pin IDs.. [optional] + campaign_ids ([str]): List of Campaign Ids to use to filter the results.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -1368,8 +1402,6 @@ def ads_analytics( start_date kwargs['end_date'] = \ end_date - kwargs['ad_ids'] = \ - ad_ids kwargs['columns'] = \ columns kwargs['granularity'] = \ @@ -1562,7 +1594,7 @@ def ads_list( ad_group_ids ([str]): List of Ad group Ids to use to filter the results.. [optional] ad_ids ([str]): List of Ad Ids to use to filter the results.. [optional] entity_statuses ([str]): Entity status. [optional] if omitted the server will use the default value of ["ACTIVE","PAUSED"] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] _return_http_data_only (bool): response data without head status diff --git a/openapi_generated/pinterest_client/api/advanced_auction_api.py b/openapi_generated/pinterest_client/api/advanced_auction_api.py new file mode 100644 index 0000000..5c8c253 --- /dev/null +++ b/openapi_generated/pinterest_client/api/advanced_auction_api.py @@ -0,0 +1,329 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.api_client import ApiClient, Endpoint as _Endpoint +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from openapi_generated.pinterest_client.model.advanced_auction_items import AdvancedAuctionItems +from openapi_generated.pinterest_client.model.advanced_auction_items_get_request import AdvancedAuctionItemsGetRequest +from openapi_generated.pinterest_client.model.advanced_auction_items_submit_request import AdvancedAuctionItemsSubmitRequest +from openapi_generated.pinterest_client.model.advanced_auction_processed_items import AdvancedAuctionProcessedItems +from openapi_generated.pinterest_client.model.error import Error + + +class AdvancedAuctionApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.advanced_auction_items_get_post_endpoint = _Endpoint( + settings={ + 'response_type': (AdvancedAuctionItems,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/advanced_auction/items/get', + 'operation_id': 'advanced_auction_items_get_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'advanced_auction_items_get_request', + 'ad_account_id', + ], + 'required': [ + 'advanced_auction_items_get_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'advanced_auction_items_get_request': + (AdvancedAuctionItemsGetRequest,), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'advanced_auction_items_get_request': 'body', + 'ad_account_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.advanced_auction_items_submit_post_endpoint = _Endpoint( + settings={ + 'response_type': (AdvancedAuctionProcessedItems,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/advanced_auction/items/submit', + 'operation_id': 'advanced_auction_items_submit_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'advanced_auction_items_submit_request', + 'ad_account_id', + ], + 'required': [ + 'advanced_auction_items_submit_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'advanced_auction_items_submit_request': + (AdvancedAuctionItemsSubmitRequest,), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'advanced_auction_items_submit_request': 'body', + 'ad_account_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def advanced_auction_items_get_post( + self, + advanced_auction_items_get_request, + **kwargs + ): + """Get item bid options (POST) # noqa: E501 + + Get the bid options for a batch of retail catalog items. The catalog must be owned by the \"operation user_account\". See detailed documentation here. By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: `Owner`, `Admin`. This endpoint is not available to all users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.advanced_auction_items_get_post(advanced_auction_items_get_request, async_req=True) + >>> result = thread.get() + + Args: + advanced_auction_items_get_request (AdvancedAuctionItemsGetRequest): Request object used to get bid options values for a batch of retail catalog items + + Keyword Args: + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AdvancedAuctionItems + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['advanced_auction_items_get_request'] = \ + advanced_auction_items_get_request + return self.advanced_auction_items_get_post_endpoint.call_with_http_info(**kwargs) + + def advanced_auction_items_submit_post( + self, + advanced_auction_items_submit_request, + **kwargs + ): + """Operate on item level bid options # noqa: E501 + + This endpoint supports multiple operations on a set of one or more bid options (bid price and bid adjustments for targeting categories) for retail catalog items. These advanced auction settings are applied in campaigns using objective_type `CATALOG_SALES` and ad groups using bid_strategy_type `MAX_BID`. The catalog must be owned by the \"operation user_account\". See detailed documentation here. By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: `Owner`, `Admin`. This endpoint is not available to all users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.advanced_auction_items_submit_post(advanced_auction_items_submit_request, async_req=True) + >>> result = thread.get() + + Args: + advanced_auction_items_submit_request (AdvancedAuctionItemsSubmitRequest): Request object used to upsert or delete bid options for a batch of retail catalog items + + Keyword Args: + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AdvancedAuctionProcessedItems + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['advanced_auction_items_submit_request'] = \ + advanced_auction_items_submit_request + return self.advanced_auction_items_submit_post_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/audience_insights_api.py b/openapi_generated/pinterest_client/api/audience_insights_api.py index f890044..78a976c 100644 --- a/openapi_generated/pinterest_client/api/audience_insights_api.py +++ b/openapi_generated/pinterest_client/api/audience_insights_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -23,7 +23,6 @@ validate_and_convert_types ) from openapi_generated.pinterest_client.model.audience_definition_response import AudienceDefinitionResponse -from openapi_generated.pinterest_client.model.audience_insight_category_array_response import AudienceInsightCategoryArrayResponse from openapi_generated.pinterest_client.model.audience_insight_type import AudienceInsightType from openapi_generated.pinterest_client.model.audience_insights_response import AudienceInsightsResponse from openapi_generated.pinterest_client.model.error import Error @@ -162,99 +161,6 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.audiences_insights_category_list_endpoint = _Endpoint( - settings={ - 'response_type': (AudienceInsightCategoryArrayResponse,), - 'auth': [ - 'pinterest_oauth2' - ], - 'endpoint_path': '/ad_accounts/{ad_account_id}/insights/audiences/{scope}/{type}/{category_id}', - 'operation_id': 'audiences_insights_category_list', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'ad_account_id', - 'scope', - 'type', - 'category_id', - 'sort', - ], - 'required': [ - 'ad_account_id', - 'scope', - 'type', - 'category_id', - ], - 'nullable': [ - ], - 'enum': [ - 'sort', - ], - 'validation': [ - 'ad_account_id', - 'category_id', - ] - }, - root_map={ - 'validations': { - ('ad_account_id',): { - 'max_length': 18, - 'regex': { - 'pattern': r'^\d+$', # noqa: E501 - }, - }, - ('category_id',): { - 'max_length': 18, - 'regex': { - 'pattern': r'^\d+$', # noqa: E501 - }, - }, - }, - 'allowed_values': { - ('sort',): { - - "RATIO": "RATIO" - }, - }, - 'openapi_types': { - 'ad_account_id': - (str,), - 'scope': - (str,), - 'type': - (str,), - 'category_id': - (str,), - 'sort': - (str,), - }, - 'attribute_map': { - 'ad_account_id': 'ad_account_id', - 'scope': 'scope', - 'type': 'type', - 'category_id': 'category_id', - 'sort': 'sort', - }, - 'location_map': { - 'ad_account_id': 'path', - 'scope': 'path', - 'type': 'path', - 'category_id': 'path', - 'sort': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) def audience_insights_get( self, @@ -416,94 +322,3 @@ def audience_insights_scope_and_type_get( ad_account_id return self.audience_insights_scope_and_type_get_endpoint.call_with_http_info(**kwargs) - def audiences_insights_category_list( - self, - ad_account_id, - scope, - type, - category_id, - **kwargs - ): - """Get category sub-interest (DEPRECATED) # noqa: E501 - - Get information about a category's sub-level interests. For a list of interests, their IDs, and hierarchy, see the [list of interests](https://docs.google.com/spreadsheets/d/1HxL-0Z3p2fgxis9YBP2HWC3tvPrs1hAuHDRtH-NJTIM/edit#gid=118370875). Also, a category is a level-one (L1) interest. For example, in the interest hierarchy see **Animals** > **Mammals** > **Dogs**, **Animals** is the category. This endpoint has been deprecated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.audiences_insights_category_list(ad_account_id, scope, type, category_id, async_req=True) - >>> result = thread.get() - - Args: - ad_account_id (str): Unique identifier of an ad account. - scope (str): Generated audience scope to request. - type (str): Generated audience type to request. - category_id (str): Category (L1 interest) numeric ID. - - Keyword Args: - sort (str): Sort method. Only RATIO is supported.. [optional] if omitted the server will use the default value of "RATIO" - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - AudienceInsightCategoryArrayResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['ad_account_id'] = \ - ad_account_id - kwargs['scope'] = \ - scope - kwargs['type'] = \ - type - kwargs['category_id'] = \ - category_id - return self.audiences_insights_category_list_endpoint.call_with_http_info(**kwargs) - diff --git a/openapi_generated/pinterest_client/api/audience_sharing_api.py b/openapi_generated/pinterest_client/api/audience_sharing_api.py new file mode 100644 index 0000000..28aaf8c --- /dev/null +++ b/openapi_generated/pinterest_client/api/audience_sharing_api.py @@ -0,0 +1,1167 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.api_client import ApiClient, Endpoint as _Endpoint +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from openapi_generated.pinterest_client.model.audience import Audience +from openapi_generated.pinterest_client.model.audience_account_type import AudienceAccountType +from openapi_generated.pinterest_client.model.business_shared_audience import BusinessSharedAudience +from openapi_generated.pinterest_client.model.business_shared_audience_response import BusinessSharedAudienceResponse +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.shared_audience import SharedAudience +from openapi_generated.pinterest_client.model.shared_audience_account import SharedAudienceAccount +from openapi_generated.pinterest_client.model.shared_audience_response import SharedAudienceResponse + + +class AudienceSharingApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.ad_accounts_audiences_shared_accounts_list_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/audiences/shared/accounts', + 'operation_id': 'ad_accounts_audiences_shared_accounts_list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'audience_id', + 'account_type', + 'page_size', + 'bookmark', + ], + 'required': [ + 'ad_account_id', + 'audience_id', + 'account_type', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'audience_id', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('audience_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'audience_id': + (str,), + 'account_type': + (AudienceAccountType,), + 'page_size': + (int,), + 'bookmark': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'audience_id': 'audience_id', + 'account_type': 'account_type', + 'page_size': 'page_size', + 'bookmark': 'bookmark', + }, + 'location_map': { + 'ad_account_id': 'path', + 'audience_id': 'query', + 'account_type': 'query', + 'page_size': 'query', + 'bookmark': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.business_account_audiences_shared_accounts_list_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/audiences/shared/accounts', + 'operation_id': 'business_account_audiences_shared_accounts_list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'audience_id', + 'account_type', + 'page_size', + 'bookmark', + ], + 'required': [ + 'business_id', + 'audience_id', + 'account_type', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + 'audience_id', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('audience_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'audience_id': + (str,), + 'account_type': + (AudienceAccountType,), + 'page_size': + (int,), + 'bookmark': + (str,), + }, + 'attribute_map': { + 'business_id': 'business_id', + 'audience_id': 'audience_id', + 'account_type': 'account_type', + 'page_size': 'page_size', + 'bookmark': 'bookmark', + }, + 'location_map': { + 'business_id': 'path', + 'audience_id': 'query', + 'account_type': 'query', + 'page_size': 'query', + 'bookmark': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.shared_audiences_for_business_list_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/audiences', + 'operation_id': 'shared_audiences_for_business_list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'bookmark', + 'order', + 'page_size', + ], + 'required': [ + 'business_id', + ], + 'nullable': [ + ], + 'enum': [ + 'order', + ], + 'validation': [ + 'business_id', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('order',): { + + "ASCENDING": "ASCENDING", + "DESCENDING": "DESCENDING" + }, + }, + 'openapi_types': { + 'business_id': + (str,), + 'bookmark': + (str,), + 'order': + (str,), + 'page_size': + (int,), + }, + 'attribute_map': { + 'business_id': 'business_id', + 'bookmark': 'bookmark', + 'order': 'order', + 'page_size': 'page_size', + }, + 'location_map': { + 'business_id': 'path', + 'bookmark': 'query', + 'order': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_ad_account_to_ad_account_shared_audience_endpoint = _Endpoint( + settings={ + 'response_type': (SharedAudienceResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/audiences/ad_accounts/shared', + 'operation_id': 'update_ad_account_to_ad_account_shared_audience', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'shared_audience', + ], + 'required': [ + 'ad_account_id', + 'shared_audience', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'shared_audience': + (SharedAudience,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'shared_audience': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_ad_account_to_business_shared_audience_endpoint = _Endpoint( + settings={ + 'response_type': (BusinessSharedAudienceResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/audiences/businesses/shared', + 'operation_id': 'update_ad_account_to_business_shared_audience', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'business_shared_audience', + ], + 'required': [ + 'ad_account_id', + 'business_shared_audience', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'business_shared_audience': + (BusinessSharedAudience,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'business_shared_audience': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_business_to_ad_account_shared_audience_endpoint = _Endpoint( + settings={ + 'response_type': (SharedAudienceResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/audiences/ad_accounts/shared', + 'operation_id': 'update_business_to_ad_account_shared_audience', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'shared_audience', + ], + 'required': [ + 'business_id', + 'shared_audience', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'shared_audience': + (SharedAudience,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'shared_audience': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_business_to_business_shared_audience_endpoint = _Endpoint( + settings={ + 'response_type': (BusinessSharedAudienceResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/audiences/businesses/shared', + 'operation_id': 'update_business_to_business_shared_audience', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'business_shared_audience', + ], + 'required': [ + 'business_id', + 'business_shared_audience', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'business_shared_audience': + (BusinessSharedAudience,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'business_shared_audience': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def ad_accounts_audiences_shared_accounts_list( + self, + ad_account_id, + audience_id, + account_type, + **kwargs + ): + """List accounts with access to an audience owned by an ad account # noqa: E501 + + List all ad accounts and/or businesses that have access to a specific audience. The audience must be owned by the requesting ad account. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ad_accounts_audiences_shared_accounts_list(ad_account_id, audience_id, account_type, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + audience_id (str): Unique identifier of the audience to use to filter the results. + account_type (AudienceAccountType): Filter accounts by account type. + + Keyword Args: + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + bookmark (str): Cursor used to fetch the next page of items. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['audience_id'] = \ + audience_id + kwargs['account_type'] = \ + account_type + return self.ad_accounts_audiences_shared_accounts_list_endpoint.call_with_http_info(**kwargs) + + def business_account_audiences_shared_accounts_list( + self, + business_id, + audience_id, + account_type, + **kwargs + ): + """List accounts with access to an audience owned by a business # noqa: E501 + + List all ad accounts and/or businesses that have access to a specific audience. The audience must either be owned by an ad account in the requesting business, or it must have been shared with the requesting business. If the requesting business is not the owner of the audience, only ad accounts owned by the requesting business will be returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.business_account_audiences_shared_accounts_list(business_id, audience_id, account_type, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + audience_id (str): Unique identifier of the audience to use to filter the results. + account_type (AudienceAccountType): Filter accounts by account type. + + Keyword Args: + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + bookmark (str): Cursor used to fetch the next page of items. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['audience_id'] = \ + audience_id + kwargs['account_type'] = \ + account_type + return self.business_account_audiences_shared_accounts_list_endpoint.call_with_http_info(**kwargs) + + def shared_audiences_for_business_list( + self, + business_id, + **kwargs + ): + """List received audiences for a business # noqa: E501 + + Get a list of received audiences for the given business. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.shared_audiences_for_business_list(business_id, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + + Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + return self.shared_audiences_for_business_list_endpoint.call_with_http_info(**kwargs) + + def update_ad_account_to_ad_account_shared_audience( + self, + ad_account_id, + shared_audience, + **kwargs + ): + """Update audience sharing between ad accounts # noqa: E501 + + From an ad account, share a specific audience with another ad account, or revoke access to a previously shared audience. Only the audience owner account can share the audience. The recipient ad account(s) must be in the same Pinterest Business Hierarchy as the business owner of the ad account.
This endpoint is not available to all apps.Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_ad_account_to_ad_account_shared_audience(ad_account_id, shared_audience, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + shared_audience (SharedAudience): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + SharedAudienceResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['shared_audience'] = \ + shared_audience + return self.update_ad_account_to_ad_account_shared_audience_endpoint.call_with_http_info(**kwargs) + + def update_ad_account_to_business_shared_audience( + self, + ad_account_id, + business_shared_audience, + **kwargs + ): + """Update audience sharing from an ad account to businesses # noqa: E501 + + From an ad account, share a specific audience with a business account, or revoke access to a previously shared audience. Only the audience owner account can share the audience. The recipient business account must be in the same business hierarchy as the business owner of the ad account.
This endpoint is not available to all apps.Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_ad_account_to_business_shared_audience(ad_account_id, business_shared_audience, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + business_shared_audience (BusinessSharedAudience): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + BusinessSharedAudienceResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['business_shared_audience'] = \ + business_shared_audience + return self.update_ad_account_to_business_shared_audience_endpoint.call_with_http_info(**kwargs) + + def update_business_to_ad_account_shared_audience( + self, + business_id, + shared_audience, + **kwargs + ): + """Update audience sharing from a business to ad accounts # noqa: E501 + + From a business, share a specific audience with other ad account(s), or revoke access to a previously shared audience.

This endpoint is not available to all apps.Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_business_to_ad_account_shared_audience(business_id, shared_audience, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + shared_audience (SharedAudience): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + SharedAudienceResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['shared_audience'] = \ + shared_audience + return self.update_business_to_ad_account_shared_audience_endpoint.call_with_http_info(**kwargs) + + def update_business_to_business_shared_audience( + self, + business_id, + business_shared_audience, + **kwargs + ): + """Update audience sharing between businesses # noqa: E501 + + From a business, share a specific audience with another business account, or revoke access to a previously shared audience. Only the audience owner can share the audience with other businesses, and the recipient business must be within the same business hierarchy.
This endpoint is not available to all apps.Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_business_to_business_shared_audience(business_id, business_shared_audience, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + business_shared_audience (BusinessSharedAudience): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + BusinessSharedAudienceResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['business_shared_audience'] = \ + business_shared_audience + return self.update_business_to_business_shared_audience_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/audiences_api.py b/openapi_generated/pinterest_client/api/audiences_api.py index 71d5a7c..f22aa67 100644 --- a/openapi_generated/pinterest_client/api/audiences_api.py +++ b/openapi_generated/pinterest_client/api/audiences_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -259,6 +259,7 @@ def __init__(self, api_client=None): 'bookmark', 'order', 'page_size', + 'ownership_type', ], 'required': [ 'ad_account_id', @@ -267,6 +268,7 @@ def __init__(self, api_client=None): ], 'enum': [ 'order', + 'ownership_type', ], 'validation': [ 'ad_account_id', @@ -293,6 +295,11 @@ def __init__(self, api_client=None): "ASCENDING": "ASCENDING", "DESCENDING": "DESCENDING" }, + ('ownership_type',): { + + "OWNED": "OWNED", + "RECEIVED": "RECEIVED" + }, }, 'openapi_types': { 'ad_account_id': @@ -303,18 +310,22 @@ def __init__(self, api_client=None): (str,), 'page_size': (int,), + 'ownership_type': + (str,), }, 'attribute_map': { 'ad_account_id': 'ad_account_id', 'bookmark': 'bookmark', 'order': 'order', 'page_size': 'page_size', + 'ownership_type': 'ownership_type', }, 'location_map': { 'ad_account_id': 'path', 'bookmark': 'query', 'order': 'query', 'page_size': 'query', + 'ownership_type': 'query', }, 'collection_format_map': { } @@ -670,8 +681,9 @@ def audiences_list( Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] - order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. For received audiences, it is sorted by sharing event time. Note that higher-value IDs are associated with more-recently added items.. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + ownership_type (str): Filter audiences by ownership type.. [optional] if omitted the server will use the default value of "OWNED" _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object diff --git a/openapi_generated/pinterest_client/api/billing_api.py b/openapi_generated/pinterest_client/api/billing_api.py new file mode 100644 index 0000000..751216d --- /dev/null +++ b/openapi_generated/pinterest_client/api/billing_api.py @@ -0,0 +1,1407 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.api_client import ApiClient, Endpoint as _Endpoint +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from openapi_generated.pinterest_client.model.ads_credit_discounts_response import AdsCreditDiscountsResponse +from openapi_generated.pinterest_client.model.ads_credit_redeem_request import AdsCreditRedeemRequest +from openapi_generated.pinterest_client.model.ads_credit_redeem_response import AdsCreditRedeemResponse +from openapi_generated.pinterest_client.model.billing_profiles_response import BillingProfilesResponse +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.ssio_account_response import SSIOAccountResponse +from openapi_generated.pinterest_client.model.ssio_create_insertion_order_request import SSIOCreateInsertionOrderRequest +from openapi_generated.pinterest_client.model.ssio_create_insertion_order_response import SSIOCreateInsertionOrderResponse +from openapi_generated.pinterest_client.model.ssio_edit_insertion_order_request import SSIOEditInsertionOrderRequest +from openapi_generated.pinterest_client.model.ssio_edit_insertion_order_response import SSIOEditInsertionOrderResponse +from openapi_generated.pinterest_client.model.ssio_insertion_order_status import SSIOInsertionOrderStatus +from openapi_generated.pinterest_client.model.ssio_insertion_order_status_response import SSIOInsertionOrderStatusResponse +from openapi_generated.pinterest_client.model.ssio_order_line import SSIOOrderLine + + +class BillingApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.ads_credit_redeem_endpoint = _Endpoint( + settings={ + 'response_type': (AdsCreditRedeemResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/ads_credit/redeem', + 'operation_id': 'ads_credit_redeem', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'ads_credit_redeem_request', + ], + 'required': [ + 'ad_account_id', + 'ads_credit_redeem_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'ads_credit_redeem_request': + (AdsCreditRedeemRequest,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'ads_credit_redeem_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.ads_credits_discounts_get_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/ads_credit/discounts', + 'operation_id': 'ads_credits_discounts_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'bookmark', + 'page_size', + ], + 'required': [ + 'ad_account_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'bookmark': + (str,), + 'page_size': + (int,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + }, + 'location_map': { + 'ad_account_id': 'path', + 'bookmark': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.billing_profiles_get_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/billing_profiles', + 'operation_id': 'billing_profiles_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'is_active', + 'bookmark', + 'page_size', + ], + 'required': [ + 'ad_account_id', + 'is_active', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'is_active': + (bool,), + 'bookmark': + (str,), + 'page_size': + (int,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'is_active': 'is_active', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + }, + 'location_map': { + 'ad_account_id': 'path', + 'is_active': 'query', + 'bookmark': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.ssio_accounts_get_endpoint = _Endpoint( + settings={ + 'response_type': (SSIOAccountResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/ssio/accounts', + 'operation_id': 'ssio_accounts_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + ], + 'required': [ + 'ad_account_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.ssio_insertion_order_create_endpoint = _Endpoint( + settings={ + 'response_type': (SSIOCreateInsertionOrderResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/ssio/insertion_orders', + 'operation_id': 'ssio_insertion_order_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'ssio_create_insertion_order_request', + ], + 'required': [ + 'ad_account_id', + 'ssio_create_insertion_order_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'ssio_create_insertion_order_request': + (SSIOCreateInsertionOrderRequest,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'ssio_create_insertion_order_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.ssio_insertion_order_edit_endpoint = _Endpoint( + settings={ + 'response_type': (SSIOEditInsertionOrderResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/ssio/insertion_orders', + 'operation_id': 'ssio_insertion_order_edit', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'ssio_edit_insertion_order_request', + ], + 'required': [ + 'ad_account_id', + 'ssio_edit_insertion_order_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'ssio_edit_insertion_order_request': + (SSIOEditInsertionOrderRequest,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'ssio_edit_insertion_order_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.ssio_insertion_orders_status_get_by_ad_account_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/ssio/insertion_orders/status', + 'operation_id': 'ssio_insertion_orders_status_get_by_ad_account', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'bookmark', + 'page_size', + ], + 'required': [ + 'ad_account_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'bookmark': + (str,), + 'page_size': + (int,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + }, + 'location_map': { + 'ad_account_id': 'path', + 'bookmark': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.ssio_insertion_orders_status_get_by_pin_order_id_endpoint = _Endpoint( + settings={ + 'response_type': (SSIOInsertionOrderStatusResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/ssio/insertion_orders/{pin_order_id}/status', + 'operation_id': 'ssio_insertion_orders_status_get_by_pin_order_id', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'pin_order_id', + ], + 'required': [ + 'ad_account_id', + 'pin_order_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'pin_order_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'pin_order_id': 'pin_order_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'pin_order_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.ssio_order_lines_get_by_ad_account_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/ssio/order_lines', + 'operation_id': 'ssio_order_lines_get_by_ad_account', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'bookmark', + 'page_size', + 'pin_order_id', + ], + 'required': [ + 'ad_account_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'bookmark': + (str,), + 'page_size': + (int,), + 'pin_order_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + 'pin_order_id': 'pin_order_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'bookmark': 'query', + 'page_size': 'query', + 'pin_order_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def ads_credit_redeem( + self, + ad_account_id, + ads_credit_redeem_request, + **kwargs + ): + """Redeem ad credits # noqa: E501 + + Redeem ads credit on behalf of the ad account id and apply it towards billing. This endpoint might not be available to all apps. Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ads_credit_redeem(ad_account_id, ads_credit_redeem_request, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + ads_credit_redeem_request (AdsCreditRedeemRequest): Redeem ad credits request. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AdsCreditRedeemResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['ads_credit_redeem_request'] = \ + ads_credit_redeem_request + return self.ads_credit_redeem_endpoint.call_with_http_info(**kwargs) + + def ads_credits_discounts_get( + self, + ad_account_id, + **kwargs + ): + """Get ads credit discounts # noqa: E501 + + Returns the list of discounts applied to the account. This endpoint might not be available to all apps. Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ads_credits_discounts_get(ad_account_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + + Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + return self.ads_credits_discounts_get_endpoint.call_with_http_info(**kwargs) + + def billing_profiles_get( + self, + ad_account_id, + is_active, + **kwargs + ): + """Get billing profiles # noqa: E501 + + Get billing profiles in the advertiser account. This endpoint might not be available to all apps. Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.billing_profiles_get(ad_account_id, is_active, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + is_active (bool): Return active billing profiles, if false return all billing profiles. + + Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['is_active'] = \ + is_active + return self.billing_profiles_get_endpoint.call_with_http_info(**kwargs) + + def ssio_accounts_get( + self, + ad_account_id, + **kwargs + ): + """Get Salesforce account details including bill-to information. # noqa: E501 + + Get Salesforce account details including bill-to information to be used in insertion orders process for ad_account_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ssio_accounts_get(ad_account_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + SSIOAccountResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + return self.ssio_accounts_get_endpoint.call_with_http_info(**kwargs) + + def ssio_insertion_order_create( + self, + ad_account_id, + ssio_create_insertion_order_request, + **kwargs + ): + """Create insertion order through SSIO. # noqa: E501 + + Create insertion order through SSIO for ad_account_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ssio_insertion_order_create(ad_account_id, ssio_create_insertion_order_request, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + ssio_create_insertion_order_request (SSIOCreateInsertionOrderRequest): Order line to create. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + SSIOCreateInsertionOrderResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['ssio_create_insertion_order_request'] = \ + ssio_create_insertion_order_request + return self.ssio_insertion_order_create_endpoint.call_with_http_info(**kwargs) + + def ssio_insertion_order_edit( + self, + ad_account_id, + ssio_edit_insertion_order_request, + **kwargs + ): + """Edit insertion order through SSIO. # noqa: E501 + + Edit insertion order through SSIO for ad_account_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ssio_insertion_order_edit(ad_account_id, ssio_edit_insertion_order_request, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + ssio_edit_insertion_order_request (SSIOEditInsertionOrderRequest): Order line to create. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + SSIOEditInsertionOrderResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['ssio_edit_insertion_order_request'] = \ + ssio_edit_insertion_order_request + return self.ssio_insertion_order_edit_endpoint.call_with_http_info(**kwargs) + + def ssio_insertion_orders_status_get_by_ad_account( + self, + ad_account_id, + **kwargs + ): + """Get insertion order status by ad account id. # noqa: E501 + + Get insertion order status for account id ad_account_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ssio_insertion_orders_status_get_by_ad_account(ad_account_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + + Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + return self.ssio_insertion_orders_status_get_by_ad_account_endpoint.call_with_http_info(**kwargs) + + def ssio_insertion_orders_status_get_by_pin_order_id( + self, + ad_account_id, + pin_order_id, + **kwargs + ): + """Get insertion order status by pin order id. # noqa: E501 + + Get insertion order status for pin order id pin_order_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ssio_insertion_orders_status_get_by_pin_order_id(ad_account_id, pin_order_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + pin_order_id (str): The pin order id associated with the ssio insertion order + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + SSIOInsertionOrderStatusResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['pin_order_id'] = \ + pin_order_id + return self.ssio_insertion_orders_status_get_by_pin_order_id_endpoint.call_with_http_info(**kwargs) + + def ssio_order_lines_get_by_ad_account( + self, + ad_account_id, + **kwargs + ): + """Get Salesforce order lines by ad account id. # noqa: E501 + + Get Salesforce order lines for account id ad_account_id. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Finance, Campaign. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ssio_order_lines_get_by_ad_account(ad_account_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + + Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + pin_order_id (str): The pin order id associated with the ssio insertino order. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + return self.ssio_order_lines_get_by_ad_account_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/boards_api.py b/openapi_generated/pinterest_client/api/boards_api.py index 9d4d79c..bc2dd63 100644 --- a/openapi_generated/pinterest_client/api/boards_api.py +++ b/openapi_generated/pinterest_client/api/boards_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -27,6 +27,7 @@ from openapi_generated.pinterest_client.model.board_update import BoardUpdate from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.pin import Pin class BoardsApi(object): @@ -204,6 +205,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/boards/{board_id}/sections', @@ -290,6 +292,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/boards/{board_id}/sections/{section_id}/pins', @@ -613,6 +616,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (Board,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/boards/{board_id}', @@ -683,6 +687,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/boards', @@ -725,9 +730,11 @@ def __init__(self, api_client=None): 'allowed_values': { ('privacy',): { - "PUBLIC": "PUBLIC", + "ALL": "ALL", "PROTECTED": "PROTECTED", - "SECRET": "SECRET" + "PUBLIC": "PUBLIC", + "SECRET": "SECRET", + "PUBLIC_AND_SECRET": "PUBLIC_AND_SECRET" }, }, 'openapi_types': { @@ -767,6 +774,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/boards/{board_id}/pins', @@ -781,6 +789,7 @@ def __init__(self, api_client=None): 'page_size', 'creative_types', 'ad_account_id', + 'pin_metrics', ], 'required': [ 'board_id', @@ -840,6 +849,8 @@ def __init__(self, api_client=None): ([str],), 'ad_account_id': (str,), + 'pin_metrics': + (bool,), }, 'attribute_map': { 'board_id': 'board_id', @@ -847,6 +858,7 @@ def __init__(self, api_client=None): 'page_size': 'page_size', 'creative_types': 'creative_types', 'ad_account_id': 'ad_account_id', + 'pin_metrics': 'pin_metrics', }, 'location_map': { 'board_id': 'path', @@ -854,6 +866,7 @@ def __init__(self, api_client=None): 'page_size': 'query', 'creative_types': 'query', 'ad_account_id': 'query', + 'pin_metrics': 'query', }, 'collection_format_map': { 'creative_types': 'multi', @@ -1131,7 +1144,7 @@ def board_sections_list( Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -1214,7 +1227,7 @@ def board_sections_list_pins( Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -1618,7 +1631,7 @@ def boards_list( Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 privacy (str): Privacy setting for a board.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -1697,9 +1710,10 @@ def boards_list_pins( Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 creative_types ([str]): Pin creative types filter.

Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.. [optional] ad_account_id (str): Unique identifier of an ad account.. [optional] + pin_metrics (bool): Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then.. [optional] if omitted the server will use the default value of False _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object diff --git a/openapi_generated/pinterest_client/api/bulk_api.py b/openapi_generated/pinterest_client/api/bulk_api.py index 609500e..8dfc1cc 100644 --- a/openapi_generated/pinterest_client/api/bulk_api.py +++ b/openapi_generated/pinterest_client/api/bulk_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -121,6 +121,7 @@ def __init__(self, api_client=None): 'all': [ 'ad_account_id', 'bulk_request_id', + 'include_details', ], 'required': [ 'ad_account_id', @@ -150,14 +151,18 @@ def __init__(self, api_client=None): (str,), 'bulk_request_id': (str,), + 'include_details': + (bool,), }, 'attribute_map': { 'ad_account_id': 'ad_account_id', 'bulk_request_id': 'bulk_request_id', + 'include_details': 'include_details', }, 'location_map': { 'ad_account_id': 'path', 'bulk_request_id': 'path', + 'include_details': 'query', }, 'collection_format_map': { } @@ -338,6 +343,7 @@ def bulk_request_get( bulk_request_id (str): Unique identifier of a bulk upsert request. Keyword Args: + include_details (bool): if set to True then attach the errors/details to all the requests. [optional] if omitted the server will use the default value of False _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object diff --git a/openapi_generated/pinterest_client/api/business_access_assets_api.py b/openapi_generated/pinterest_client/api/business_access_assets_api.py new file mode 100644 index 0000000..4e8753a --- /dev/null +++ b/openapi_generated/pinterest_client/api/business_access_assets_api.py @@ -0,0 +1,2077 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.api_client import ApiClient, Endpoint as _Endpoint +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from openapi_generated.pinterest_client.model.asset_id_permissions import AssetIdPermissions +from openapi_generated.pinterest_client.model.create_asset_group_body import CreateAssetGroupBody +from openapi_generated.pinterest_client.model.create_asset_group_response import CreateAssetGroupResponse +from openapi_generated.pinterest_client.model.delete_asset_group_body import DeleteAssetGroupBody +from openapi_generated.pinterest_client.model.delete_asset_group_response import DeleteAssetGroupResponse +from openapi_generated.pinterest_client.model.delete_member_access_results_response_array import DeleteMemberAccessResultsResponseArray +from openapi_generated.pinterest_client.model.delete_partner_asset_access_body import DeletePartnerAssetAccessBody +from openapi_generated.pinterest_client.model.delete_partner_assets_results_response_array import DeletePartnerAssetsResultsResponseArray +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.get_business_assets_response import GetBusinessAssetsResponse +from openapi_generated.pinterest_client.model.get_partner_assets_response import GetPartnerAssetsResponse +from openapi_generated.pinterest_client.model.inline_object import InlineObject +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.permissions_with_owner import PermissionsWithOwner +from openapi_generated.pinterest_client.model.update_asset_group_body import UpdateAssetGroupBody +from openapi_generated.pinterest_client.model.update_asset_group_response import UpdateAssetGroupResponse +from openapi_generated.pinterest_client.model.update_member_asset_access_body import UpdateMemberAssetAccessBody +from openapi_generated.pinterest_client.model.update_member_assets_results_response_array import UpdateMemberAssetsResultsResponseArray +from openapi_generated.pinterest_client.model.update_partner_asset_access_body import UpdatePartnerAssetAccessBody +from openapi_generated.pinterest_client.model.update_partner_assets_results_response_array import UpdatePartnerAssetsResultsResponseArray +from openapi_generated.pinterest_client.model.user_single_asset_binding import UserSingleAssetBinding + + +class BusinessAccessAssetsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.asset_group_create_endpoint = _Endpoint( + settings={ + 'response_type': (CreateAssetGroupResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/asset_groups', + 'operation_id': 'asset_group_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'create_asset_group_body', + ], + 'required': [ + 'business_id', + 'create_asset_group_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'create_asset_group_body': + (CreateAssetGroupBody,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'create_asset_group_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.asset_group_delete_endpoint = _Endpoint( + settings={ + 'response_type': (DeleteAssetGroupResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/asset_groups', + 'operation_id': 'asset_group_delete', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'delete_asset_group_body', + ], + 'required': [ + 'business_id', + 'delete_asset_group_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'delete_asset_group_body': + (DeleteAssetGroupBody,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'delete_asset_group_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.asset_group_update_endpoint = _Endpoint( + settings={ + 'response_type': (UpdateAssetGroupResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/asset_groups', + 'operation_id': 'asset_group_update', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'update_asset_group_body', + ], + 'required': [ + 'business_id', + 'update_asset_group_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'update_asset_group_body': + (UpdateAssetGroupBody,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'update_asset_group_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.business_asset_members_get_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/assets/{asset_id}/members', + 'operation_id': 'business_asset_members_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'asset_id', + 'bookmark', + 'page_size', + 'start_index', + ], + 'required': [ + 'business_id', + 'asset_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + 'asset_id', + 'page_size', + 'start_index', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('asset_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + ('start_index',): { + + 'inclusive_minimum': 0, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'asset_id': + (str,), + 'bookmark': + (str,), + 'page_size': + (int,), + 'start_index': + (int,), + }, + 'attribute_map': { + 'business_id': 'business_id', + 'asset_id': 'asset_id', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + 'start_index': 'start_index', + }, + 'location_map': { + 'business_id': 'path', + 'asset_id': 'path', + 'bookmark': 'query', + 'page_size': 'query', + 'start_index': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.business_asset_partners_get_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/assets/{asset_id}/partners', + 'operation_id': 'business_asset_partners_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'asset_id', + 'start_index', + 'bookmark', + 'page_size', + ], + 'required': [ + 'business_id', + 'asset_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + 'asset_id', + 'start_index', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('asset_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('start_index',): { + + 'inclusive_minimum': 0, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'asset_id': + (str,), + 'start_index': + (int,), + 'bookmark': + (str,), + 'page_size': + (int,), + }, + 'attribute_map': { + 'business_id': 'business_id', + 'asset_id': 'asset_id', + 'start_index': 'start_index', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + }, + 'location_map': { + 'business_id': 'path', + 'asset_id': 'path', + 'start_index': 'query', + 'bookmark': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.business_assets_get_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/assets', + 'operation_id': 'business_assets_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'permissions', + 'child_asset_id', + 'asset_group_id', + 'asset_type', + 'start_index', + 'bookmark', + 'page_size', + ], + 'required': [ + 'business_id', + ], + 'nullable': [ + ], + 'enum': [ + 'asset_type', + ], + 'validation': [ + 'business_id', + 'child_asset_id', + 'asset_group_id', + 'start_index', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('child_asset_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('asset_group_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('start_index',): { + + 'inclusive_minimum': 0, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('asset_type',): { + + "AD_ACCOUNT": "AD_ACCOUNT", + "PROFILE": "PROFILE", + "ASSET_GROUP": "ASSET_GROUP" + }, + }, + 'openapi_types': { + 'business_id': + (str,), + 'permissions': + ([PermissionsWithOwner],), + 'child_asset_id': + (str,), + 'asset_group_id': + (str,), + 'asset_type': + (str,), + 'start_index': + (int,), + 'bookmark': + (str,), + 'page_size': + (int,), + }, + 'attribute_map': { + 'business_id': 'business_id', + 'permissions': 'permissions', + 'child_asset_id': 'child_asset_id', + 'asset_group_id': 'asset_group_id', + 'asset_type': 'asset_type', + 'start_index': 'start_index', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + }, + 'location_map': { + 'business_id': 'path', + 'permissions': 'query', + 'child_asset_id': 'query', + 'asset_group_id': 'query', + 'asset_type': 'query', + 'start_index': 'query', + 'bookmark': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + 'permissions': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.business_member_assets_get_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/members/{member_id}/assets', + 'operation_id': 'business_member_assets_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'member_id', + 'asset_type', + 'start_index', + 'bookmark', + 'page_size', + ], + 'required': [ + 'business_id', + 'member_id', + ], + 'nullable': [ + ], + 'enum': [ + 'asset_type', + ], + 'validation': [ + 'business_id', + 'member_id', + 'start_index', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('member_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('start_index',): { + + 'inclusive_minimum': 0, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('asset_type',): { + + "AD_ACCOUNT": "AD_ACCOUNT", + "PROFILE": "PROFILE", + "ASSET_GROUP": "ASSET_GROUP" + }, + }, + 'openapi_types': { + 'business_id': + (str,), + 'member_id': + (str,), + 'asset_type': + (str,), + 'start_index': + (int,), + 'bookmark': + (str,), + 'page_size': + (int,), + }, + 'attribute_map': { + 'business_id': 'business_id', + 'member_id': 'member_id', + 'asset_type': 'asset_type', + 'start_index': 'start_index', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + }, + 'location_map': { + 'business_id': 'path', + 'member_id': 'path', + 'asset_type': 'query', + 'start_index': 'query', + 'bookmark': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.business_members_asset_access_delete_endpoint = _Endpoint( + settings={ + 'response_type': (DeleteMemberAccessResultsResponseArray,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/members/assets/access', + 'operation_id': 'business_members_asset_access_delete', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'inline_object', + ], + 'required': [ + 'business_id', + 'inline_object', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'inline_object': + (InlineObject,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'inline_object': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.business_members_asset_access_update_endpoint = _Endpoint( + settings={ + 'response_type': (UpdateMemberAssetsResultsResponseArray,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/members/assets/access', + 'operation_id': 'business_members_asset_access_update', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'update_member_asset_access_body', + ], + 'required': [ + 'business_id', + 'update_member_asset_access_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'update_member_asset_access_body': + (UpdateMemberAssetAccessBody,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'update_member_asset_access_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.business_partner_asset_access_get_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/partners/{partner_id}/assets', + 'operation_id': 'business_partner_asset_access_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'partner_id', + 'partner_type', + 'asset_type', + 'start_index', + 'page_size', + 'bookmark', + ], + 'required': [ + 'business_id', + 'partner_id', + ], + 'nullable': [ + ], + 'enum': [ + 'asset_type', + ], + 'validation': [ + 'business_id', + 'partner_id', + 'start_index', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('partner_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('start_index',): { + + 'inclusive_minimum': 0, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('asset_type',): { + + "AD_ACCOUNT": "AD_ACCOUNT", + "PROFILE": "PROFILE", + "ASSET_GROUP": "ASSET_GROUP" + }, + }, + 'openapi_types': { + 'business_id': + (str,), + 'partner_id': + (str,), + 'partner_type': + (bool, date, datetime, dict, float, int, list, str, none_type,), + 'asset_type': + (str,), + 'start_index': + (int,), + 'page_size': + (int,), + 'bookmark': + (str,), + }, + 'attribute_map': { + 'business_id': 'business_id', + 'partner_id': 'partner_id', + 'partner_type': 'partner_type', + 'asset_type': 'asset_type', + 'start_index': 'start_index', + 'page_size': 'page_size', + 'bookmark': 'bookmark', + }, + 'location_map': { + 'business_id': 'path', + 'partner_id': 'path', + 'partner_type': 'query', + 'asset_type': 'query', + 'start_index': 'query', + 'page_size': 'query', + 'bookmark': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_partner_asset_access_handler_impl_endpoint = _Endpoint( + settings={ + 'response_type': (DeletePartnerAssetsResultsResponseArray,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/partners/assets', + 'operation_id': 'delete_partner_asset_access_handler_impl', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'delete_partner_asset_access_body', + ], + 'required': [ + 'business_id', + 'delete_partner_asset_access_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'delete_partner_asset_access_body': + (DeletePartnerAssetAccessBody,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'delete_partner_asset_access_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_partner_asset_access_handler_impl_endpoint = _Endpoint( + settings={ + 'response_type': (UpdatePartnerAssetsResultsResponseArray,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/partners/assets', + 'operation_id': 'update_partner_asset_access_handler_impl', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'update_partner_asset_access_body', + ], + 'required': [ + 'business_id', + 'update_partner_asset_access_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'update_partner_asset_access_body': + (UpdatePartnerAssetAccessBody,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'update_partner_asset_access_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def asset_group_create( + self, + business_id, + create_asset_group_body, + **kwargs + ): + """Create a new asset group. # noqa: E501 + + Create a new asset group with the specified parameters. - An asset group is a custom group of assets based on how you’d like to manage your accounts. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.asset_group_create(business_id, create_asset_group_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + create_asset_group_body (CreateAssetGroupBody): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CreateAssetGroupResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['create_asset_group_body'] = \ + create_asset_group_body + return self.asset_group_create_endpoint.call_with_http_info(**kwargs) + + def asset_group_delete( + self, + business_id, + delete_asset_group_body, + **kwargs + ): + """Delete asset groups. # noqa: E501 + + Delete a batch of asset groups. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.asset_group_delete(business_id, delete_asset_group_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + delete_asset_group_body (DeleteAssetGroupBody): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeleteAssetGroupResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['delete_asset_group_body'] = \ + delete_asset_group_body + return self.asset_group_delete_endpoint.call_with_http_info(**kwargs) + + def asset_group_update( + self, + business_id, + update_asset_group_body, + **kwargs + ): + """Update asset groups. # noqa: E501 + + Update a batch of asset groups with the specified parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.asset_group_update(business_id, update_asset_group_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + update_asset_group_body (UpdateAssetGroupBody): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + UpdateAssetGroupResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['update_asset_group_body'] = \ + update_asset_group_body + return self.asset_group_update_endpoint.call_with_http_info(**kwargs) + + def business_asset_members_get( + self, + business_id, + asset_id, + **kwargs + ): + """Get members with access to asset # noqa: E501 + + Get all the members the requesting business has granted access to on the given asset. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.business_asset_members_get(business_id, asset_id, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + asset_id (str): Unique identifier of a business asset. + + Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + start_index (int): An index to start fetching the results from. Only the results starting from this index will be returned.. [optional] if omitted the server will use the default value of 0 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['asset_id'] = \ + asset_id + return self.business_asset_members_get_endpoint.call_with_http_info(**kwargs) + + def business_asset_partners_get( + self, + business_id, + asset_id, + **kwargs + ): + """Get partners with access to asset # noqa: E501 + + Get all the partners the requesting business has granted access to on the given asset. Note: If the asset has been shared with you, an empty array will be returned. This is because an asset shared with you cannot be shared with a different partner. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.business_asset_partners_get(business_id, asset_id, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + asset_id (str): Unique identifier of a business asset. + + Keyword Args: + start_index (int): An index to start fetching the results from. Only the results starting from this index will be returned.. [optional] if omitted the server will use the default value of 0 + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['asset_id'] = \ + asset_id + return self.business_asset_partners_get_endpoint.call_with_http_info(**kwargs) + + def business_assets_get( + self, + business_id, + **kwargs + ): + """List business assets # noqa: E501 + + Get all the assets the requesting business has access to. This includes assets the business owns and assets the business has access to through partnerships. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.business_assets_get(business_id, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + + Keyword Args: + permissions ([PermissionsWithOwner]): A list of asset permissions used to filter the assets. Only assets where the requesting business has at least one of the specified permissions will be returned.. [optional] + child_asset_id (str): A child asset unique identifier. Used to fetch asset groups that contain the asset id as a child.. [optional] + asset_group_id (str): An asset group unique identifier. Used to fetch assets contained within the specified asset group.. [optional] + asset_type (str): A resource type to filter the assets by. Only assets of the specified type will be returned.. [optional] if omitted the server will use the default value of "AD_ACCOUNT" + start_index (int): An index to start fetching the results from. Only the results starting from this index will be returned.. [optional] if omitted the server will use the default value of 0 + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + return self.business_assets_get_endpoint.call_with_http_info(**kwargs) + + def business_member_assets_get( + self, + business_id, + member_id, + **kwargs + ): + """Get assets assigned to a member # noqa: E501 + + Get assets on which you assigned asset permissions to the given member. Can be used to: - get all assets, regardless of asset type or - get assets of one asset type by using the asset_type query. The return response will include the permissions the member has to that asset and the asset type. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.business_member_assets_get(business_id, member_id, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + member_id (str): The member id to fetch assets for. + + Keyword Args: + asset_type (str): A resource type to filter the assets by. Only assets of the specified type will be returned.. [optional] if omitted the server will use the default value of "AD_ACCOUNT" + start_index (int): An index to start fetching the results from. Only the results starting from this index will be returned.. [optional] if omitted the server will use the default value of 0 + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['member_id'] = \ + member_id + return self.business_member_assets_get_endpoint.call_with_http_info(**kwargs) + + def business_members_asset_access_delete( + self, + business_id, + inline_object, + **kwargs + ): + """Delete member access to asset # noqa: E501 + + Terminate multiple members' access to an asset. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.business_members_asset_access_delete(business_id, inline_object, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + inline_object (InlineObject): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeleteMemberAccessResultsResponseArray + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['inline_object'] = \ + inline_object + return self.business_members_asset_access_delete_endpoint.call_with_http_info(**kwargs) + + def business_members_asset_access_update( + self, + business_id, + update_member_asset_access_body, + **kwargs + ): + """Assign/Update member asset permissions # noqa: E501 + + Grant multiple members access to assets and/or update multiple member's exisiting permissions to an asset. Note: Not all listed permissions are applicable to each asset type. For example, PROFILE_PUBLISHER would not be applicable to an asset of type AD_ACCOUNT. The permission level PROFILE_PUBLISHER is only available to an asset of the type PROFILE. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.business_members_asset_access_update(business_id, update_member_asset_access_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + update_member_asset_access_body (UpdateMemberAssetAccessBody): List of member asset permissions to create or update. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + UpdateMemberAssetsResultsResponseArray + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['update_member_asset_access_body'] = \ + update_member_asset_access_body + return self.business_members_asset_access_update_endpoint.call_with_http_info(**kwargs) + + def business_partner_asset_access_get( + self, + business_id, + partner_id, + **kwargs + ): + """Get assets assigned to a partner or assets assigned by a partner # noqa: E501 + + Can be used to get the business assets your partner has granted you access to or the business assets you have granted your partner access to. If you specify: - partner_type=INTERNAL, you will retrieve your business assets that the partner has access to. - partner_type=EXTERNAL, you will retrieve the partner's business assets that the partner has granted you access to. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.business_partner_asset_access_get(business_id, partner_id, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + partner_id (str): The partner id to be bound to the Business + + Keyword Args: + partner_type (bool, date, datetime, dict, float, int, list, str, none_type): Specifies whether to fetch internal or external (shared) partners. If partner_type=INTERNAL, the asset being queried is for accesses the partner has to your business assets.
If partner_type=EXTERNAL, the asset being queried is for the accesses you have to the partner's business asset.. [optional] + asset_type (str): A resource type to filter the assets by. Only assets of the specified type will be returned.. [optional] if omitted the server will use the default value of "AD_ACCOUNT" + start_index (int): An index to start fetching the results from. Only the results starting from this index will be returned.. [optional] if omitted the server will use the default value of 0 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + bookmark (str): Cursor used to fetch the next page of items. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['partner_id'] = \ + partner_id + return self.business_partner_asset_access_get_endpoint.call_with_http_info(**kwargs) + + def delete_partner_asset_access_handler_impl( + self, + business_id, + delete_partner_asset_access_body, + **kwargs + ): + """Delete partner access to asset # noqa: E501 + + Terminate multiple partners' access to an asset. If - partner_type=INTERNAL: You will terminate a partner's asset access to your business assets. - partner_type=EXTERNAL: You will terminate your own access to your partner's business assets. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_partner_asset_access_handler_impl(business_id, delete_partner_asset_access_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + delete_partner_asset_access_body (DeletePartnerAssetAccessBody): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeletePartnerAssetsResultsResponseArray + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['delete_partner_asset_access_body'] = \ + delete_partner_asset_access_body + return self.delete_partner_asset_access_handler_impl_endpoint.call_with_http_info(**kwargs) + + def update_partner_asset_access_handler_impl( + self, + business_id, + update_partner_asset_access_body, + **kwargs + ): + """Assign/Update partner asset permissions # noqa: E501 + + Grant multiple partners access to assets and/or update multiple partner's exisiting permissions to an asset. If your partner already had permissions on the asset, they will be overriden with the new permissions you assign to them. To learn more about permission levels, visit https://help.pinterest.com/en/business/article/business-manager-overview Note: Not all listed permissions are applicable to each asset type. For example, PROFILE_PUBLISHER would not be applicable to an asset of type AD_ACCOUNT. The permission level PROFILE_PUBLISHER is only available to an asset of the type PROFILE. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_partner_asset_access_handler_impl(business_id, update_partner_asset_access_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + update_partner_asset_access_body (UpdatePartnerAssetAccessBody): A list of assets and permissions to assign to your partners. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + UpdatePartnerAssetsResultsResponseArray + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['update_partner_asset_access_body'] = \ + update_partner_asset_access_body + return self.update_partner_asset_access_handler_impl_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/business_access_invite_api.py b/openapi_generated/pinterest_client/api/business_access_invite_api.py new file mode 100644 index 0000000..ce4b7ab --- /dev/null +++ b/openapi_generated/pinterest_client/api/business_access_invite_api.py @@ -0,0 +1,959 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.api_client import ApiClient, Endpoint as _Endpoint +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from openapi_generated.pinterest_client.model.auth_respond_invites_body import AuthRespondInvitesBody +from openapi_generated.pinterest_client.model.cancel_invites_body import CancelInvitesBody +from openapi_generated.pinterest_client.model.create_asset_access_request_body import CreateAssetAccessRequestBody +from openapi_generated.pinterest_client.model.create_asset_access_request_response import CreateAssetAccessRequestResponse +from openapi_generated.pinterest_client.model.create_asset_invites_request import CreateAssetInvitesRequest +from openapi_generated.pinterest_client.model.create_invites_results_response_array import CreateInvitesResultsResponseArray +from openapi_generated.pinterest_client.model.create_membership_or_partnership_invites_body import CreateMembershipOrPartnershipInvitesBody +from openapi_generated.pinterest_client.model.delete_invites_results_response_array import DeleteInvitesResultsResponseArray +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.invite_response import InviteResponse +from openapi_generated.pinterest_client.model.invite_type import InviteType +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.respond_to_invites_response_array import RespondToInvitesResponseArray +from openapi_generated.pinterest_client.model.update_invites_results_response_array import UpdateInvitesResultsResponseArray + + +class BusinessAccessInviteApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.asset_access_requests_create_endpoint = _Endpoint( + settings={ + 'response_type': (CreateAssetAccessRequestResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/requests/assets/access', + 'operation_id': 'asset_access_requests_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'create_asset_access_request_body', + ], + 'required': [ + 'business_id', + 'create_asset_access_request_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'create_asset_access_request_body': + (CreateAssetAccessRequestBody,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'create_asset_access_request_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.cancel_invites_or_requests_endpoint = _Endpoint( + settings={ + 'response_type': (DeleteInvitesResultsResponseArray,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/invites', + 'operation_id': 'cancel_invites_or_requests', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'cancel_invites_body', + ], + 'required': [ + 'business_id', + 'cancel_invites_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'cancel_invites_body': + (CancelInvitesBody,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'cancel_invites_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_asset_invites_endpoint = _Endpoint( + settings={ + 'response_type': (UpdateInvitesResultsResponseArray,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/invites/assets/access', + 'operation_id': 'create_asset_invites', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'create_asset_invites_request', + ], + 'required': [ + 'business_id', + 'create_asset_invites_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'create_asset_invites_request': + (CreateAssetInvitesRequest,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'create_asset_invites_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_membership_or_partnership_invites_endpoint = _Endpoint( + settings={ + 'response_type': (CreateInvitesResultsResponseArray,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/invites', + 'operation_id': 'create_membership_or_partnership_invites', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'create_membership_or_partnership_invites_body', + ], + 'required': [ + 'business_id', + 'create_membership_or_partnership_invites_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'create_membership_or_partnership_invites_body': + (CreateMembershipOrPartnershipInvitesBody,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'create_membership_or_partnership_invites_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_invites_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/invites', + 'operation_id': 'get_invites', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'is_member', + 'invite_status', + 'invite_type', + 'bookmark', + 'page_size', + ], + 'required': [ + 'business_id', + ], + 'nullable': [ + ], + 'enum': [ + 'invite_status', + ], + 'validation': [ + 'business_id', + 'invite_status', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('invite_status',): { + + 'min_items': 1, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('invite_status',): { + + "PENDING": "PENDING", + "EXPIRED": "EXPIRED" + }, + }, + 'openapi_types': { + 'business_id': + (str,), + 'is_member': + (bool,), + 'invite_status': + ([str],), + 'invite_type': + (InviteType,), + 'bookmark': + (str,), + 'page_size': + (int,), + }, + 'attribute_map': { + 'business_id': 'business_id', + 'is_member': 'is_member', + 'invite_status': 'invite_status', + 'invite_type': 'invite_type', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + }, + 'location_map': { + 'business_id': 'path', + 'is_member': 'query', + 'invite_status': 'query', + 'invite_type': 'query', + 'bookmark': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + 'invite_status': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.respond_business_access_invites_endpoint = _Endpoint( + settings={ + 'response_type': (RespondToInvitesResponseArray,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/invites', + 'operation_id': 'respond_business_access_invites', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'auth_respond_invites_body', + ], + 'required': [ + 'auth_respond_invites_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'auth_respond_invites_body': + (AuthRespondInvitesBody,), + }, + 'attribute_map': { + }, + 'location_map': { + 'auth_respond_invites_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def asset_access_requests_create( + self, + business_id, + create_asset_access_request_body, + **kwargs + ): + """Create a request to access an existing partner's assets. # noqa: E501 + + Create a request to access an existing partner's assets with the specified permissions. The request will be sent to the partner for approval. The assets that can be requested are ad accounts and profiles. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.asset_access_requests_create(business_id, create_asset_access_request_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + create_asset_access_request_body (CreateAssetAccessRequestBody): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CreateAssetAccessRequestResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['create_asset_access_request_body'] = \ + create_asset_access_request_body + return self.asset_access_requests_create_endpoint.call_with_http_info(**kwargs) + + def cancel_invites_or_requests( + self, + business_id, + cancel_invites_body, + **kwargs + ): + """Cancel invites/requests # noqa: E501 + + Cancel membership/partnership invites and/or requests. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.cancel_invites_or_requests(business_id, cancel_invites_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Business id + cancel_invites_body (CancelInvitesBody): A list with invite ids + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeleteInvitesResultsResponseArray + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['cancel_invites_body'] = \ + cancel_invites_body + return self.cancel_invites_or_requests_endpoint.call_with_http_info(**kwargs) + + def create_asset_invites( + self, + business_id, + create_asset_invites_request, + **kwargs + ): + """Update invite/request with an asset permission # noqa: E501 + + Assign asset permissions information to an existing invite/request. Can be used to: - Request access to a partner's asset. Note: This is only for when no existing partnership exists. If an existing partnership exists, use \"Create a request to access an existing partner's assets\" to request access to your partner's assets. - invite_type=\"PARTNER_REQUEST\" - Invite a partner to access your business assets. Note: This is only for when there is no existing partnership. If there is an existing partnership, use \"Assign/Update partner asset permissions\" to assign a partner access to new assets. - invite_type=\"PARTNER_INVITE\" - Invite a member to access your business assets. Note: This is only for when there is no existing membership. If there is an existing membership, use \"Assign/Update member asset permissions\" to assign a member access to new assets. - invite_type=\"MEMBER_INVITE\" To learn more about permission levels, visit https://help.pinterest.com/en/business/article/business-manager-overview. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_asset_invites(business_id, create_asset_invites_request, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + create_asset_invites_request (CreateAssetInvitesRequest): A list of invites/requests together with the asset permissions to be assigned to the invite/request. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + UpdateInvitesResultsResponseArray + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['create_asset_invites_request'] = \ + create_asset_invites_request + return self.create_asset_invites_endpoint.call_with_http_info(**kwargs) + + def create_membership_or_partnership_invites( + self, + business_id, + create_membership_or_partnership_invites_body, + **kwargs + ): + """Create invites or requests # noqa: E501 + + Create batch invites or requests. Can create batch invites or requests as described below. - Invite members to join the business. This would required specifying the following: - invite_type=\"MEMBER_INVITE\" - business_role=\"EMPLOYEE\" OR business_role=\"BIZ_ADMIN\" (To learn more about business roles, visit https://help.pinterest.com/en/business/article/profile-permissions-in-business-access.) - members - Invite partners to access your business assets. This would require specifying the following: - invite_type=\"PARTNER_INVITE\" - business_role=\"PARTNER\" - partners - Request to be a partner so you can access their assets. This would require specifying the following: - invite_type=\"PARTNER_REQUEST\" - business_role=\"PARTNER\" - partners # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_membership_or_partnership_invites(business_id, create_membership_or_partnership_invites_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Business id + create_membership_or_partnership_invites_body (CreateMembershipOrPartnershipInvitesBody): An object with the properties: invite_type, partners, members, business_role + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CreateInvitesResultsResponseArray + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['create_membership_or_partnership_invites_body'] = \ + create_membership_or_partnership_invites_body + return self.create_membership_or_partnership_invites_endpoint.call_with_http_info(**kwargs) + + def get_invites( + self, + business_id, + **kwargs + ): + """Get invites/requests # noqa: E501 + + Get the membership/partnership invites and/or requests for the authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_invites(business_id, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + + Keyword Args: + is_member (bool): A boolean field to indicate whether the invite is to create a partnership or a membership.. [optional] if omitted the server will use the default value of True + invite_status ([str]): A list of invite statuses to filter invites by. Only invites whose status is in the provided statuses will be returned.. [optional] + invite_type (InviteType): Invite type to filter invites by. Only invites of the specified type will be returned.. [optional] + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + return self.get_invites_endpoint.call_with_http_info(**kwargs) + + def respond_business_access_invites( + self, + auth_respond_invites_body, + **kwargs + ): + """Accept or decline an invite/request # noqa: E501 + + Accept or decline invites or requests. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.respond_business_access_invites(auth_respond_invites_body, async_req=True) + >>> result = thread.get() + + Args: + auth_respond_invites_body (AuthRespondInvitesBody): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RespondToInvitesResponseArray + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['auth_respond_invites_body'] = \ + auth_respond_invites_body + return self.respond_business_access_invites_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/business_access_relationships_api.py b/openapi_generated/pinterest_client/api/business_access_relationships_api.py new file mode 100644 index 0000000..5b66878 --- /dev/null +++ b/openapi_generated/pinterest_client/api/business_access_relationships_api.py @@ -0,0 +1,1010 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.api_client import ApiClient, Endpoint as _Endpoint +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from openapi_generated.pinterest_client.model.delete_partners_request import DeletePartnersRequest +from openapi_generated.pinterest_client.model.delete_partners_response import DeletePartnersResponse +from openapi_generated.pinterest_client.model.deleted_members_response import DeletedMembersResponse +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.member_business_role import MemberBusinessRole +from openapi_generated.pinterest_client.model.members_to_delete_body import MembersToDeleteBody +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.partner_type import PartnerType +from openapi_generated.pinterest_client.model.update_member_business_role_body import UpdateMemberBusinessRoleBody +from openapi_generated.pinterest_client.model.update_member_results_response_array import UpdateMemberResultsResponseArray +from openapi_generated.pinterest_client.model.user_business_role_binding import UserBusinessRoleBinding + + +class BusinessAccessRelationshipsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.delete_business_membership_endpoint = _Endpoint( + settings={ + 'response_type': (DeletedMembersResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/members', + 'operation_id': 'delete_business_membership', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'members_to_delete_body', + ], + 'required': [ + 'business_id', + 'members_to_delete_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'members_to_delete_body': + (MembersToDeleteBody,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'members_to_delete_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_business_partners_endpoint = _Endpoint( + settings={ + 'response_type': (DeletePartnersResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/partners', + 'operation_id': 'delete_business_partners', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'delete_partners_request', + ], + 'required': [ + 'business_id', + 'delete_partners_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'delete_partners_request': + (DeletePartnersRequest,), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'delete_partners_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_business_employers_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/employers', + 'operation_id': 'get_business_employers', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'page_size', + 'bookmark', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'page_size', + ] + }, + root_map={ + 'validations': { + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'page_size': + (int,), + 'bookmark': + (str,), + }, + 'attribute_map': { + 'page_size': 'page_size', + 'bookmark': 'bookmark', + }, + 'location_map': { + 'page_size': 'query', + 'bookmark': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_business_members_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/members', + 'operation_id': 'get_business_members', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'assets_summary', + 'business_roles', + 'member_ids', + 'start_index', + 'bookmark', + 'page_size', + ], + 'required': [ + 'business_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + 'member_ids', + 'start_index', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('member_ids',): { + 'max_length': 500, + }, + ('start_index',): { + + 'inclusive_minimum': 0, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'assets_summary': + (bool,), + 'business_roles': + ([MemberBusinessRole],), + 'member_ids': + (str,), + 'start_index': + (int,), + 'bookmark': + (str,), + 'page_size': + (int,), + }, + 'attribute_map': { + 'business_id': 'business_id', + 'assets_summary': 'assets_summary', + 'business_roles': 'business_roles', + 'member_ids': 'member_ids', + 'start_index': 'start_index', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + }, + 'location_map': { + 'business_id': 'path', + 'assets_summary': 'query', + 'business_roles': 'query', + 'member_ids': 'query', + 'start_index': 'query', + 'bookmark': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + 'business_roles': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_business_partners_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/partners', + 'operation_id': 'get_business_partners', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'assets_summary', + 'partner_type', + 'partner_ids', + 'start_index', + 'page_size', + 'bookmark', + ], + 'required': [ + 'business_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + 'partner_ids', + 'start_index', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('partner_ids',): { + 'max_length': 500, + }, + ('start_index',): { + + 'inclusive_minimum': 0, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'assets_summary': + (bool,), + 'partner_type': + (PartnerType,), + 'partner_ids': + (str,), + 'start_index': + (int,), + 'page_size': + (int,), + 'bookmark': + (str,), + }, + 'attribute_map': { + 'business_id': 'business_id', + 'assets_summary': 'assets_summary', + 'partner_type': 'partner_type', + 'partner_ids': 'partner_ids', + 'start_index': 'start_index', + 'page_size': 'page_size', + 'bookmark': 'bookmark', + }, + 'location_map': { + 'business_id': 'path', + 'assets_summary': 'query', + 'partner_type': 'query', + 'partner_ids': 'query', + 'start_index': 'query', + 'page_size': 'query', + 'bookmark': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_business_memberships_endpoint = _Endpoint( + settings={ + 'response_type': (UpdateMemberResultsResponseArray,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/businesses/{business_id}/members', + 'operation_id': 'update_business_memberships', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'business_id', + 'update_member_business_role_body', + ], + 'required': [ + 'business_id', + 'update_member_business_role_body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'business_id', + 'update_member_business_role_body', + ] + }, + root_map={ + 'validations': { + ('business_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('update_member_business_role_body',): { + + 'min_items': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'business_id': + (str,), + 'update_member_business_role_body': + ([UpdateMemberBusinessRoleBody],), + }, + 'attribute_map': { + 'business_id': 'business_id', + }, + 'location_map': { + 'business_id': 'path', + 'update_member_business_role_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def delete_business_membership( + self, + business_id, + members_to_delete_body, + **kwargs + ): + """Terminate business memberships # noqa: E501 + + Terminate memberships between the specified members and your business. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_business_membership(business_id, members_to_delete_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Business id + members_to_delete_body (MembersToDeleteBody): List of members with role to delete. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeletedMembersResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['members_to_delete_body'] = \ + members_to_delete_body + return self.delete_business_membership_endpoint.call_with_http_info(**kwargs) + + def delete_business_partners( + self, + business_id, + delete_partners_request, + **kwargs + ): + """Terminate business partnerships # noqa: E501 + + Terminate partnerships between the specified partners and your business. Note: You may only batch terminate partners of the same partner type. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_business_partners(business_id, delete_partners_request, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + delete_partners_request (DeletePartnersRequest): An object containing a \"partner_ids\" property composed of a list of partner IDs and a \"partners_type\" property specifying the type of partners to delete. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeletePartnersResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['delete_partners_request'] = \ + delete_partners_request + return self.delete_business_partners_endpoint.call_with_http_info(**kwargs) + + def get_business_employers( + self, + **kwargs + ): + """List business employers for user # noqa: E501 + + Get all of the viewing user's business employers. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_business_employers(async_req=True) + >>> result = thread.get() + + + Keyword Args: + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + bookmark (str): Cursor used to fetch the next page of items. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + return self.get_business_employers_endpoint.call_with_http_info(**kwargs) + + def get_business_members( + self, + business_id, + **kwargs + ): + """Get business members # noqa: E501 + + Get all members of the specified business. The return response will include the member's business_role and assets they have access to if assets_summary=TRUE # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_business_members(business_id, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + + Keyword Args: + assets_summary (bool): Include assets summary in the response if this is true. The assets summary returns a dictionary representing a summary of the assets for the business user ID, with information like the ad accounts and profiles the user has permissions for and what those permissions are. [optional] if omitted the server will use the default value of False + business_roles ([MemberBusinessRole]): A list of business roles to filter the members by. Only members whose roles are in the specified roles will be returned.. [optional] + member_ids (str): A list of business members ids separated by comma.. [optional] + start_index (int): An index to start fetching the results from. Only the results starting from this index will be returned.. [optional] if omitted the server will use the default value of 0 + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + return self.get_business_members_endpoint.call_with_http_info(**kwargs) + + def get_business_partners( + self, + business_id, + **kwargs + ): + """Get business partners # noqa: E501 + + Get all partners of the specified business. If the assets_summary=TRUE and: - partner_type=INTERNAL, the business assets returned are your business assets the partner has access to. - partner_type=EXTERNAL, the business assets returned are your partner's business assets the partner has granted you access to. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_business_partners(business_id, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Unique identifier of the requesting business. + + Keyword Args: + assets_summary (bool): Include assets summary in the response if this is true. The assets summary returns a dictionary representing a summary of the assets for the business user ID, with information like the ad accounts and profiles the user has permissions for and what those permissions are. [optional] if omitted the server will use the default value of False + partner_type (PartnerType): Specifies whether to fetch internal or external (shared) partners. If partner_type=INTERNAL, the asset being queried is for accesses the partner has to your business assets.
If partner_type=EXTERNAL, the asset being queried is for the accesses you have to the partner's business asset.. [optional] + partner_ids (str): A list of business partner ids separated by commas used to filter the results. Only partners with the specified ids will be returned.. [optional] + start_index (int): An index to start fetching the results from. Only the results starting from this index will be returned.. [optional] if omitted the server will use the default value of 0 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + bookmark (str): Cursor used to fetch the next page of items. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + return self.get_business_partners_endpoint.call_with_http_info(**kwargs) + + def update_business_memberships( + self, + business_id, + update_member_business_role_body, + **kwargs + ): + """Update member's business role # noqa: E501 + + Update a member's business role within the business. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_business_memberships(business_id, update_member_business_role_body, async_req=True) + >>> result = thread.get() + + Args: + business_id (str): Business id + update_member_business_role_body ([UpdateMemberBusinessRoleBody]): List of objects with the member id and the business_role. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + UpdateMemberResultsResponseArray + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['business_id'] = \ + business_id + kwargs['update_member_business_role_body'] = \ + update_member_business_role_body + return self.update_business_memberships_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/campaigns_api.py b/openapi_generated/pinterest_client/api/campaigns_api.py index c51f0d8..8e7356d 100644 --- a/openapi_generated/pinterest_client/api/campaigns_api.py +++ b/openapi_generated/pinterest_client/api/campaigns_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -22,7 +22,7 @@ none_type, validate_and_convert_types ) -from openapi_generated.pinterest_client.model.ads_analytics_targeting_type import AdsAnalyticsTargetingType +from openapi_generated.pinterest_client.model.ads_analytics_campaign_targeting_type import AdsAnalyticsCampaignTargetingType from openapi_generated.pinterest_client.model.campaign_create_request import CampaignCreateRequest from openapi_generated.pinterest_client.model.campaign_create_response import CampaignCreateResponse from openapi_generated.pinterest_client.model.campaign_response import CampaignResponse @@ -112,7 +112,7 @@ def __init__(self, api_client=None): }, ('targeting_types',): { - 'max_items': 15, + 'max_items': 14, 'min_items': 1, }, }, @@ -165,6 +165,7 @@ def __init__(self, api_client=None): "TOTAL_IMPRESSION": "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY", + "COST_PER_OUTBOUND_CLICK_IN_DOLLAR": "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD", @@ -200,6 +201,7 @@ def __init__(self, api_client=None): "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS", "CHECKOUT_ROAS": "CHECKOUT_ROAS", "CUSTOM_ROAS": "CUSTOM_ROAS", + "VIDEO_MRC_VIEWS_1": "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2", @@ -208,6 +210,7 @@ def __init__(self, api_client=None): "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2", + "PAID_VIDEO_VIEWABLE_RATE": "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH": "VIDEO_LENGTH", "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR", "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR", @@ -240,6 +243,7 @@ def __init__(self, api_client=None): "LEADS": "LEADS", "COST_PER_LEAD": "COST_PER_LEAD", "QUIZ_COMPLETED": "QUIZ_COMPLETED", + "QUIZ_PIN_RESULT_OPEN": "QUIZ_PIN_RESULT_OPEN", "QUIZ_COMPLETION_RATE": "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH": "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH": "SHOWCASE_SUBPAGE_CLICKTHROUGH", @@ -310,7 +314,7 @@ def __init__(self, api_client=None): 'end_date': (date,), 'targeting_types': - ([AdsAnalyticsTargetingType],), + ([AdsAnalyticsCampaignTargetingType],), 'columns': ([str],), 'granularity': @@ -477,6 +481,7 @@ def __init__(self, api_client=None): "TOTAL_IMPRESSION": "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY", + "COST_PER_OUTBOUND_CLICK_IN_DOLLAR": "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD", @@ -512,6 +517,7 @@ def __init__(self, api_client=None): "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS", "CHECKOUT_ROAS": "CHECKOUT_ROAS", "CUSTOM_ROAS": "CUSTOM_ROAS", + "VIDEO_MRC_VIEWS_1": "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2", @@ -520,6 +526,7 @@ def __init__(self, api_client=None): "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2", + "PAID_VIDEO_VIEWABLE_RATE": "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH": "VIDEO_LENGTH", "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR", "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR", @@ -552,6 +559,7 @@ def __init__(self, api_client=None): "LEADS": "LEADS", "COST_PER_LEAD": "COST_PER_LEAD", "QUIZ_COMPLETED": "QUIZ_COMPLETED", + "QUIZ_PIN_RESULT_OPEN": "QUIZ_PIN_RESULT_OPEN", "QUIZ_COMPLETION_RATE": "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH": "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH": "SHOWCASE_SUBPAGE_CLICKTHROUGH", @@ -872,7 +880,9 @@ def __init__(self, api_client=None): "ACTIVE": "ACTIVE", "PAUSED": "PAUSED", - "ARCHIVED": "ARCHIVED" + "ARCHIVED": "ARCHIVED", + "DRAFT": "DRAFT", + "DELETED_DRAFT": "DELETED_DRAFT" }, ('order',): { @@ -1020,7 +1030,7 @@ def campaign_targeting_analytics_get( campaign_ids ([str]): List of Campaign Ids to use to filter the results. start_date (date): Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. end_date (date): Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. - targeting_types ([AdsAnalyticsTargetingType]): Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. + targeting_types ([AdsAnalyticsCampaignTargetingType]): Targeting type breakdowns for the report. The reporting per targeting type
is independent from each other. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users. columns ([str]): Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.
For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned granularity (Granularity): TOTAL - metrics are aggregated over the specified date range.
DAY - metrics are broken down daily.
HOUR - metrics are broken down hourly.
WEEKLY - metrics are broken down weekly.
MONTHLY - metrics are broken down monthly @@ -1388,7 +1398,7 @@ def campaigns_list( Keyword Args: campaign_ids ([str]): List of Campaign Ids to use to filter the results.. [optional] entity_statuses ([str]): Entity status. [optional] if omitted the server will use the default value of ["ACTIVE","PAUSED"] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] _return_http_data_only (bool): response data without head status diff --git a/openapi_generated/pinterest_client/api/catalogs_api.py b/openapi_generated/pinterest_client/api/catalogs_api.py index f53c5a3..f6ca392 100644 --- a/openapi_generated/pinterest_client/api/catalogs_api.py +++ b/openapi_generated/pinterest_client/api/catalogs_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -22,20 +22,38 @@ none_type, validate_and_convert_types ) +from openapi_generated.pinterest_client.model.catalog import Catalog +from openapi_generated.pinterest_client.model.catalogs_create_report_response import CatalogsCreateReportResponse +from openapi_generated.pinterest_client.model.catalogs_create_request import CatalogsCreateRequest from openapi_generated.pinterest_client.model.catalogs_feed import CatalogsFeed +from openapi_generated.pinterest_client.model.catalogs_feed_ingestion import CatalogsFeedIngestion +from openapi_generated.pinterest_client.model.catalogs_feed_processing_result import CatalogsFeedProcessingResult from openapi_generated.pinterest_client.model.catalogs_feeds_create_request import CatalogsFeedsCreateRequest from openapi_generated.pinterest_client.model.catalogs_feeds_update_request import CatalogsFeedsUpdateRequest from openapi_generated.pinterest_client.model.catalogs_item_validation_issue import CatalogsItemValidationIssue +from openapi_generated.pinterest_client.model.catalogs_item_validation_issues import CatalogsItemValidationIssues from openapi_generated.pinterest_client.model.catalogs_items import CatalogsItems from openapi_generated.pinterest_client.model.catalogs_items_batch import CatalogsItemsBatch from openapi_generated.pinterest_client.model.catalogs_items_batch_request import CatalogsItemsBatchRequest +from openapi_generated.pinterest_client.model.catalogs_items_filters import CatalogsItemsFilters +from openapi_generated.pinterest_client.model.catalogs_items_request import CatalogsItemsRequest from openapi_generated.pinterest_client.model.catalogs_list_products_by_filter_request import CatalogsListProductsByFilterRequest -from openapi_generated.pinterest_client.model.catalogs_product_group import CatalogsProductGroup +from openapi_generated.pinterest_client.model.catalogs_product import CatalogsProduct from openapi_generated.pinterest_client.model.catalogs_product_group_create_request import CatalogsProductGroupCreateRequest -from openapi_generated.pinterest_client.model.catalogs_product_group_product_counts import CatalogsProductGroupProductCounts +from openapi_generated.pinterest_client.model.catalogs_product_group_product_counts_vertical import CatalogsProductGroupProductCountsVertical from openapi_generated.pinterest_client.model.catalogs_product_group_update_request import CatalogsProductGroupUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_report import CatalogsReport +from openapi_generated.pinterest_client.model.catalogs_report_parameters import CatalogsReportParameters +from openapi_generated.pinterest_client.model.catalogs_report_stats import CatalogsReportStats +from openapi_generated.pinterest_client.model.catalogs_vertical_batch_request import CatalogsVerticalBatchRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_feeds_create_request import CatalogsVerticalFeedsCreateRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_feeds_update_request import CatalogsVerticalFeedsUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group import CatalogsVerticalProductGroup +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group_create_request import CatalogsVerticalProductGroupCreateRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group_update_request import CatalogsVerticalProductGroupUpdateRequest from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.unknownbasetype import UNKNOWNBASETYPE class CatalogsApi(object): @@ -49,6 +67,142 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client + self.catalogs_create_endpoint = _Endpoint( + settings={ + 'response_type': (Catalog,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/catalogs', + 'operation_id': 'catalogs_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'catalogs_create_request', + 'ad_account_id', + ], + 'required': [ + 'catalogs_create_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'catalogs_create_request': + (CatalogsCreateRequest,), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'catalogs_create_request': 'body', + 'ad_account_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.catalogs_list_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/catalogs', + 'operation_id': 'catalogs_list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'bookmark', + 'page_size', + 'ad_account_id', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'page_size', + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'bookmark': + (str,), + 'page_size': + (int,), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'bookmark': 'bookmark', + 'page_size': 'page_size', + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'bookmark': 'query', + 'page_size': 'query', + 'ad_account_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.catalogs_product_group_pins_list_endpoint = _Endpoint( settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), @@ -66,6 +220,7 @@ def __init__(self, api_client=None): 'bookmark', 'page_size', 'ad_account_id', + 'pin_metrics', ], 'required': [ 'product_group_id', @@ -111,18 +266,22 @@ def __init__(self, api_client=None): (int,), 'ad_account_id': (str,), + 'pin_metrics': + (bool,), }, 'attribute_map': { 'product_group_id': 'product_group_id', 'bookmark': 'bookmark', 'page_size': 'page_size', 'ad_account_id': 'ad_account_id', + 'pin_metrics': 'pin_metrics', }, 'location_map': { 'product_group_id': 'path', 'bookmark': 'query', 'page_size': 'query', 'ad_account_id': 'query', + 'pin_metrics': 'query', }, 'collection_format_map': { } @@ -137,7 +296,7 @@ def __init__(self, api_client=None): ) self.catalogs_product_groups_create_endpoint = _Endpoint( settings={ - 'response_type': (CatalogsProductGroup,), + 'response_type': (CatalogsVerticalProductGroup,), 'auth': [ 'pinterest_oauth2' ], @@ -148,11 +307,76 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ - 'catalogs_product_group_create_request', + 'unknown_base_type', + 'ad_account_id', + ], + 'required': [ + 'unknown_base_type', + ], + 'nullable': [ + 'unknown_base_type', + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'unknown_base_type': + (UNKNOWN_BASE_TYPE,), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'unknown_base_type': 'body', + 'ad_account_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.catalogs_product_groups_create_many_endpoint = _Endpoint( + settings={ + 'response_type': ([str],), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/catalogs/product_groups/multiple', + 'operation_id': 'catalogs_product_groups_create_many', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'request_body', 'ad_account_id', ], 'required': [ - 'catalogs_product_group_create_request', + 'request_body', ], 'nullable': [ ], @@ -174,8 +398,8 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'catalogs_product_group_create_request': - (CatalogsProductGroupCreateRequest,), + 'request_body': + ([bool, date, datetime, dict, float, int, list, str, none_type],), 'ad_account_id': (str,), }, @@ -183,7 +407,7 @@ def __init__(self, api_client=None): 'ad_account_id': 'ad_account_id', }, 'location_map': { - 'catalogs_product_group_create_request': 'body', + 'request_body': 'body', 'ad_account_id': 'query', }, 'collection_format_map': { @@ -269,9 +493,79 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.catalogs_product_groups_delete_many_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/catalogs/product_groups/multiple', + 'operation_id': 'catalogs_product_groups_delete_many', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'ad_account_id', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'max_items': 1000, + 'min_items': 1, + }, + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + ([int],), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'id': 'query', + 'ad_account_id': 'query', + }, + 'collection_format_map': { + 'id': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.catalogs_product_groups_get_endpoint = _Endpoint( settings={ - 'response_type': (CatalogsProductGroup,), + 'response_type': (CatalogsVerticalProductGroup,), 'auth': [ 'pinterest_oauth2' ], @@ -352,32 +646,45 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'id', 'feed_id', + 'catalog_id', 'bookmark', 'page_size', 'ad_account_id', ], - 'required': [ - 'feed_id', - ], + 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ + 'id', 'feed_id', + 'catalog_id', 'page_size', 'ad_account_id', ] }, root_map={ 'validations': { + ('id',): { + + 'max_items': 1000, + 'min_items': 1, + }, ('feed_id',): { 'regex': { 'pattern': r'^\d+$', # noqa: E501 }, }, + ('catalog_id',): { + + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, ('page_size',): { 'inclusive_maximum': 250, @@ -393,8 +700,12 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'id': + ([int],), 'feed_id': (str,), + 'catalog_id': + (str,), 'bookmark': (str,), 'page_size': @@ -403,18 +714,23 @@ def __init__(self, api_client=None): (str,), }, 'attribute_map': { + 'id': 'id', 'feed_id': 'feed_id', + 'catalog_id': 'catalog_id', 'bookmark': 'bookmark', 'page_size': 'page_size', 'ad_account_id': 'ad_account_id', }, 'location_map': { + 'id': 'query', 'feed_id': 'query', + 'catalog_id': 'query', 'bookmark': 'query', 'page_size': 'query', 'ad_account_id': 'query', }, 'collection_format_map': { + 'id': 'csv', } }, headers_map={ @@ -427,7 +743,7 @@ def __init__(self, api_client=None): ) self.catalogs_product_groups_product_counts_get_endpoint = _Endpoint( settings={ - 'response_type': (CatalogsProductGroupProductCounts,), + 'response_type': (CatalogsProductGroupProductCountsVertical,), 'auth': [ 'pinterest_oauth2' ], @@ -497,7 +813,7 @@ def __init__(self, api_client=None): ) self.catalogs_product_groups_update_endpoint = _Endpoint( settings={ - 'response_type': (CatalogsProductGroup,), + 'response_type': (CatalogsVerticalProductGroup,), 'auth': [ 'pinterest_oauth2' ], @@ -509,14 +825,15 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'product_group_id', - 'catalogs_product_group_update_request', + 'unknown_base_type', 'ad_account_id', ], 'required': [ 'product_group_id', - 'catalogs_product_group_update_request', + 'unknown_base_type', ], 'nullable': [ + 'unknown_base_type', ], 'enum': [ ], @@ -545,8 +862,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'product_group_id': (str,), - 'catalogs_product_group_update_request': - (CatalogsProductGroupUpdateRequest,), + 'unknown_base_type': + (UNKNOWN_BASE_TYPE,), 'ad_account_id': (str,), }, @@ -556,7 +873,7 @@ def __init__(self, api_client=None): }, 'location_map': { 'product_group_id': 'path', - 'catalogs_product_group_update_request': 'body', + 'unknown_base_type': 'body', 'ad_account_id': 'query', }, 'collection_format_map': { @@ -662,6 +979,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (CatalogsFeed,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/catalogs/feeds', @@ -671,13 +989,14 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ - 'catalogs_feeds_create_request', + 'unknown_base_type', 'ad_account_id', ], 'required': [ - 'catalogs_feeds_create_request', + 'unknown_base_type', ], 'nullable': [ + 'unknown_base_type', ], 'enum': [ ], @@ -697,8 +1016,8 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'catalogs_feeds_create_request': - (CatalogsFeedsCreateRequest,), + 'unknown_base_type': + (UNKNOWN_BASE_TYPE,), 'ad_account_id': (str,), }, @@ -706,7 +1025,7 @@ def __init__(self, api_client=None): 'ad_account_id': 'ad_account_id', }, 'location_map': { - 'catalogs_feeds_create_request': 'body', + 'unknown_base_type': 'body', 'ad_account_id': 'query', }, 'collection_format_map': { @@ -726,6 +1045,7 @@ def __init__(self, api_client=None): settings={ 'response_type': None, 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/catalogs/feeds/{feed_id}', @@ -796,6 +1116,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (CatalogsFeed,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/catalogs/feeds/{feed_id}', @@ -862,21 +1183,93 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.feeds_list_endpoint = _Endpoint( + self.feeds_ingest_endpoint = _Endpoint( settings={ - 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'response_type': (CatalogsFeedIngestion,), 'auth': [ 'pinterest_oauth2' ], - 'endpoint_path': '/catalogs/feeds', - 'operation_id': 'feeds_list', - 'http_method': 'GET', + 'endpoint_path': '/catalogs/feeds/{feed_id}/ingest', + 'operation_id': 'feeds_ingest', + 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'bookmark', + 'feed_id', + 'ad_account_id', + ], + 'required': [ + 'feed_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'feed_id', + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('feed_id',): { + + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'feed_id': + (str,), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'feed_id': 'feed_id', + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'feed_id': 'path', + 'ad_account_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.feeds_list_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'client_credentials', + 'pinterest_oauth2' + ], + 'endpoint_path': '/catalogs/feeds', + 'operation_id': 'feeds_list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'bookmark', 'page_size', + 'catalog_id', 'ad_account_id', ], 'required': [], @@ -886,6 +1279,7 @@ def __init__(self, api_client=None): ], 'validation': [ 'page_size', + 'catalog_id', 'ad_account_id', ] }, @@ -896,6 +1290,12 @@ def __init__(self, api_client=None): 'inclusive_maximum': 250, 'inclusive_minimum': 1, }, + ('catalog_id',): { + + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, ('ad_account_id',): { 'max_length': 18, 'regex': { @@ -910,17 +1310,21 @@ def __init__(self, api_client=None): (str,), 'page_size': (int,), + 'catalog_id': + (str,), 'ad_account_id': (str,), }, 'attribute_map': { 'bookmark': 'bookmark', 'page_size': 'page_size', + 'catalog_id': 'catalog_id', 'ad_account_id': 'ad_account_id', }, 'location_map': { 'bookmark': 'query', 'page_size': 'query', + 'catalog_id': 'query', 'ad_account_id': 'query', }, 'collection_format_map': { @@ -938,6 +1342,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (CatalogsFeed,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/catalogs/feeds/{feed_id}', @@ -948,14 +1353,15 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'feed_id', - 'catalogs_feeds_update_request', + 'unknown_base_type', 'ad_account_id', ], 'required': [ 'feed_id', - 'catalogs_feeds_update_request', + 'unknown_base_type', ], 'nullable': [ + 'unknown_base_type', ], 'enum': [ ], @@ -984,8 +1390,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'feed_id': (str,), - 'catalogs_feeds_update_request': - (CatalogsFeedsUpdateRequest,), + 'unknown_base_type': + (UNKNOWN_BASE_TYPE,), 'ad_account_id': (str,), }, @@ -995,7 +1401,7 @@ def __init__(self, api_client=None): }, 'location_map': { 'feed_id': 'path', - 'catalogs_feeds_update_request': 'body', + 'unknown_base_type': 'body', 'ad_account_id': 'query', }, 'collection_format_map': { @@ -1015,6 +1421,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (CatalogsItemsBatch,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/catalogs/items/batch/{batch_id}', @@ -1078,6 +1485,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (CatalogsItemsBatch,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/catalogs/items/batch', @@ -1087,13 +1495,14 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ - 'catalogs_items_batch_request', + 'unknown_base_type', 'ad_account_id', ], 'required': [ - 'catalogs_items_batch_request', + 'unknown_base_type', ], 'nullable': [ + 'unknown_base_type', ], 'enum': [ ], @@ -1113,8 +1522,8 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'catalogs_items_batch_request': - (CatalogsItemsBatchRequest,), + 'unknown_base_type': + (UNKNOWN_BASE_TYPE,), 'ad_account_id': (str,), }, @@ -1122,7 +1531,7 @@ def __init__(self, api_client=None): 'ad_account_id': 'ad_account_id', }, 'location_map': { - 'catalogs_items_batch_request': 'body', + 'unknown_base_type': 'body', 'ad_account_id': 'query', }, 'collection_format_map': { @@ -1152,13 +1561,13 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'country', - 'item_ids', 'language', 'ad_account_id', + 'item_ids', + 'filters', ], 'required': [ 'country', - 'item_ids', 'language', ], 'nullable': [ @@ -1183,24 +1592,28 @@ def __init__(self, api_client=None): 'openapi_types': { 'country': (str,), - 'item_ids': - ([str],), 'language': (str,), 'ad_account_id': (str,), + 'item_ids': + ([str],), + 'filters': + (CatalogsItemsFilters,), }, 'attribute_map': { 'country': 'country', - 'item_ids': 'item_ids', 'language': 'language', 'ad_account_id': 'ad_account_id', + 'item_ids': 'item_ids', + 'filters': 'filters', }, 'location_map': { 'country': 'query', - 'item_ids': 'query', 'language': 'query', 'ad_account_id': 'query', + 'item_ids': 'query', + 'filters': 'query', }, 'collection_format_map': { 'item_ids': 'multi', @@ -1311,6 +1724,70 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.items_post_endpoint = _Endpoint( + settings={ + 'response_type': (CatalogsItems,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/catalogs/items', + 'operation_id': 'items_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'catalogs_items_request', + 'ad_account_id', + ], + 'required': [ + 'catalogs_items_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'catalogs_items_request': + (CatalogsItemsRequest,), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'catalogs_items_request': 'body', + 'ad_account_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) self.products_by_product_group_filter_list_endpoint = _Endpoint( settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), @@ -1328,6 +1805,7 @@ def __init__(self, api_client=None): 'bookmark', 'page_size', 'ad_account_id', + 'pin_metrics', ], 'required': [ 'catalogs_list_products_by_filter_request', @@ -1366,17 +1844,85 @@ def __init__(self, api_client=None): (int,), 'ad_account_id': (str,), + 'pin_metrics': + (bool,), }, 'attribute_map': { 'bookmark': 'bookmark', 'page_size': 'page_size', 'ad_account_id': 'ad_account_id', + 'pin_metrics': 'pin_metrics', }, 'location_map': { 'catalogs_list_products_by_filter_request': 'body', 'bookmark': 'query', 'page_size': 'query', 'ad_account_id': 'query', + 'pin_metrics': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.reports_create_endpoint = _Endpoint( + settings={ + 'response_type': (CatalogsCreateReportResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/catalogs/reports', + 'operation_id': 'reports_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'catalogs_report_parameters', + 'ad_account_id', + ], + 'required': [ + 'catalogs_report_parameters', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'catalogs_report_parameters': + (CatalogsReportParameters,), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'catalogs_report_parameters': 'body', + 'ad_account_id': 'query', }, 'collection_format_map': { } @@ -1391,27 +1937,878 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.reports_get_endpoint = _Endpoint( + settings={ + 'response_type': (CatalogsReport,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/catalogs/reports', + 'operation_id': 'reports_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'token', + 'ad_account_id', + ], + 'required': [ + 'token', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'token': + (str,), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'token': 'token', + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'token': 'query', + 'ad_account_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.reports_stats_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/catalogs/reports/stats', + 'operation_id': 'reports_stats', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'parameters', + 'ad_account_id', + 'page_size', + 'bookmark', + ], + 'required': [ + 'parameters', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'parameters': + (CatalogsReportParameters,), + 'ad_account_id': + (str,), + 'page_size': + (int,), + 'bookmark': + (str,), + }, + 'attribute_map': { + 'parameters': 'parameters', + 'ad_account_id': 'ad_account_id', + 'page_size': 'page_size', + 'bookmark': 'bookmark', + }, + 'location_map': { + 'parameters': 'query', + 'ad_account_id': 'query', + 'page_size': 'query', + 'bookmark': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def catalogs_create( + self, + catalogs_create_request, + **kwargs + ): + """Create catalog # noqa: E501 + + Create a new catalog owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more Note: this API only supports the catalog type of HOTEL for now. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.catalogs_create(catalogs_create_request, async_req=True) + >>> result = thread.get() + + Args: + catalogs_create_request (CatalogsCreateRequest): Request object used to created a feed. + + Keyword Args: + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Catalog + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['catalogs_create_request'] = \ + catalogs_create_request + return self.catalogs_create_endpoint.call_with_http_info(**kwargs) + + def catalogs_list( + self, + **kwargs + ): + """List catalogs # noqa: E501 + + Fetch catalogs owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.catalogs_list(async_req=True) + >>> result = thread.get() + + + Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + return self.catalogs_list_endpoint.call_with_http_info(**kwargs) + + def catalogs_product_group_pins_list( + self, + product_group_id, + **kwargs + ): + """List products by product group # noqa: E501 + + Get a list of product pins for a given Catalogs Product Group Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.catalogs_product_group_pins_list(product_group_id, async_req=True) + >>> result = thread.get() + + Args: + product_group_id (str): Unique identifier of a product group + + Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + ad_account_id (str): Unique identifier of an ad account.. [optional] + pin_metrics (bool): Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then.. [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['product_group_id'] = \ + product_group_id + return self.catalogs_product_group_pins_list_endpoint.call_with_http_info(**kwargs) + + def catalogs_product_groups_create( + self, + unknown_base_type, + **kwargs + ): + """Create product group # noqa: E501 + + Create product group to use in Catalogs owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.catalogs_product_groups_create(unknown_base_type, async_req=True) + >>> result = thread.get() + + Args: + unknown_base_type (UNKNOWN_BASE_TYPE): Request object used to create a single catalogs product groups. + + Keyword Args: + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CatalogsVerticalProductGroup + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['unknown_base_type'] = \ + unknown_base_type + return self.catalogs_product_groups_create_endpoint.call_with_http_info(**kwargs) + + def catalogs_product_groups_create_many( + self, + request_body, + **kwargs + ): + """Create product groups # noqa: E501 + + Create product group to use in Catalogs owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.catalogs_product_groups_create_many(request_body, async_req=True) + >>> result = thread.get() + + Args: + request_body ([bool, date, datetime, dict, float, int, list, str, none_type]): Request object used to create one or more catalogs product groups. + + Keyword Args: + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + [str] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['request_body'] = \ + request_body + return self.catalogs_product_groups_create_many_endpoint.call_with_http_info(**kwargs) + + def catalogs_product_groups_delete( + self, + product_group_id, + **kwargs + ): + """Delete product group # noqa: E501 + + Delete a product group owned by the \"operation user_account\" from being in use in Catalogs. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.catalogs_product_groups_delete(product_group_id, async_req=True) + >>> result = thread.get() + + Args: + product_group_id (str): Unique identifier of a product group + + Keyword Args: + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['product_group_id'] = \ + product_group_id + return self.catalogs_product_groups_delete_endpoint.call_with_http_info(**kwargs) + + def catalogs_product_groups_delete_many( + self, + id, + **kwargs + ): + """Delete product groups # noqa: E501 + + Delete product groups owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.catalogs_product_groups_delete_many(id, async_req=True) + >>> result = thread.get() + + Args: + id ([int]): Comma-separated list of product group ids + + Keyword Args: + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.catalogs_product_groups_delete_many_endpoint.call_with_http_info(**kwargs) + + def catalogs_product_groups_get( + self, + product_group_id, + **kwargs + ): + """Get product group # noqa: E501 + + Get a singe product group for a given Catalogs Product Group Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.catalogs_product_groups_get(product_group_id, async_req=True) + >>> result = thread.get() + + Args: + product_group_id (str): Unique identifier of a product group + + Keyword Args: + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CatalogsVerticalProductGroup + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['product_group_id'] = \ + product_group_id + return self.catalogs_product_groups_get_endpoint.call_with_http_info(**kwargs) + + def catalogs_product_groups_list( + self, + **kwargs + ): + """List product groups # noqa: E501 + + Get a list of product groups for a given Catalogs Feed Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.catalogs_product_groups_list(async_req=True) + >>> result = thread.get() + + + Keyword Args: + id ([int]): Comma-separated list of product group ids. [optional] + feed_id (str): Filter entities for a given feed_id. If not given, all feeds are considered.. [optional] + catalog_id (str): Filter entities for a given catalog_id. If not given, all catalogs are considered.. [optional] + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + return self.catalogs_product_groups_list_endpoint.call_with_http_info(**kwargs) - def catalogs_product_group_pins_list( + def catalogs_product_groups_product_counts_get( self, product_group_id, **kwargs ): - """List products for a Product Group # noqa: E501 + """Get product counts # noqa: E501 - Get a list of product pins for a given Catalogs Product Group Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Get a product counts for a given Catalogs Product Group owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.catalogs_product_group_pins_list(product_group_id, async_req=True) + >>> thread = api.catalogs_product_groups_product_counts_get(product_group_id, async_req=True) >>> result = thread.get() Args: product_group_id (str): Unique identifier of a product group Keyword Args: - bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -1441,7 +2838,7 @@ def catalogs_product_group_pins_list( async_req (bool): execute request asynchronously Returns: - bool, date, datetime, dict, float, int, list, str, none_type + CatalogsProductGroupProductCountsVertical If the method is called asynchronously, returns the request thread. """ @@ -1471,24 +2868,26 @@ def catalogs_product_group_pins_list( kwargs['_host_index'] = kwargs.get('_host_index') kwargs['product_group_id'] = \ product_group_id - return self.catalogs_product_group_pins_list_endpoint.call_with_http_info(**kwargs) + return self.catalogs_product_groups_product_counts_get_endpoint.call_with_http_info(**kwargs) - def catalogs_product_groups_create( + def catalogs_product_groups_update( self, - catalogs_product_group_create_request, + product_group_id, + unknown_base_type, **kwargs ): - """Create product group # noqa: E501 + """Update single product group # noqa: E501 - Create product group to use in Catalogs owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Update product group owned by the \"operation user_account\" to use in Catalogs. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.catalogs_product_groups_create(catalogs_product_group_create_request, async_req=True) + >>> thread = api.catalogs_product_groups_update(product_group_id, unknown_base_type, async_req=True) >>> result = thread.get() Args: - catalogs_product_group_create_request (CatalogsProductGroupCreateRequest): Request object used to created a catalogs product group. + product_group_id (str): Unique identifier of a product group + unknown_base_type (UNKNOWN_BASE_TYPE): Request object used to Update a catalogs product group. Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -1520,7 +2919,7 @@ def catalogs_product_groups_create( async_req (bool): execute request asynchronously Returns: - CatalogsProductGroup + CatalogsVerticalProductGroup If the method is called asynchronously, returns the request thread. """ @@ -1548,28 +2947,32 @@ def catalogs_product_groups_create( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['catalogs_product_group_create_request'] = \ - catalogs_product_group_create_request - return self.catalogs_product_groups_create_endpoint.call_with_http_info(**kwargs) + kwargs['product_group_id'] = \ + product_group_id + kwargs['unknown_base_type'] = \ + unknown_base_type + return self.catalogs_product_groups_update_endpoint.call_with_http_info(**kwargs) - def catalogs_product_groups_delete( + def feed_processing_results_list( self, - product_group_id, + feed_id, **kwargs ): - """Delete product group # noqa: E501 + """List feed processing results # noqa: E501 - Delete a product group owned by the \"operation user_account\" from being in use in Catalogs. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Fetch a feed processing results owned by the \"operation user_account\". Please note that for now the bookmark parameter is not functional and only the first page will be available until it is implemented in some release in the near future. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.catalogs_product_groups_delete(product_group_id, async_req=True) + >>> thread = api.feed_processing_results_list(feed_id, async_req=True) >>> result = thread.get() Args: - product_group_id (str): Unique identifier of a product group + feed_id (str): Unique identifier of a feed Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -1599,7 +3002,7 @@ def catalogs_product_groups_delete( async_req (bool): execute request asynchronously Returns: - None + bool, date, datetime, dict, float, int, list, str, none_type If the method is called asynchronously, returns the request thread. """ @@ -1627,26 +3030,26 @@ def catalogs_product_groups_delete( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['product_group_id'] = \ - product_group_id - return self.catalogs_product_groups_delete_endpoint.call_with_http_info(**kwargs) + kwargs['feed_id'] = \ + feed_id + return self.feed_processing_results_list_endpoint.call_with_http_info(**kwargs) - def catalogs_product_groups_get( + def feeds_create( self, - product_group_id, + unknown_base_type, **kwargs ): - """Get product group # noqa: E501 + """Create feed # noqa: E501 - Get a singe product group for a given Catalogs Product Group Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Create a new feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Please, be aware that \"default_country\" and \"default_locale\" are not required in the spec for forward compatibility but for now the API will not accept requests without those fields. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. For Retail partners, refer to Before you get started with Catalogs. For Hotel parterns, refer to Pinterest API for shopping. Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.catalogs_product_groups_get(product_group_id, async_req=True) + >>> thread = api.feeds_create(unknown_base_type, async_req=True) >>> result = thread.get() Args: - product_group_id (str): Unique identifier of a product group + unknown_base_type (UNKNOWN_BASE_TYPE): Request object used to created a feed. Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -1678,7 +3081,7 @@ def catalogs_product_groups_get( async_req (bool): execute request asynchronously Returns: - CatalogsProductGroup + CatalogsFeed If the method is called asynchronously, returns the request thread. """ @@ -1706,30 +3109,28 @@ def catalogs_product_groups_get( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['product_group_id'] = \ - product_group_id - return self.catalogs_product_groups_get_endpoint.call_with_http_info(**kwargs) + kwargs['unknown_base_type'] = \ + unknown_base_type + return self.feeds_create_endpoint.call_with_http_info(**kwargs) - def catalogs_product_groups_list( + def feeds_delete( self, feed_id, **kwargs ): - """List product groups # noqa: E501 + """Delete feed # noqa: E501 - Get a list of product groups for a given Catalogs Feed Id owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Delete a feed owned by the \"operating user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. For Retail partners, refer to Before you get started with Catalogs. For Hotel parterns, refer to Pinterest API for shopping. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.catalogs_product_groups_list(feed_id, async_req=True) + >>> thread = api.feeds_delete(feed_id, async_req=True) >>> result = thread.get() Args: feed_id (str): Unique identifier of a feed Keyword Args: - bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -1759,7 +3160,7 @@ def catalogs_product_groups_list( async_req (bool): execute request asynchronously Returns: - bool, date, datetime, dict, float, int, list, str, none_type + None If the method is called asynchronously, returns the request thread. """ @@ -1789,24 +3190,24 @@ def catalogs_product_groups_list( kwargs['_host_index'] = kwargs.get('_host_index') kwargs['feed_id'] = \ feed_id - return self.catalogs_product_groups_list_endpoint.call_with_http_info(**kwargs) + return self.feeds_delete_endpoint.call_with_http_info(**kwargs) - def catalogs_product_groups_product_counts_get( + def feeds_get( self, - product_group_id, + feed_id, **kwargs ): - """Get product counts for a Product Group # noqa: E501 + """Get feed # noqa: E501 - Get a product counts for a given Catalogs Product Group owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Get a single feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. For Retail partners, refer to Before you get started with Catalogs. For Hotel parterns, refer to Pinterest API for shopping. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.catalogs_product_groups_product_counts_get(product_group_id, async_req=True) + >>> thread = api.feeds_get(feed_id, async_req=True) >>> result = thread.get() Args: - product_group_id (str): Unique identifier of a product group + feed_id (str): Unique identifier of a feed Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -1838,7 +3239,7 @@ def catalogs_product_groups_product_counts_get( async_req (bool): execute request asynchronously Returns: - CatalogsProductGroupProductCounts + CatalogsFeed If the method is called asynchronously, returns the request thread. """ @@ -1866,28 +3267,26 @@ def catalogs_product_groups_product_counts_get( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['product_group_id'] = \ - product_group_id - return self.catalogs_product_groups_product_counts_get_endpoint.call_with_http_info(**kwargs) + kwargs['feed_id'] = \ + feed_id + return self.feeds_get_endpoint.call_with_http_info(**kwargs) - def catalogs_product_groups_update( + def feeds_ingest( self, - product_group_id, - catalogs_product_group_update_request, + feed_id, **kwargs ): - """Update product group # noqa: E501 + """Ingest feed items # noqa: E501 - Update product group owned by the \"operation user_account\" to use in Catalogs. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Ingest items for a given feed owned by the \"operation user_account\". Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more Note: This endpoint is restricted to a specific group of users. If you require access, please reach out to your partner manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.catalogs_product_groups_update(product_group_id, catalogs_product_group_update_request, async_req=True) + >>> thread = api.feeds_ingest(feed_id, async_req=True) >>> result = thread.get() Args: - product_group_id (str): Unique identifier of a product group - catalogs_product_group_update_request (CatalogsProductGroupUpdateRequest): Request object used to Update a catalogs product group. + feed_id (str): Unique identifier of a feed Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -1919,7 +3318,7 @@ def catalogs_product_groups_update( async_req (bool): execute request asynchronously Returns: - CatalogsProductGroup + CatalogsFeedIngestion If the method is called asynchronously, returns the request thread. """ @@ -1947,32 +3346,28 @@ def catalogs_product_groups_update( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['product_group_id'] = \ - product_group_id - kwargs['catalogs_product_group_update_request'] = \ - catalogs_product_group_update_request - return self.catalogs_product_groups_update_endpoint.call_with_http_info(**kwargs) + kwargs['feed_id'] = \ + feed_id + return self.feeds_ingest_endpoint.call_with_http_info(**kwargs) - def feed_processing_results_list( + def feeds_list( self, - feed_id, **kwargs ): - """List processing results for a given feed # noqa: E501 + """List feeds # noqa: E501 - Fetch a feed processing results owned by the \"operation user_account\". Please note that for now the bookmark parameter is not functional and only the first page will be available until it is implemented in some release in the near future. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Fetch feeds owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. For Retail partners, refer to Before you get started with Catalogs. For Hotel parterns, refer to Pinterest API for shopping. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.feed_processing_results_list(feed_id, async_req=True) + >>> thread = api.feeds_list(async_req=True) >>> result = thread.get() - Args: - feed_id (str): Unique identifier of a feed Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + catalog_id (str): Filter entities for a given catalog_id. If not given, all catalogs are considered.. [optional] ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -2030,26 +3425,26 @@ def feed_processing_results_list( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['feed_id'] = \ - feed_id - return self.feed_processing_results_list_endpoint.call_with_http_info(**kwargs) + return self.feeds_list_endpoint.call_with_http_info(**kwargs) - def feeds_create( + def feeds_update( self, - catalogs_feeds_create_request, + feed_id, + unknown_base_type, **kwargs ): - """Create feed # noqa: E501 + """Update feed # noqa: E501 - Create a new feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Please, be aware that \"default_country\" and \"default_locale\" are not required in the spec for forward compatibility but for now the API will not accept requests without those fields. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Update a feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. For Retail partners, refer to Before you get started with Catalogs. For Hotel parterns, refer to Pinterest API for shopping. Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.feeds_create(catalogs_feeds_create_request, async_req=True) + >>> thread = api.feeds_update(feed_id, unknown_base_type, async_req=True) >>> result = thread.get() Args: - catalogs_feeds_create_request (CatalogsFeedsCreateRequest): Request object used to created a feed. + feed_id (str): Unique identifier of a feed + unknown_base_type (UNKNOWN_BASE_TYPE): Request object used to update a feed. Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -2109,26 +3504,28 @@ def feeds_create( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['catalogs_feeds_create_request'] = \ - catalogs_feeds_create_request - return self.feeds_create_endpoint.call_with_http_info(**kwargs) + kwargs['feed_id'] = \ + feed_id + kwargs['unknown_base_type'] = \ + unknown_base_type + return self.feeds_update_endpoint.call_with_http_info(**kwargs) - def feeds_delete( + def items_batch_get( self, - feed_id, + batch_id, **kwargs ): - """Delete feed # noqa: E501 + """Get item batch status # noqa: E501 - Delete a feed owned by the \"operating user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Get a single catalogs items batch owned by the \"operating user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.feeds_delete(feed_id, async_req=True) + >>> thread = api.items_batch_get(batch_id, async_req=True) >>> result = thread.get() Args: - feed_id (str): Unique identifier of a feed + batch_id (str): Id of a catalogs items batch to fetch Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -2160,7 +3557,7 @@ def feeds_delete( async_req (bool): execute request asynchronously Returns: - None + CatalogsItemsBatch If the method is called asynchronously, returns the request thread. """ @@ -2188,26 +3585,26 @@ def feeds_delete( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['feed_id'] = \ - feed_id - return self.feeds_delete_endpoint.call_with_http_info(**kwargs) + kwargs['batch_id'] = \ + batch_id + return self.items_batch_get_endpoint.call_with_http_info(**kwargs) - def feeds_get( + def items_batch_post( self, - feed_id, + unknown_base_type, **kwargs ): - """Get feed # noqa: E501 + """Operate on item batch # noqa: E501 - Get a single feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + This endpoint supports multiple operations on a set of one or more catalog items owned by the \"operation user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Note: - Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. - The item UPSERT operation is restricted to users without a feed data source. If you plan to migrate item ingestion from feeds to the API, please reach out to your partner manager to get assistance. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.feeds_get(feed_id, async_req=True) + >>> thread = api.items_batch_post(unknown_base_type, async_req=True) >>> result = thread.get() Args: - feed_id (str): Unique identifier of a feed + unknown_base_type (UNKNOWN_BASE_TYPE): Request object used to create catalogs items in a batch Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -2239,7 +3636,7 @@ def feeds_get( async_req (bool): execute request asynchronously Returns: - CatalogsFeed + CatalogsItemsBatch If the method is called asynchronously, returns the request thread. """ @@ -2267,28 +3664,33 @@ def feeds_get( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['feed_id'] = \ - feed_id - return self.feeds_get_endpoint.call_with_http_info(**kwargs) + kwargs['unknown_base_type'] = \ + unknown_base_type + return self.items_batch_post_endpoint.call_with_http_info(**kwargs) - def feeds_list( + def items_get( self, + country, + language, **kwargs ): - """List feeds # noqa: E501 + """Get catalogs items # noqa: E501 - Fetch feeds owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + Get the items of the catalog owned by the \"operation user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Note: this endpoint is deprecated and will be deleted soon. Please use Get catalogs items (POST) instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.feeds_list(async_req=True) + >>> thread = api.items_get(country, language, async_req=True) >>> result = thread.get() + Args: + country (str): Country for the Catalogs Items + language (str): Language for the Catalogs Items Keyword Args: - bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 ad_account_id (str): Unique identifier of an ad account.. [optional] + item_ids ([str]): This parameter is deprecated. Use filters instead.. [optional] + filters (CatalogsItemsFilters): Identifies items to be retrieved. This is a required parameter.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -2317,7 +3719,7 @@ def feeds_list( async_req (bool): execute request asynchronously Returns: - bool, date, datetime, dict, float, int, list, str, none_type + CatalogsItems If the method is called asynchronously, returns the request thread. """ @@ -2345,28 +3747,34 @@ def feeds_list( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - return self.feeds_list_endpoint.call_with_http_info(**kwargs) + kwargs['country'] = \ + country + kwargs['language'] = \ + language + return self.items_get_endpoint.call_with_http_info(**kwargs) - def feeds_update( + def items_issues_list( self, - feed_id, - catalogs_feeds_update_request, + processing_result_id, **kwargs ): - """Update feed # noqa: E501 + """List item issues # noqa: E501 - Update a feed owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + List item validation issues for a given feed processing result owned by the \"operation user_account\". Up to 20 random samples of affected items are returned for each error and warning code. Please note that for now query parameters 'item_numbers' and 'item_validation_issue' cannot be used simultaneously until it is implemented in some release in the future. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Note: To get a list of all affected items instead of sampled issues, please refer to Build catalogs report and Get catalogs report endpoints. Moreover, they support multiple types of catalogs. Learn more # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.feeds_update(feed_id, catalogs_feeds_update_request, async_req=True) + >>> thread = api.items_issues_list(processing_result_id, async_req=True) >>> result = thread.get() Args: - feed_id (str): Unique identifier of a feed - catalogs_feeds_update_request (CatalogsFeedsUpdateRequest): Request object used to update a feed. + processing_result_id (str): Unique identifier of a feed processing result. It can be acquired from the \"id\" field of the \"items\" array within the response of the [List processing results for a given feed](/docs/api/v5/#operation/feed_processing_results/list). Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + item_numbers ([int]): Item number based on order of appearance in the Catalogs Feed. For example, '0' refers to first item found in a feed that was downloaded from a 'location' specified during feed creation.. [optional] + item_validation_issue (CatalogsItemValidationIssue): Filter item validation issues that have a given type of item validation issue.. [optional] ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -2396,7 +3804,7 @@ def feeds_update( async_req (bool): execute request asynchronously Returns: - CatalogsFeed + bool, date, datetime, dict, float, int, list, str, none_type If the method is called asynchronously, returns the request thread. """ @@ -2424,28 +3832,26 @@ def feeds_update( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['feed_id'] = \ - feed_id - kwargs['catalogs_feeds_update_request'] = \ - catalogs_feeds_update_request - return self.feeds_update_endpoint.call_with_http_info(**kwargs) + kwargs['processing_result_id'] = \ + processing_result_id + return self.items_issues_list_endpoint.call_with_http_info(**kwargs) - def items_batch_get( + def items_post( self, - batch_id, + catalogs_items_request, **kwargs ): - """Get catalogs items batch # noqa: E501 + """Get catalogs items (POST) # noqa: E501 - Get a single catalogs items batch owned by the \"operating user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. # noqa: E501 + Get the items of the catalog owned by the \"operation user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Note: Access to the Creative Assets catalog type is restricted to a specific group of users. If you require access, please reach out to your partner manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.items_batch_get(batch_id, async_req=True) + >>> thread = api.items_post(catalogs_items_request, async_req=True) >>> result = thread.get() Args: - batch_id (str): Id of a catalogs items batch to fetch + catalogs_items_request (CatalogsItemsRequest): Request object used to get catalogs items Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -2477,7 +3883,7 @@ def items_batch_get( async_req (bool): execute request asynchronously Returns: - CatalogsItemsBatch + CatalogsItems If the method is called asynchronously, returns the request thread. """ @@ -2505,29 +3911,32 @@ def items_batch_get( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['batch_id'] = \ - batch_id - return self.items_batch_get_endpoint.call_with_http_info(**kwargs) + kwargs['catalogs_items_request'] = \ + catalogs_items_request + return self.items_post_endpoint.call_with_http_info(**kwargs) - def items_batch_post( + def products_by_product_group_filter_list( self, - catalogs_items_batch_request, + catalogs_list_products_by_filter_request, **kwargs ): - """Operate on item batch # noqa: E501 + """List products by filter # noqa: E501 - This endpoint supports multiple operations on a set of one or more catalog items owned by the \"operation user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. # noqa: E501 + List products Pins owned by the \"operation user_account\" that meet the criteria specified in the Catalogs Product Group Filter given in the request. - This endpoint has been implemented in POST to allow for complex filters. This specific POST endpoint is designed to be idempotent. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Note: This endpoint only supports RETAIL catalog at the moment. Learn more # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.items_batch_post(catalogs_items_batch_request, async_req=True) + >>> thread = api.products_by_product_group_filter_list(catalogs_list_products_by_filter_request, async_req=True) >>> result = thread.get() Args: - catalogs_items_batch_request (CatalogsItemsBatchRequest): Request object used to create catalogs items in a batch + catalogs_list_products_by_filter_request (CatalogsListProductsByFilterRequest): Object holding a group of filters for a catalog product group Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 ad_account_id (str): Unique identifier of an ad account.. [optional] + pin_metrics (bool): Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then.. [optional] if omitted the server will use the default value of False _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -2556,7 +3965,7 @@ def items_batch_post( async_req (bool): execute request asynchronously Returns: - CatalogsItemsBatch + bool, date, datetime, dict, float, int, list, str, none_type If the method is called asynchronously, returns the request thread. """ @@ -2584,30 +3993,26 @@ def items_batch_post( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['catalogs_items_batch_request'] = \ - catalogs_items_batch_request - return self.items_batch_post_endpoint.call_with_http_info(**kwargs) + kwargs['catalogs_list_products_by_filter_request'] = \ + catalogs_list_products_by_filter_request + return self.products_by_product_group_filter_list_endpoint.call_with_http_info(**kwargs) - def items_get( + def reports_create( self, - country, - item_ids, - language, + catalogs_report_parameters, **kwargs ): - """Get catalogs items # noqa: E501 + """Build catalogs report # noqa: E501 - Get the items of the catalog owned by the \"operation user_account\". See detailed documentation here. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. # noqa: E501 + Async request to create a report of the catalog owned by the \"operation user_account\". This endpoint generates a report upon receiving the first approved request of the day. Any following requests with identical parameters will yield the same report even if data has changed. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.items_get(country, item_ids, language, async_req=True) + >>> thread = api.reports_create(catalogs_report_parameters, async_req=True) >>> result = thread.get() Args: - country (str): Country for the Catalogs Items - item_ids ([str]): Catalogs Item ids - language (str): Language for the Catalogs Items + catalogs_report_parameters (CatalogsReportParameters): Request object to asynchronously create a report. Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -2639,7 +4044,7 @@ def items_get( async_req (bool): execute request asynchronously Returns: - CatalogsItems + CatalogsCreateReportResponse If the method is called asynchronously, returns the request thread. """ @@ -2667,36 +4072,28 @@ def items_get( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['country'] = \ - country - kwargs['item_ids'] = \ - item_ids - kwargs['language'] = \ - language - return self.items_get_endpoint.call_with_http_info(**kwargs) + kwargs['catalogs_report_parameters'] = \ + catalogs_report_parameters + return self.reports_create_endpoint.call_with_http_info(**kwargs) - def items_issues_list( + def reports_get( self, - processing_result_id, + token, **kwargs ): - """List item issues for a given processing result # noqa: E501 + """Get catalogs report # noqa: E501 - List item validation issues for a given feed processing result owned by the \"operation user_account\". Please note that for now query parameters 'item_numbers' and 'item_validation_issue' cannot be used simultaneously until it is implemented in some release in the future. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + This returns a URL to a report given a token returned from Build catalogs report. You can use the URL to download the report. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.items_issues_list(processing_result_id, async_req=True) + >>> thread = api.reports_get(token, async_req=True) >>> result = thread.get() Args: - processing_result_id (str): Unique identifier of a feed processing result + token (str): Token returned from async build report call Keyword Args: - bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 - item_numbers ([int]): Item number based on order of appearance in the Catalogs Feed. For example, '0' refers to first item found in a feed that was downloaded from a 'location' specified during feed creation.. [optional] - item_validation_issue (CatalogsItemValidationIssue): Filter item validation issues that have a given type of item validation issue.. [optional] ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -2726,7 +4123,7 @@ def items_issues_list( async_req (bool): execute request asynchronously Returns: - bool, date, datetime, dict, float, int, list, str, none_type + CatalogsReport If the method is called asynchronously, returns the request thread. """ @@ -2754,31 +4151,31 @@ def items_issues_list( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['processing_result_id'] = \ - processing_result_id - return self.items_issues_list_endpoint.call_with_http_info(**kwargs) + kwargs['token'] = \ + token + return self.reports_get_endpoint.call_with_http_info(**kwargs) - def products_by_product_group_filter_list( + def reports_stats( self, - catalogs_list_products_by_filter_request, + parameters, **kwargs ): - """List filtered products # noqa: E501 + """List report stats # noqa: E501 - List products Pins owned by the \"operation user_account\" that meet the criteria specified in the Catalogs Product Group Filter given in the request. - This endpoint has been implemented in POST to allow for complex filters. This specific POST endpoint is designed to be idempotent. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. Learn more # noqa: E501 + List aggregated numbers of issues for a catalog owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: Owner, Admin, Catalogs Manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.products_by_product_group_filter_list(catalogs_list_products_by_filter_request, async_req=True) + >>> thread = api.reports_stats(parameters, async_req=True) >>> result = thread.get() Args: - catalogs_list_products_by_filter_request (CatalogsListProductsByFilterRequest): Object holding a group of filters for a catalog product group + parameters (CatalogsReportParameters): Contains the parameters for report identification. Keyword Args: - bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 ad_account_id (str): Unique identifier of an ad account.. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + bookmark (str): Cursor used to fetch the next page of items. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -2835,7 +4232,7 @@ def products_by_product_group_filter_list( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['catalogs_list_products_by_filter_request'] = \ - catalogs_list_products_by_filter_request - return self.products_by_product_group_filter_list_endpoint.call_with_http_info(**kwargs) + kwargs['parameters'] = \ + parameters + return self.reports_stats_endpoint.call_with_http_info(**kwargs) diff --git a/openapi_generated/pinterest_client/api/conversion_events_api.py b/openapi_generated/pinterest_client/api/conversion_events_api.py index b5eb7fc..f57219b 100644 --- a/openapi_generated/pinterest_client/api/conversion_events_api.py +++ b/openapi_generated/pinterest_client/api/conversion_events_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -24,6 +24,7 @@ ) from openapi_generated.pinterest_client.model.conversion_api_response import ConversionApiResponse from openapi_generated.pinterest_client.model.conversion_events import ConversionEvents +from openapi_generated.pinterest_client.model.detailed_error import DetailedError from openapi_generated.pinterest_client.model.error import Error @@ -116,9 +117,9 @@ def events_create( conversion_events, **kwargs ): - """Send conversion events to the Pinterest API for Conversions # noqa: E501 + """Send conversions # noqa: E501 - The Pinterest API offers advertisers a way to send Pinterest their conversion information (including web conversions, in-app conversions, or even offline conversions) based on their ad_account_id. The request body should be a JSON object. - This endpoint requires an access_token be generated through Ads Manager. Review the Conversions Guide for more details. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Audience, Campaign. (Note that the token can be used across multiple ad accounts under an user ID.) - This endpoint has a rate limit of 5,000 calls per minute per ad account. - If the merchant is submitting this information using both Pinterest conversion tags and the Pinterest API, Pinterest will remove duplicate information before reporting. (Note that events that took place offline cannot be deduplicated.) # noqa: E501 + The Pinterest API offers advertisers a way to send Pinterest their conversion information (including web conversions, in-app conversions, or even offline conversions) based on their ad_account_id. The request body should be a JSON object. - This endpoint requires an access_token be generated through Ads Manager. Review the Conversions Guide for more details. (Note that the authorization header required is Authorization: Bearer <access_token>). - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Audience, Campaign. (Note that the token can be used across multiple ad accounts under an user ID.) - This endpoint has a rate limit of 5,000 calls per minute per ad account. - If the merchant is submitting this information using both Pinterest conversion tags and the Pinterest API, Pinterest will remove duplicate information before reporting. (Note that events that took place offline cannot be deduplicated.) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/openapi_generated/pinterest_client/api/conversion_tags_api.py b/openapi_generated/pinterest_client/api/conversion_tags_api.py index 08a81f0..9ad7e73 100644 --- a/openapi_generated/pinterest_client/api/conversion_tags_api.py +++ b/openapi_generated/pinterest_client/api/conversion_tags_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -22,6 +22,7 @@ none_type, validate_and_convert_types ) +from openapi_generated.pinterest_client.model.conversion_event_response import ConversionEventResponse from openapi_generated.pinterest_client.model.conversion_tag_create import ConversionTagCreate from openapi_generated.pinterest_client.model.conversion_tag_list_response import ConversionTagListResponse from openapi_generated.pinterest_client.model.conversion_tag_response import ConversionTagResponse @@ -392,7 +393,7 @@ def conversion_tags_create( ): """Create conversion tag # noqa: E501 - Create a conversion tag, also known as Pinterest tag, with the option to enable enhanced match.

The Pinterest Tag tracks actions people take on the ad account’ s website after they view the ad account's ad on Pinterest. The advertiser needs to customize this tag to track conversions.

For more information, see:

Set up the Pinterest tag

Pinterest Tag

Enhanced match # noqa: E501 + Create a conversion tag, also known as Pinterest tag, with the option to enable enhanced match.

The Pinterest Tag tracks actions people take on the ad account’ s website after they view the ad account's ad on Pinterest. The advertiser needs to customize this tag to track conversions.

For more information, see:

Set up the Pinterest tag

Pinterest Tag

Enhanced match # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -723,7 +724,7 @@ def page_visit_conversion_tags_get( ad_account_id (str): Unique identifier of an ad account. Keyword Args: - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] _return_http_data_only (bool): response data without head status diff --git a/openapi_generated/pinterest_client/api/customer_lists_api.py b/openapi_generated/pinterest_client/api/customer_lists_api.py index 8b1d020..a1a764a 100644 --- a/openapi_generated/pinterest_client/api/customer_lists_api.py +++ b/openapi_generated/pinterest_client/api/customer_lists_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -348,7 +348,7 @@ def customer_lists_create( ): """Create customer lists # noqa: E501 -

Create a customer list from your records(hashed or plain-text email addresses, or hashed MAIDs or IDFAs).

A customer list is one of the four types of Pinterest audiences: for more information, see Audience targeting or the Audiences section of the ads management guide.

Please review our requirements for what type of information is allowed when uploading a customer list.

When you create a customer list, the system scans the list for existing Pinterest accounts; the list must include at least 100 Pinterest accounts. Your original list will be deleted when the matching process is complete. The filtered list – containing only the Pinterest accounts that were included in your starting list – is what will be used to create the audience.

Note that once you have created your customer list, you must convert it into an audience (of the “ CUSTOMER_LIST” type) using the create audience endpoint before it can be used.

# noqa: E501 +

Create a customer list from your records(hashed or plain-text email addresses, or hashed MAIDs or IDFAs).

A customer list is one of the four types of Pinterest audiences: for more information, see Audience targeting or the Audiences section of the ads management guide.

Please review our requirements for what type of information is allowed when uploading a customer list.

When you create a customer list, the system scans the list for existing Pinterest accounts; the list must include at least 100 Pinterest accounts. Your original list will be deleted when the matching process is complete. The filtered list – containing only the Pinterest accounts that were included in your starting list – is what will be used to create the audience.

Note that once you have created your customer list, you must convert it into an audience (of the “ CUSTOMER_LIST” type) using the create audience endpoint before it can be used.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -511,7 +511,7 @@ def customer_lists_list( ): """Get customer lists # noqa: E501 -

Get a set of customer lists including id and name based on the filters provided.

(Customer lists are a type of audience.) For more information, see Audience targeting or the Audiences section of the ads management guide.

# noqa: E501 +

Get a set of customer lists including id and name based on the filters provided.

(Customer lists are a type of audience.) For more information, see Audience targeting or the Audiences section of the ads management guide.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -522,7 +522,7 @@ def customer_lists_list( ad_account_id (str): Unique identifier of an ad account. Keyword Args: - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] _return_http_data_only (bool): response data without head status @@ -594,7 +594,7 @@ def customer_lists_update( ): """Update customer list # noqa: E501 -

Append or remove records to/from an existing customer list. (A customer list is one of the four types of Pinterest audiences.)

When you add records to an existing customer list, the system scans the additions for existing Pinterest accounts; those are the records that will be added to your “CUSTOMER_LIST” audience. Your original list of records to add will be deleted when the matching process is complete.

For more information, see Audience targeting or the Audiences section of the ads management guide.

# noqa: E501 +

Append or remove records to/from an existing customer list. (A customer list is one of the four types of Pinterest audiences.)

When you add records to an existing customer list, the system scans the additions for existing Pinterest accounts; those are the records that will be added to your “CUSTOMER_LIST” audience. Your original list of records to add will be deleted when the matching process is complete.

For more information, see Audience targeting or the Audiences section of the ads management guide.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/openapi_generated/pinterest_client/api/integrations_api.py b/openapi_generated/pinterest_client/api/integrations_api.py index b417f63..eb06d6e 100644 --- a/openapi_generated/pinterest_client/api/integrations_api.py +++ b/openapi_generated/pinterest_client/api/integrations_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -22,7 +22,10 @@ none_type, validate_and_convert_types ) +from openapi_generated.pinterest_client.model.detailed_error import DetailedError from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.integration_logs_request import IntegrationLogsRequest +from openapi_generated.pinterest_client.model.integration_logs_success_response import IntegrationLogsSuccessResponse from openapi_generated.pinterest_client.model.integration_metadata import IntegrationMetadata from openapi_generated.pinterest_client.model.integration_record import IntegrationRecord from openapi_generated.pinterest_client.model.integration_request import IntegrationRequest @@ -361,6 +364,58 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.integrations_logs_post_endpoint = _Endpoint( + settings={ + 'response_type': (IntegrationLogsSuccessResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/integrations/logs', + 'operation_id': 'integrations_logs_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'integration_logs_request', + ], + 'required': [ + 'integration_logs_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'integration_logs_request': + (IntegrationLogsRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'integration_logs_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) def integrations_commerce_del( self, @@ -369,7 +424,7 @@ def integrations_commerce_del( ): """Delete commerce integration # noqa: E501 - Delete commerce integration metadata for the given external business ID. # noqa: E501 + Delete commerce integration metadata for the given external business ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -447,7 +502,7 @@ def integrations_commerce_get( ): """Get commerce integration # noqa: E501 - Get commerce integration metadata associated with the given external business ID # noqa: E501 + Get commerce integration metadata associated with the given external business ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -525,7 +580,7 @@ def integrations_commerce_patch( ): """Update commerce integration # noqa: E501 - Update commerce integration metadata for the given external business ID # noqa: E501 + Update commerce integration metadata for the given external business ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -603,7 +658,7 @@ def integrations_commerce_post( ): """Create commerce integration # noqa: E501 - Create commerce integration metadata to link an external business ID with a Pinterest merchant & ad account. # noqa: E501 + Create commerce integration metadata to link an external business ID with a Pinterest merchant & ad account. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -678,7 +733,7 @@ def integrations_get_by_id( ): """Get integration metadata # noqa: E501 - Get integration metadata by ID. # noqa: E501 + Get integration metadata by ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -755,7 +810,7 @@ def integrations_get_list( ): """Get integration metadata list # noqa: E501 - Get integration metadata list. # noqa: E501 + Get integration metadata list. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -765,7 +820,7 @@ def integrations_get_list( Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -824,3 +879,81 @@ def integrations_get_list( kwargs['_host_index'] = kwargs.get('_host_index') return self.integrations_get_list_endpoint.call_with_http_info(**kwargs) + def integrations_logs_post( + self, + integration_logs_request, + **kwargs + ): + """Receives batched logs from integration applications. # noqa: E501 + + This endpoint receives batched logs from integration applications on partner platforms. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.integrations_logs_post(integration_logs_request, async_req=True) + >>> result = thread.get() + + Args: + integration_logs_request (IntegrationLogsRequest): Ingest log information from external integration application. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + IntegrationLogsSuccessResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['integration_logs_request'] = \ + integration_logs_request + return self.integrations_logs_post_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/keywords_api.py b/openapi_generated/pinterest_client/api/keywords_api.py index b7f3a65..066efa9 100644 --- a/openapi_generated/pinterest_client/api/keywords_api.py +++ b/openapi_generated/pinterest_client/api/keywords_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -25,6 +25,8 @@ from openapi_generated.pinterest_client.model.age_bucket_list import AgeBucketList from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.gender_list import GenderList +from openapi_generated.pinterest_client.model.keyword import Keyword +from openapi_generated.pinterest_client.model.keyword_list import KeywordList from openapi_generated.pinterest_client.model.keyword_update_body import KeywordUpdateBody from openapi_generated.pinterest_client.model.keywords_metrics_array_response import KeywordsMetricsArrayResponse from openapi_generated.pinterest_client.model.keywords_request import KeywordsRequest @@ -383,6 +385,7 @@ def __init__(self, api_client=None): 'interests', 'genders', 'ages', + 'include_keywords', 'normalize_against_group', 'limit', ], @@ -419,6 +422,8 @@ def __init__(self, api_client=None): (GenderList,), 'ages': (AgeBucketList,), + 'include_keywords': + (KeywordList,), 'normalize_against_group': (bool,), 'limit': @@ -430,6 +435,7 @@ def __init__(self, api_client=None): 'interests': 'interests', 'genders': 'genders', 'ages': 'ages', + 'include_keywords': 'include_keywords', 'normalize_against_group': 'normalize_against_group', 'limit': 'limit', }, @@ -439,6 +445,7 @@ def __init__(self, api_client=None): 'interests': 'query', 'genders': 'query', 'ages': 'query', + 'include_keywords': 'query', 'normalize_against_group': 'query', 'limit': 'query', }, @@ -548,7 +555,7 @@ def keywords_create( ): """Create keywords # noqa: E501 -

Create keywords for following entity types(advertiser, campaign, ad group or ad).

For more information, see Keyword targeting.

Notes:

For more information on match types, see match type enums.

Returns:

Rate limit: WRITE.

# noqa: E501 +

Create keywords for following entity types(advertiser, campaign, ad group or ad).

For more information, see Keyword targeting.

Notes:

For more information on match types, see match type enums.

Returns:

Rate limit: WRITE.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -629,7 +636,7 @@ def keywords_get( ): """Get keywords # noqa: E501 -

Get a list of keywords based on the filters provided. If no filter is provided, it will default to the ad_account_id filter, which means it will only return keywords that specifically have parent_id set to the ad_account_id. Note: Keywords can have ad_account_ids, campaign_ids, and ad_group_ids set as their parent_ids. Keywords created through Ads Manager will have their parent_id set to an ad_group_id, not ad_account_id.

For more information, see Keyword targeting.

Notes:

For more information on match types, see match type enums.

Returns:

# noqa: E501 +

Get a list of keywords based on the filters provided. If no filter is provided, it will default to the ad_account_id filter, which means it will only return keywords that specifically have parent_id set to the ad_account_id. Note: Keywords can have ad_account_ids, campaign_ids, and ad_group_ids set as their parent_ids. Keywords created through Ads Manager will have their parent_id set to an ad_group_id, not ad_account_id.

For more information, see Keyword targeting.

Notes:

For more information on match types, see match type enums.

Returns:

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -642,8 +649,8 @@ def keywords_get( Keyword Args: campaign_id (str): Campaign Id to use to filter the results.. [optional] ad_group_id (str): Ad group Id.. [optional] - match_types ([MatchType]): Keyword match type. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + match_types ([MatchType]): Keyword match type. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 bookmark (str): Cursor used to fetch the next page of items. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -795,7 +802,7 @@ def trending_keywords_list( ): """List trending keywords # noqa: E501 -

Get the top trending search keywords among the Pinterest user audience. This is an alpha endpoint only available to select participants.

Trending keywords can be used to inform ad targeting, budget strategy, and creative decisions about which products and Pins will resonate with your audience.

Geographic, demographic and interest-based filters are available to narrow down to the top trends among a specific audience. Multiple trend types are supported that can be used to identify newly-popular, evergreen or seasonal keywords.

For an interactive way to explore this data, please visit trends.pinterest.com. # noqa: E501 +

Get the top trending search keywords among the Pinterest user audience.

Trending keywords can be used to inform ad targeting, budget strategy, and creative decisions about which products and Pins will resonate with your audience.

Geographic, demographic and interest-based filters are available to narrow down to the top trends among a specific audience. Multiple trend types are supported that can be used to identify newly-popular, evergreen or seasonal keywords.

For an interactive way to explore this data, please visit trends.pinterest.com. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -810,6 +817,7 @@ def trending_keywords_list( interests (L1InterestList): If set, filters the results to trends associated with the specified interests.
If unset, trends for all interests will be returned.
The list of supported interests is: - `animals` - Animals - `architecture` - Architecture - `art` - Art - `beauty` - Beauty - `childrens_fashion` - Children's Fashion - `design` - Design - `diy_and_crafts` - DIY & Crafts - `education` - Education - `electronics` - Electronics - `entertainment` - Entertainment - `event_planning` - Event Planning - `finance` - Finance - `food_and_drinks` - Food & Drink - `gardening` - Gardening - `health` - Health - `home_decor` - Home Decor - `mens_fashion` - Men's Fashion - `parenting` - Parenting - `quotes` - Quotes - `sport` - Sports - `travel` - Travel - `vehicles` - Vehicles - `wedding` - Wedding - `womens_fashion` - Women's Fashion. [optional] genders (GenderList): If set, filters the results to trends among users who identify with the specified gender(s).
If unset, trends among all genders will be returned.
The `unknown` group includes users with unspecified or customized gender profile settings.. [optional] ages (AgeBucketList): If set, filters the results to trends among users in the specified age range(s).
If unset, trends among all age groups will be returned.. [optional] + include_keywords (KeywordList): If set, filters the results to top trends which include at least one of the specified keywords.
If unset, no keyword filtering logic is applied.. [optional] normalize_against_group (bool): Governs how the resulting time series data will be normalized to a [0-100] scale.
By default (`false`), the data will be normalized independently for each keyword. The peak search volume observation in *each* keyword's time series will be represented by the value 100. This is ideal for analyzing when an individual keyword is expected to peak in interest.
If set to `true`, the data will be normalized as a group. The peak search volume observation across *all* keywords in the response will be represented by the value 100, and all other values scaled accordingly. Use this option when you wish to compare relative search volume between multiple keywords.. [optional] if omitted the server will use the default value of False limit (int): The maximum number of trending keywords that will be returned. Keywords are returned in trend-ranked order, so a `limit` of 50 will return the top 50 trends.. [optional] if omitted the server will use the default value of 50 _return_http_data_only (bool): response data without head status diff --git a/openapi_generated/pinterest_client/api/lead_ads_api.py b/openapi_generated/pinterest_client/api/lead_ads_api.py new file mode 100644 index 0000000..5f9f19e --- /dev/null +++ b/openapi_generated/pinterest_client/api/lead_ads_api.py @@ -0,0 +1,650 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.api_client import ApiClient, Endpoint as _Endpoint +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from openapi_generated.pinterest_client.model.ad_account_create_subscription_request import AdAccountCreateSubscriptionRequest +from openapi_generated.pinterest_client.model.ad_account_create_subscription_response import AdAccountCreateSubscriptionResponse +from openapi_generated.pinterest_client.model.ad_account_get_subscription_response import AdAccountGetSubscriptionResponse +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated + + +class LeadAdsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.ad_accounts_subscriptions_del_by_id_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/leads/subscriptions/{subscription_id}', + 'operation_id': 'ad_accounts_subscriptions_del_by_id', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'subscription_id', + ], + 'required': [ + 'ad_account_id', + 'subscription_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'subscription_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('subscription_id',): { + + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'subscription_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'subscription_id': 'subscription_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'subscription_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.ad_accounts_subscriptions_get_by_id_endpoint = _Endpoint( + settings={ + 'response_type': (AdAccountGetSubscriptionResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/leads/subscriptions/{subscription_id}', + 'operation_id': 'ad_accounts_subscriptions_get_by_id', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'subscription_id', + ], + 'required': [ + 'ad_account_id', + 'subscription_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'subscription_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('subscription_id',): { + + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'subscription_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'subscription_id': 'subscription_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'subscription_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.ad_accounts_subscriptions_get_list_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/leads/subscriptions', + 'operation_id': 'ad_accounts_subscriptions_get_list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'page_size', + 'bookmark', + ], + 'required': [ + 'ad_account_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'page_size': + (int,), + 'bookmark': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'page_size': 'page_size', + 'bookmark': 'bookmark', + }, + 'location_map': { + 'ad_account_id': 'path', + 'page_size': 'query', + 'bookmark': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.ad_accounts_subscriptions_post_endpoint = _Endpoint( + settings={ + 'response_type': (AdAccountCreateSubscriptionResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/leads/subscriptions', + 'operation_id': 'ad_accounts_subscriptions_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'ad_account_create_subscription_request', + ], + 'required': [ + 'ad_account_id', + 'ad_account_create_subscription_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'ad_account_create_subscription_request': + (AdAccountCreateSubscriptionRequest,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'ad_account_create_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def ad_accounts_subscriptions_del_by_id( + self, + ad_account_id, + subscription_id, + **kwargs + ): + """Delete lead ads subscription # noqa: E501 + + Delete an existing lead ads webhook subscription by ID. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. This endpoint is currently in beta and not available to all apps. Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ad_accounts_subscriptions_del_by_id(ad_account_id, subscription_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + subscription_id (str): Unique identifier of a subscription. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['subscription_id'] = \ + subscription_id + return self.ad_accounts_subscriptions_del_by_id_endpoint.call_with_http_info(**kwargs) + + def ad_accounts_subscriptions_get_by_id( + self, + ad_account_id, + subscription_id, + **kwargs + ): + """Get lead ads subscription # noqa: E501 + + Get a specific lead ads subscription record. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. This endpoint is currently in beta and not available to all apps. Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ad_accounts_subscriptions_get_by_id(ad_account_id, subscription_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + subscription_id (str): Unique identifier of a subscription. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AdAccountGetSubscriptionResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['subscription_id'] = \ + subscription_id + return self.ad_accounts_subscriptions_get_by_id_endpoint.call_with_http_info(**kwargs) + + def ad_accounts_subscriptions_get_list( + self, + ad_account_id, + **kwargs + ): + """Get lead ads subscriptions # noqa: E501 + + Get the advertiser's list of lead ads subscriptions. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. This endpoint is currently in beta and not available to all apps. Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ad_accounts_subscriptions_get_list(ad_account_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + + Keyword Args: + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + bookmark (str): Cursor used to fetch the next page of items. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + return self.ad_accounts_subscriptions_get_list_endpoint.call_with_http_info(**kwargs) + + def ad_accounts_subscriptions_post( + self, + ad_account_id, + ad_account_create_subscription_request, + **kwargs + ): + """Create lead ads subscription # noqa: E501 + + Create a lead ads webhook subscription. Subscriptions allow Pinterest to deliver lead data from Ads Manager directly to the subscriber. Subscriptions can exist for a specific lead form or at ad account level. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. - Advertisers can set up multiple integrations using ad_account_id + lead_form_id but only one integration per unique records. - For data security, egress lead data is encrypted with AES-256-GCM. This endpoint is currently in beta and not available to all apps. Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ad_accounts_subscriptions_post(ad_account_id, ad_account_create_subscription_request, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + ad_account_create_subscription_request (AdAccountCreateSubscriptionRequest): Subscription to create. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AdAccountCreateSubscriptionResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['ad_account_create_subscription_request'] = \ + ad_account_create_subscription_request + return self.ad_accounts_subscriptions_post_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/lead_forms_api.py b/openapi_generated/pinterest_client/api/lead_forms_api.py index 60ff5e4..9c493a5 100644 --- a/openapi_generated/pinterest_client/api/lead_forms_api.py +++ b/openapi_generated/pinterest_client/api/lead_forms_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -23,7 +23,12 @@ validate_and_convert_types ) from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.lead_form_array_response import LeadFormArrayResponse +from openapi_generated.pinterest_client.model.lead_form_create_request import LeadFormCreateRequest from openapi_generated.pinterest_client.model.lead_form_response import LeadFormResponse +from openapi_generated.pinterest_client.model.lead_form_test_request import LeadFormTestRequest +from openapi_generated.pinterest_client.model.lead_form_test_response import LeadFormTestResponse +from openapi_generated.pinterest_client.model.lead_form_update_request import LeadFormUpdateRequest from openapi_generated.pinterest_client.model.paginated import Paginated @@ -109,6 +114,155 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.lead_form_test_create_endpoint = _Endpoint( + settings={ + 'response_type': (LeadFormTestResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/lead_forms/{lead_form_id}/test', + 'operation_id': 'lead_form_test_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'lead_form_id', + 'lead_form_test_request', + ], + 'required': [ + 'ad_account_id', + 'lead_form_id', + 'lead_form_test_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'lead_form_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('lead_form_id',): { + + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'lead_form_id': + (str,), + 'lead_form_test_request': + (LeadFormTestRequest,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'lead_form_id': 'lead_form_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'lead_form_id': 'path', + 'lead_form_test_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.lead_forms_create_endpoint = _Endpoint( + settings={ + 'response_type': (LeadFormArrayResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/lead_forms', + 'operation_id': 'lead_forms_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'lead_form_create_request', + ], + 'required': [ + 'ad_account_id', + 'lead_form_create_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'lead_form_create_request', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('lead_form_create_request',): { + + 'max_items': 30, + 'min_items': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'lead_form_create_request': + ([LeadFormCreateRequest],), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'lead_form_create_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) self.lead_forms_list_endpoint = _Endpoint( settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), @@ -194,6 +348,77 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.lead_forms_update_endpoint = _Endpoint( + settings={ + 'response_type': (LeadFormArrayResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/lead_forms', + 'operation_id': 'lead_forms_update', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'lead_form_update_request', + ], + 'required': [ + 'ad_account_id', + 'lead_form_update_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'lead_form_update_request', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('lead_form_update_request',): { + + 'max_items': 30, + 'min_items': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'lead_form_update_request': + ([LeadFormUpdateRequest],), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'lead_form_update_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) def lead_form_get( self, @@ -203,7 +428,7 @@ def lead_form_get( ): """Get lead form by id # noqa: E501 - Gets a lead form given it's ID. It must also be associated with the provided ad account ID. Retrieving an advertiser's lead form will only contain results if you're a part of the Lead ads beta. If you're interested in joining the beta, please reach out to your Pinterest account manager. # noqa: E501 + This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. Gets a lead form given it's ID. It must also be associated with the provided ad account ID. For more, see Lead ads. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -277,14 +502,182 @@ def lead_form_get( lead_form_id return self.lead_form_get_endpoint.call_with_http_info(**kwargs) + def lead_form_test_create( + self, + ad_account_id, + lead_form_id, + lead_form_test_request, + **kwargs + ): + """Create lead form test data # noqa: E501 + + Create lead form test data based on the list of answers provided as part of the body. - List of answers should follow the questions creation order. This endpoint is currently in beta and not available to all apps. Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.lead_form_test_create(ad_account_id, lead_form_id, lead_form_test_request, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + lead_form_id (str): Unique identifier of a lead form. + lead_form_test_request (LeadFormTestRequest): Subscription to create. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + LeadFormTestResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['lead_form_id'] = \ + lead_form_id + kwargs['lead_form_test_request'] = \ + lead_form_test_request + return self.lead_form_test_create_endpoint.call_with_http_info(**kwargs) + + def lead_forms_create( + self, + ad_account_id, + lead_form_create_request, + **kwargs + ): + """Create lead forms # noqa: E501 + + This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. Create lead forms. Lead forms are used in lead ads and allow you to control what text appears on the lead form’ s description, questions and confirmation sections. For more, see Lead ads. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.lead_forms_create(ad_account_id, lead_form_create_request, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + lead_form_create_request ([LeadFormCreateRequest]): List of lead forms to create, size limit [1, 30]. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + LeadFormArrayResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['lead_form_create_request'] = \ + lead_form_create_request + return self.lead_forms_create_endpoint.call_with_http_info(**kwargs) + def lead_forms_list( self, ad_account_id, **kwargs ): - """Get lead forms # noqa: E501 + """List lead forms # noqa: E501 - Gets all Lead Forms associated with an ad account ID. Retrieving an advertiser's list of lead forms will only contain results if you're a part of the Lead ads beta. If you're interested in joining the beta, please reach out to your Pinterest account manager. # noqa: E501 + This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. List lead forms associated with an ad account ID. For more, see Lead ads. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -295,7 +688,7 @@ def lead_forms_list( ad_account_id (str): Unique identifier of an ad account. Keyword Args: - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] _return_http_data_only (bool): response data without head status @@ -358,3 +751,85 @@ def lead_forms_list( ad_account_id return self.lead_forms_list_endpoint.call_with_http_info(**kwargs) + def lead_forms_update( + self, + ad_account_id, + lead_form_update_request, + **kwargs + ): + """Update lead forms # noqa: E501 + + This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. Update lead forms. Lead ads help you reach people who are actively looking for, and interested in, your goods and services. The lead form can be associated with an ad to allow people to fill out the form. For more, see Lead ads. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.lead_forms_update(ad_account_id, lead_form_update_request, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + lead_form_update_request ([LeadFormUpdateRequest]): List of lead forms to update, size limit [1, 30]. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + LeadFormArrayResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['lead_form_update_request'] = \ + lead_form_update_request + return self.lead_forms_update_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/leads_export_api.py b/openapi_generated/pinterest_client/api/leads_export_api.py new file mode 100644 index 0000000..18e90c5 --- /dev/null +++ b/openapi_generated/pinterest_client/api/leads_export_api.py @@ -0,0 +1,342 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.api_client import ApiClient, Endpoint as _Endpoint +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.leads_export_create_request import LeadsExportCreateRequest +from openapi_generated.pinterest_client.model.leads_export_create_response import LeadsExportCreateResponse +from openapi_generated.pinterest_client.model.leads_export_response_data import LeadsExportResponseData + + +class LeadsExportApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.leads_export_create_endpoint = _Endpoint( + settings={ + 'response_type': (LeadsExportCreateResponse,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/leads_export', + 'operation_id': 'leads_export_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'leads_export_create_request', + ], + 'required': [ + 'ad_account_id', + 'leads_export_create_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'leads_export_create_request': + (LeadsExportCreateRequest,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'leads_export_create_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.leads_export_get_endpoint = _Endpoint( + settings={ + 'response_type': (LeadsExportResponseData,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/leads_export/{leads_export_id}', + 'operation_id': 'leads_export_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'leads_export_id', + ], + 'required': [ + 'ad_account_id', + 'leads_export_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + 'leads_export_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('leads_export_id',): { + + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'leads_export_id': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'leads_export_id': 'leads_export_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'leads_export_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def leads_export_create( + self, + ad_account_id, + leads_export_create_request, + **kwargs + ): + """Create a request to export leads collected from a lead ad # noqa: E501 + + This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. Create an export of leads collected from a lead ad. This returns a lead_export_id token that you can use to download the export when it is ready. Note: Lead ad data will be available up to 30 days after the lead has been submitted. For more, see Lead ads. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.leads_export_create(ad_account_id, leads_export_create_request, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + leads_export_create_request (LeadsExportCreateRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + LeadsExportCreateResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['leads_export_create_request'] = \ + leads_export_create_request + return self.leads_export_create_endpoint.call_with_http_info(**kwargs) + + def leads_export_get( + self, + ad_account_id, + leads_export_id, + **kwargs + ): + """Get the lead export from the lead export create call # noqa: E501 + + This feature is currently in beta and not available to all apps, if you're interested in joining the beta, please reach out to your Pinterest account manager. Get the export of leads collected from a lead ad. This returns a URL to a list of lead export given a lead_export_id token returned from the create a lead export call. You can use the URL to download the report. Note: Lead ad data will be available up to 30 days after the lead has been submitted. For more, see Lead ads. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.leads_export_get(ad_account_id, leads_export_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + leads_export_id (str): lead_export_id token returned from the create a lead export endpoint + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + LeadsExportResponseData + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['leads_export_id'] = \ + leads_export_id + return self.leads_export_get_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/media_api.py b/openapi_generated/pinterest_client/api/media_api.py index 7856bf0..6391ffb 100644 --- a/openapi_generated/pinterest_client/api/media_api.py +++ b/openapi_generated/pinterest_client/api/media_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -218,7 +218,7 @@ def media_create( ): """Register media upload # noqa: E501 - Register your intent to upload media The response includes all of the information needed to upload the media to Pinterest. To upload the media, make an HTTP POST request (using curl, for example) to upload_url using the Content-Type header value. Send the media file's contents as the request's file parameter and also include all of the parameters from upload_parameters. Learn more about video Pin creation. # noqa: E501 + Register your intent to upload media The response includes all of the information needed to upload the media to Pinterest. To upload the media, make an HTTP POST request (using curl, for example) to upload_url using the Content-Type header value. Send the media file's contents as the request's file parameter and also include all of the parameters from upload_parameters. Learn more about video Pin creation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -296,7 +296,7 @@ def media_get( ): """Get media upload details # noqa: E501 - Get details for a registered media upload, including its current status. Learn more about video Pin creation. # noqa: E501 + Get details for a registered media upload, including its current status. Learn more about video Pin creation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -373,7 +373,7 @@ def media_list( ): """List media uploads # noqa: E501 - List media uploads filtered by given parameters. Learn more about video Pin creation. # noqa: E501 + List media uploads filtered by given parameters. Learn more about video Pin creation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -383,7 +383,7 @@ def media_list( Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object diff --git a/openapi_generated/pinterest_client/api/oauth_api.py b/openapi_generated/pinterest_client/api/oauth_api.py index bf919b6..b2bbfd1 100644 --- a/openapi_generated/pinterest_client/api/oauth_api.py +++ b/openapi_generated/pinterest_client/api/oauth_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -70,7 +70,8 @@ def __init__(self, api_client=None): ('grant_type',): { "AUTHORIZATION_CODE": "authorization_code", - "REFRESH_TOKEN": "refresh_token" + "REFRESH_TOKEN": "refresh_token", + "CLIENT_CREDENTIALS": "client_credentials" }, }, 'openapi_types': { @@ -104,7 +105,7 @@ def oauth_token( ): """Generate OAuth access token # noqa: E501 - Generate an OAuth access token by using an authorization code or a refresh token. IMPORTANT: You need to start the OAuth flow via www.pinterest.com/oauth before calling this endpoint (or have an existing refresh token). See Authentication for more. # noqa: E501 + Generate an OAuth access token by using an authorization code or a refresh token. IMPORTANT: You need to start the OAuth flow via www.pinterest.com/oauth before calling this endpoint (or have an existing refresh token). See Authentication for more. Parameter refresh_on and its corresponding response type everlasting_refresh are now available to all apps! Later this year, continuous refresh will become the default behavior (ie you will no longer need to send this parameter). Learn more. Grant type client_credentials and its corresponding response type are not fully available. You will likely get a default error if you attempt to use this grant_type. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/openapi_generated/pinterest_client/api/order_lines_api.py b/openapi_generated/pinterest_client/api/order_lines_api.py index eb26ff4..91ca871 100644 --- a/openapi_generated/pinterest_client/api/order_lines_api.py +++ b/openapi_generated/pinterest_client/api/order_lines_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -295,7 +295,7 @@ def order_lines_list( ad_account_id (str): Unique identifier of an ad account. Keyword Args: - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] _return_http_data_only (bool): response data without head status diff --git a/openapi_generated/pinterest_client/api/pins_api.py b/openapi_generated/pinterest_client/api/pins_api.py index 5f959a1..68fece5 100644 --- a/openapi_generated/pinterest_client/api/pins_api.py +++ b/openapi_generated/pinterest_client/api/pins_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -22,8 +22,9 @@ none_type, validate_and_convert_types ) +from openapi_generated.pinterest_client.model.bulk_pin_analytics_response import BulkPinAnalyticsResponse from openapi_generated.pinterest_client.model.error import Error -from openapi_generated.pinterest_client.model.inline_object import InlineObject +from openapi_generated.pinterest_client.model.inline_object1 import InlineObject1 from openapi_generated.pinterest_client.model.paginated import Paginated from openapi_generated.pinterest_client.model.pin import Pin from openapi_generated.pinterest_client.model.pin_analytics_response import PinAnalyticsResponse @@ -42,10 +43,114 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client + self.multi_pins_analytics_endpoint = _Endpoint( + settings={ + 'response_type': (BulkPinAnalyticsResponse,), + 'auth': [ + 'client_credentials', + 'pinterest_oauth2' + ], + 'endpoint_path': '/pins/analytics', + 'operation_id': 'multi_pins_analytics', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'pin_ids', + 'start_date', + 'end_date', + 'metric_types', + 'app_types', + 'ad_account_id', + ], + 'required': [ + 'pin_ids', + 'start_date', + 'end_date', + 'metric_types', + ], + 'nullable': [ + ], + 'enum': [ + 'app_types', + ], + 'validation': [ + 'pin_ids', + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('pin_ids',): { + + 'max_items': 100, + 'min_items': 1, + }, + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('app_types',): { + + "ALL": "ALL", + "MOBILE": "MOBILE", + "TABLET": "TABLET", + "WEB": "WEB" + }, + }, + 'openapi_types': { + 'pin_ids': + ([str],), + 'start_date': + (date,), + 'end_date': + (date,), + 'metric_types': + ([bool, date, datetime, dict, float, int, list, str, none_type],), + 'app_types': + (str,), + 'ad_account_id': + (str,), + }, + 'attribute_map': { + 'pin_ids': 'pin_ids', + 'start_date': 'start_date', + 'end_date': 'end_date', + 'metric_types': 'metric_types', + 'app_types': 'app_types', + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'pin_ids': 'query', + 'start_date': 'query', + 'end_date': 'query', + 'metric_types': 'query', + 'app_types': 'query', + 'ad_account_id': 'query', + }, + 'collection_format_map': { + 'pin_ids': 'multi', + 'metric_types': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.pins_analytics_endpoint = _Endpoint( settings={ 'response_type': (PinAnalyticsResponse,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/pins/{pin_id}/analytics', @@ -280,6 +385,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (Pin,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/pins/{pin_id}', @@ -290,6 +396,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'pin_id', + 'pin_metrics', 'ad_account_id', ], 'required': [ @@ -317,15 +424,19 @@ def __init__(self, api_client=None): 'openapi_types': { 'pin_id': (str,), + 'pin_metrics': + (bool,), 'ad_account_id': (str,), }, 'attribute_map': { 'pin_id': 'pin_id', + 'pin_metrics': 'pin_metrics', 'ad_account_id': 'ad_account_id', }, 'location_map': { 'pin_id': 'path', + 'pin_metrics': 'query', 'ad_account_id': 'query', }, 'collection_format_map': { @@ -343,6 +454,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/pins', @@ -353,11 +465,13 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'bookmark', + 'page_size', 'pin_filter', 'include_protected_pins', 'pin_type', 'creative_types', 'ad_account_id', + 'pin_metrics', ], 'required': [], 'nullable': [ @@ -368,11 +482,17 @@ def __init__(self, api_client=None): 'creative_types', ], 'validation': [ + 'page_size', 'ad_account_id', ] }, root_map={ 'validations': { + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, ('ad_account_id',): { 'max_length': 18, 'regex': { @@ -406,6 +526,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'bookmark': (str,), + 'page_size': + (int,), 'pin_filter': (str,), 'include_protected_pins': @@ -416,22 +538,28 @@ def __init__(self, api_client=None): ([str],), 'ad_account_id': (str,), + 'pin_metrics': + (bool,), }, 'attribute_map': { 'bookmark': 'bookmark', + 'page_size': 'page_size', 'pin_filter': 'pin_filter', 'include_protected_pins': 'include_protected_pins', 'pin_type': 'pin_type', 'creative_types': 'creative_types', 'ad_account_id': 'ad_account_id', + 'pin_metrics': 'pin_metrics', }, 'location_map': { 'bookmark': 'query', + 'page_size': 'query', 'pin_filter': 'query', 'include_protected_pins': 'query', 'pin_type': 'query', 'creative_types': 'query', 'ad_account_id': 'query', + 'pin_metrics': 'query', }, 'collection_format_map': { 'creative_types': 'multi', @@ -459,12 +587,12 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'pin_id', - 'inline_object', + 'inline_object1', 'ad_account_id', ], 'required': [ 'pin_id', - 'inline_object', + 'inline_object1', ], 'nullable': [ ], @@ -488,8 +616,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'pin_id': (str,), - 'inline_object': - (InlineObject,), + 'inline_object1': + (InlineObject1,), 'ad_account_id': (str,), }, @@ -499,7 +627,7 @@ def __init__(self, api_client=None): }, 'location_map': { 'pin_id': 'path', - 'inline_object': 'body', + 'inline_object1': 'body', 'ad_account_id': 'query', }, 'collection_format_map': { @@ -587,6 +715,98 @@ def __init__(self, api_client=None): api_client=api_client ) + def multi_pins_analytics( + self, + pin_ids, + start_date, + end_date, + metric_types, + **kwargs + ): + """Get multiple Pin analytics # noqa: E501 + + This endpoint is currently in beta and not available to all apps. Learn more. Get analytics for multiple pins owned by the \"operation user_account\" - or on a group board that has been shared with this account. - The maximum number of pins supported in a single request is 100. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: - For Pins on public or protected boards: Admin, Analyst. - For Pins on secret boards: Admin. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.multi_pins_analytics(pin_ids, start_date, end_date, metric_types, async_req=True) + >>> result = thread.get() + + Args: + pin_ids ([str]): List of Pin IDs. + start_date (date): Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. + end_date (date): Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. + metric_types ([bool, date, datetime, dict, float, int, list, str, none_type]): Pin metric types to get data for. + + Keyword Args: + app_types (str): Apps or devices to get data for, default is all.. [optional] if omitted the server will use the default value of "ALL" + ad_account_id (str): Unique identifier of an ad account.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + BulkPinAnalyticsResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['pin_ids'] = \ + pin_ids + kwargs['start_date'] = \ + start_date + kwargs['end_date'] = \ + end_date + kwargs['metric_types'] = \ + metric_types + return self.multi_pins_analytics_endpoint.call_with_http_info(**kwargs) + def pins_analytics( self, pin_id, @@ -597,7 +817,7 @@ def pins_analytics( ): """Get Pin analytics # noqa: E501 - Get analytics for a Pin owned by the \"operation user_account\" - or on a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: - For Pins on public or protected boards: Admin, Analyst. - For Pins on secret boards: Admin. # noqa: E501 + Get analytics for a Pin owned by the \"operation user_account\" - or on a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: - For Pins on public or protected boards: Admin, Analyst. - For Pins on secret boards: Admin. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -608,7 +828,7 @@ def pins_analytics( pin_id (str): Unique identifier of a Pin. start_date (date): Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. end_date (date): Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. - metric_types ([bool, date, datetime, dict, float, int, list, str, none_type]): Pin metric types to get data for, default is all. + metric_types ([bool, date, datetime, dict, float, int, list, str, none_type]): Pin metric types to get data for. VIDEO_MRC_VIEW are Video views, VIDEO_V50_WATCH_TIME is Total play time. If Pin was created before 2023-03-20, Profile visits and Follows will only be available for Idea Pins. These metrics are available for all Pin formats since then. Keep in mind this cannot have ALL if split_field is set to any value other than NO_SPLIT. Keyword Args: app_types (str): Apps or devices to get data for, default is all.. [optional] if omitted the server will use the default value of "ALL" @@ -687,7 +907,7 @@ def pins_create( ): """Create Pin # noqa: E501 - Create a Pin on a board or board section owned by the \"operation user_account\". Note: If the current \"operation user_account\" (defined by the access token) has access to another user's Ad Accounts via Pinterest Business Access, you can modify your request to make use of the current operation_user_account's permissions to those Ad Accounts by including the ad_account_id in the path parameters for the request (e.g. .../?ad_account_id=12345&...). - This function is intended solely for publishing new content created by the user. If you are interested in saving content created by others to your Pinterest boards, sometimes called 'curated content', please use our Save button instead. For more tips on creating fresh content for Pinterest, review our Content App Solutions Guide. Learn more about video Pin creation. # noqa: E501 + Create a Pin on a board or board section owned by the \"operation user_account\". Note: If the current \"operation user_account\" (defined by the access token) has access to another user's Ad Accounts via Pinterest Business Access, you can modify your request to make use of the current operation_user_account's permissions to those Ad Accounts by including the ad_account_id in the path parameters for the request (e.g. .../?ad_account_id=12345&...). - This function is intended solely for publishing new content created by the user. If you are interested in saving content created by others to your Pinterest boards, sometimes called 'curated content', please use our Save button instead. For more tips on creating fresh content for Pinterest, review our Content App Solutions Guide. Learn more about video Pin creation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -856,6 +1076,7 @@ def pins_get( pin_id (str): Unique identifier of a Pin. Keyword Args: + pin_metrics (bool): Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then.. [optional] if omitted the server will use the default value of False ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -923,7 +1144,7 @@ def pins_list( ): """List Pins # noqa: E501 - Get a list of the Pins owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. - All Pins owned by the \"operation user_account\" are included, regardless of who owns the board they are on. Optional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". # noqa: E501 + Get a list of the Pins owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. - All Pins owned by the \"operation user_account\" are included, regardless of who owns the board they are on. Optional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". Disclaimer: there are known performance issues when filtering by field creative_type and including protected pins. If your request is timing out in this scenario we encourage you to use GET List Pins on Board. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -933,11 +1154,13 @@ def pins_list( Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 pin_filter (str): Pin filter.. [optional] include_protected_pins (bool): Specify if return pins from protected boards. [optional] if omitted the server will use the default value of False pin_type (str): The type of pins to return, currently only enabled for private pins. [optional] if omitted the server will use the default value of "PRIVATE" creative_types ([str]): Pin creative types filter.

Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.. [optional] ad_account_id (str): Unique identifier of an ad account.. [optional] + pin_metrics (bool): Specify whether to return 90d and lifetime Pin metrics. Total comments and total reactions are only available with lifetime Pin metrics. If Pin was created before 2023-03-20 lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then.. [optional] if omitted the server will use the default value of False _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -999,7 +1222,7 @@ def pins_list( def pins_save( self, pin_id, - inline_object, + inline_object1, **kwargs ): """Save Pin # noqa: E501 @@ -1008,12 +1231,12 @@ def pins_save( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.pins_save(pin_id, inline_object, async_req=True) + >>> thread = api.pins_save(pin_id, inline_object1, async_req=True) >>> result = thread.get() Args: pin_id (str): Unique identifier of a Pin. - inline_object (InlineObject): + inline_object1 (InlineObject1): Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -1075,8 +1298,8 @@ def pins_save( kwargs['_host_index'] = kwargs.get('_host_index') kwargs['pin_id'] = \ pin_id - kwargs['inline_object'] = \ - inline_object + kwargs['inline_object1'] = \ + inline_object1 return self.pins_save_endpoint.call_with_http_info(**kwargs) def pins_update( @@ -1087,7 +1310,7 @@ def pins_update( ): """Update Pin # noqa: E501 - Update a pin owned by the \"operating user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: - For Pins on public or protected boards: Owner, Admin, Analyst, Campaign Manager. - For Pins on secret boards: Owner, Admin. This endpoint is currently in beta and not available to all apps. Learn more. # noqa: E501 + Update a pin owned by the \"operating user_account\". - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an ad_account_id (obtained via List ad accounts) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following Business Access roles on the ad_account: - For Pins on public or protected boards: Owner, Admin, Analyst, Campaign Manager. - For Pins on secret boards: Owner, Admin. This endpoint is currently in beta and not available to all apps. Learn more. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/openapi_generated/pinterest_client/api/product_group_promotions_api.py b/openapi_generated/pinterest_client/api/product_group_promotions_api.py index 301b398..1546ae7 100644 --- a/openapi_generated/pinterest_client/api/product_group_promotions_api.py +++ b/openapi_generated/pinterest_client/api/product_group_promotions_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -28,6 +28,7 @@ from openapi_generated.pinterest_client.model.product_group_analytics_response import ProductGroupAnalyticsResponse from openapi_generated.pinterest_client.model.product_group_promotion_create_request import ProductGroupPromotionCreateRequest from openapi_generated.pinterest_client.model.product_group_promotion_response import ProductGroupPromotionResponse +from openapi_generated.pinterest_client.model.product_group_promotion_response_item import ProductGroupPromotionResponseItem from openapi_generated.pinterest_client.model.product_group_promotion_update_request import ProductGroupPromotionUpdateRequest @@ -245,7 +246,9 @@ def __init__(self, api_client=None): "ACTIVE": "ACTIVE", "PAUSED": "PAUSED", - "ARCHIVED": "ARCHIVED" + "ARCHIVED": "ARCHIVED", + "DRAFT": "DRAFT", + "DELETED_DRAFT": "DELETED_DRAFT" }, ('order',): { @@ -474,6 +477,7 @@ def __init__(self, api_client=None): "TOTAL_IMPRESSION": "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY", + "COST_PER_OUTBOUND_CLICK_IN_DOLLAR": "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD", @@ -509,6 +513,7 @@ def __init__(self, api_client=None): "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS", "CHECKOUT_ROAS": "CHECKOUT_ROAS", "CUSTOM_ROAS": "CUSTOM_ROAS", + "VIDEO_MRC_VIEWS_1": "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2", @@ -517,6 +522,7 @@ def __init__(self, api_client=None): "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2", + "PAID_VIDEO_VIEWABLE_RATE": "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH": "VIDEO_LENGTH", "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR", "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR", @@ -549,6 +555,7 @@ def __init__(self, api_client=None): "LEADS": "LEADS", "COST_PER_LEAD": "COST_PER_LEAD", "QUIZ_COMPLETED": "QUIZ_COMPLETED", + "QUIZ_PIN_RESULT_OPEN": "QUIZ_PIN_RESULT_OPEN", "QUIZ_COMPLETION_RATE": "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH": "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH": "SHOWCASE_SUBPAGE_CLICKTHROUGH", @@ -854,7 +861,7 @@ def product_group_promotions_list( product_group_promotion_ids ([str]): List of Product group promotion Ids.. [optional] entity_statuses ([str]): Entity status. [optional] if omitted the server will use the default value of ["ACTIVE","PAUSED"] ad_group_id (str): Ad group Id.. [optional] - page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] _return_http_data_only (bool): response data without head status diff --git a/openapi_generated/pinterest_client/api/product_groups_api.py b/openapi_generated/pinterest_client/api/product_groups_api.py index e8f8149..23ae8bc 100644 --- a/openapi_generated/pinterest_client/api/product_groups_api.py +++ b/openapi_generated/pinterest_client/api/product_groups_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.13.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -22,6 +22,7 @@ none_type, validate_and_convert_types ) +from openapi_generated.pinterest_client.model.catalog_product_group import CatalogProductGroup from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated diff --git a/openapi_generated/pinterest_client/api/resources_api.py b/openapi_generated/pinterest_client/api/resources_api.py index 95a3652..2997130 100644 --- a/openapi_generated/pinterest_client/api/resources_api.py +++ b/openapi_generated/pinterest_client/api/resources_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -198,6 +198,50 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.lead_form_questions_get_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/resources/lead_form_questions', + 'operation_id': 'lead_form_questions_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.metrics_ready_state_get_endpoint = _Endpoint( settings={ 'response_type': (BookClosedResponse,), @@ -273,6 +317,7 @@ def __init__(self, api_client=None): 'client_id', 'oauth_signature', 'timestamp', + 'ad_account_id', ], 'required': [ 'targeting_type', @@ -285,6 +330,7 @@ def __init__(self, api_client=None): 'validation': [ 'client_id', 'timestamp', + 'ad_account_id', ] }, root_map={ @@ -301,6 +347,12 @@ def __init__(self, api_client=None): 'pattern': r'd+/', # noqa: E501 }, }, + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, }, 'allowed_values': { ('targeting_type',): { @@ -326,18 +378,22 @@ def __init__(self, api_client=None): (str,), 'timestamp': (str,), + 'ad_account_id': + (str,), }, 'attribute_map': { 'targeting_type': 'targeting_type', 'client_id': 'client_id', 'oauth_signature': 'oauth_signature', 'timestamp': 'timestamp', + 'ad_account_id': 'ad_account_id', }, 'location_map': { 'targeting_type': 'path', 'client_id': 'query', 'oauth_signature': 'query', 'timestamp': 'query', + 'ad_account_id': 'query', }, 'collection_format_map': { } @@ -430,7 +486,7 @@ def delivery_metrics_get( ): """Get available metrics' definitions # noqa: E501 - Get the definitions for ads and organic metrics available across both synchronous and asynchronous report endpoints. The `display_name` attribute will match how the metric is named in our native tools like Ads Manager. See Organic Analytics and Ads Analytics for more information. # noqa: E501 + Get the definitions for ads and organic metrics available across both synchronous and asynchronous report endpoints. The `display_name` attribute will match how the metric is named in our native tools like Ads Manager. See Organic Analytics and Ads Analytics for more information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -576,6 +632,79 @@ def interest_targeting_options_get( interest_id return self.interest_targeting_options_get_endpoint.call_with_http_info(**kwargs) + def lead_form_questions_get( + self, + **kwargs + ): + """Get lead form questions # noqa: E501 + + Get a list of all lead form question type names. Some questions might not be used. This endpoint is currently in beta and not available to all apps. Learn more. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.lead_form_questions_get(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + return self.lead_form_questions_get_endpoint.call_with_http_info(**kwargs) + def metrics_ready_state_get( self, date, @@ -675,6 +804,7 @@ def targeting_options_get( client_id (str): Client ID.. [optional] oauth_signature (str): Oauth signature. [optional] timestamp (str): Timestamp. [optional] + ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object diff --git a/openapi_generated/pinterest_client/api/search_api.py b/openapi_generated/pinterest_client/api/search_api.py index 93911dc..5d97100 100644 --- a/openapi_generated/pinterest_client/api/search_api.py +++ b/openapi_generated/pinterest_client/api/search_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -22,8 +22,11 @@ none_type, validate_and_convert_types ) +from openapi_generated.pinterest_client.model.board import Board from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.pin import Pin +from openapi_generated.pinterest_client.model.summary_pin import SummaryPin class SearchApi(object): @@ -37,10 +40,89 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client + self.search_partner_pins_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/search/partner/pins', + 'operation_id': 'search_partner_pins', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'term', + 'country_code', + 'bookmark', + 'locale', + 'limit', + ], + 'required': [ + 'term', + 'country_code', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'limit', + ] + }, + root_map={ + 'validations': { + ('limit',): { + + 'inclusive_maximum': 50, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'term': + (str,), + 'country_code': + (str,), + 'bookmark': + (str,), + 'locale': + (str,), + 'limit': + (int,), + }, + 'attribute_map': { + 'term': 'term', + 'country_code': 'country_code', + 'bookmark': 'bookmark', + 'locale': 'locale', + 'limit': 'limit', + }, + 'location_map': { + 'term': 'query', + 'country_code': 'query', + 'bookmark': 'query', + 'locale': 'query', + 'limit': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.search_user_boards_get_endpoint = _Endpoint( settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/search/boards', @@ -52,6 +134,7 @@ def __init__(self, api_client=None): 'all': [ 'ad_account_id', 'bookmark', + 'page_size', 'query', ], 'required': [], @@ -61,6 +144,7 @@ def __init__(self, api_client=None): ], 'validation': [ 'ad_account_id', + 'page_size', ] }, root_map={ @@ -71,6 +155,11 @@ def __init__(self, api_client=None): 'pattern': r'^\d+$', # noqa: E501 }, }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, }, 'allowed_values': { }, @@ -79,17 +168,21 @@ def __init__(self, api_client=None): (str,), 'bookmark': (str,), + 'page_size': + (int,), 'query': (str,), }, 'attribute_map': { 'ad_account_id': 'ad_account_id', 'bookmark': 'bookmark', + 'page_size': 'page_size', 'query': 'query', }, 'location_map': { 'ad_account_id': 'query', 'bookmark': 'query', + 'page_size': 'query', 'query': 'query', }, 'collection_format_map': { @@ -172,13 +265,98 @@ def __init__(self, api_client=None): api_client=api_client ) + def search_partner_pins( + self, + term, + country_code, + **kwargs + ): + """Search pins by a given search term # noqa: E501 + + This endpoint is currently in beta and not available to all apps. Learn more. Get the top 10 Pins by a given search term. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_partner_pins(term, country_code, async_req=True) + >>> result = thread.get() + + Args: + term (str): Search term to look up pins. + country_code (str): Two letter country code (ISO 3166-1 alpha-2) + + Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + locale (str): Search locale.. [optional] + limit (int): Max search result size. [optional] if omitted the server will use the default value of 10 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['term'] = \ + term + kwargs['country_code'] = \ + country_code + return self.search_partner_pins_endpoint.call_with_http_info(**kwargs) + def search_user_boards_get( self, **kwargs ): """Search user's boards # noqa: E501 - Search for boards for the \"operation user_account\". This includes boards of all board types. - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. # noqa: E501 + Search for boards for the \"operation user_account\". This includes boards of all board types. - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -189,6 +367,7 @@ def search_user_boards_get( Keyword Args: ad_account_id (str): Unique identifier of an ad account.. [optional] bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 query (str): Search query. Can contain pin description keywords or comma-separated pin IDs.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -255,7 +434,7 @@ def search_user_pins_list( ): """Search user's Pins # noqa: E501 - Search for pins for the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. # noqa: E501 + Search for pins for the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/openapi_generated/pinterest_client/api/targeting_template_api.py b/openapi_generated/pinterest_client/api/targeting_template_api.py new file mode 100644 index 0000000..003c280 --- /dev/null +++ b/openapi_generated/pinterest_client/api/targeting_template_api.py @@ -0,0 +1,516 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.api_client import ApiClient, Endpoint as _Endpoint +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from openapi_generated.pinterest_client.model.error import Error +from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.targeting_template_create import TargetingTemplateCreate +from openapi_generated.pinterest_client.model.targeting_template_get_response_data import TargetingTemplateGetResponseData +from openapi_generated.pinterest_client.model.targeting_template_response_data import TargetingTemplateResponseData +from openapi_generated.pinterest_client.model.targeting_template_update_request import TargetingTemplateUpdateRequest + + +class TargetingTemplateApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.targeting_template_create_endpoint = _Endpoint( + settings={ + 'response_type': (TargetingTemplateGetResponseData,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/targeting_templates', + 'operation_id': 'targeting_template_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'targeting_template_create', + ], + 'required': [ + 'ad_account_id', + 'targeting_template_create', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'targeting_template_create': + (TargetingTemplateCreate,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'targeting_template_create': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.targeting_template_list_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/targeting_templates', + 'operation_id': 'targeting_template_list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'order', + 'include_sizing', + 'search_query', + 'page_size', + 'bookmark', + ], + 'required': [ + 'ad_account_id', + ], + 'nullable': [ + ], + 'enum': [ + 'order', + ], + 'validation': [ + 'ad_account_id', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('order',): { + + "ASCENDING": "ASCENDING", + "DESCENDING": "DESCENDING" + }, + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'order': + (str,), + 'include_sizing': + (bool,), + 'search_query': + (str,), + 'page_size': + (int,), + 'bookmark': + (str,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + 'order': 'order', + 'include_sizing': 'include_sizing', + 'search_query': 'search_query', + 'page_size': 'page_size', + 'bookmark': 'bookmark', + }, + 'location_map': { + 'ad_account_id': 'path', + 'order': 'query', + 'include_sizing': 'query', + 'search_query': 'query', + 'page_size': 'query', + 'bookmark': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.targeting_template_update_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'pinterest_oauth2' + ], + 'endpoint_path': '/ad_accounts/{ad_account_id}/targeting_templates', + 'operation_id': 'targeting_template_update', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'ad_account_id', + 'targeting_template_update_request', + ], + 'required': [ + 'ad_account_id', + 'targeting_template_update_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'ad_account_id', + ] + }, + root_map={ + 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ad_account_id': + (str,), + 'targeting_template_update_request': + (TargetingTemplateUpdateRequest,), + }, + 'attribute_map': { + 'ad_account_id': 'ad_account_id', + }, + 'location_map': { + 'ad_account_id': 'path', + 'targeting_template_update_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def targeting_template_create( + self, + ad_account_id, + targeting_template_create, + **kwargs + ): + """Create targeting templates # noqa: E501 + +

Targeting templates allow advertisers to save a set of targeting details including audience lists, keywords & interest, demographics, and placements to use more than once during the campaign creation process.

Templates can be used to build out basic targeting criteria that you plan to use across campaigns and to reuse performance targeting from prior campaigns for new campaigns.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.targeting_template_create(ad_account_id, targeting_template_create, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + targeting_template_create (TargetingTemplateCreate): targeting template creation entity + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + TargetingTemplateGetResponseData + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['targeting_template_create'] = \ + targeting_template_create + return self.targeting_template_create_endpoint.call_with_http_info(**kwargs) + + def targeting_template_list( + self, + ad_account_id, + **kwargs + ): + """List targeting templates # noqa: E501 + + Get a list of the targeting templates in the specified ad_account_id # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.targeting_template_list(ad_account_id, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + + Keyword Args: + order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional] + include_sizing (bool): Include audience sizing in result or not. [optional] if omitted the server will use the default value of False + search_query (str): Search keyword for targeting templates. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + bookmark (str): Cursor used to fetch the next page of items. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + return self.targeting_template_list_endpoint.call_with_http_info(**kwargs) + + def targeting_template_update( + self, + ad_account_id, + targeting_template_update_request, + **kwargs + ): + """Update targeting templates # noqa: E501 + +

Update the targeting template given advertiser ID and targeting template ID

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.targeting_template_update(ad_account_id, targeting_template_update_request, async_req=True) + >>> result = thread.get() + + Args: + ad_account_id (str): Unique identifier of an ad account. + targeting_template_update_request (TargetingTemplateUpdateRequest): Operation type and targeting template ID + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['ad_account_id'] = \ + ad_account_id + kwargs['targeting_template_update_request'] = \ + targeting_template_update_request + return self.targeting_template_update_endpoint.call_with_http_info(**kwargs) + diff --git a/openapi_generated/pinterest_client/api/terms_api.py b/openapi_generated/pinterest_client/api/terms_api.py index 1997f75..dd0da16 100644 --- a/openapi_generated/pinterest_client/api/terms_api.py +++ b/openapi_generated/pinterest_client/api/terms_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/api/terms_of_service_api.py b/openapi_generated/pinterest_client/api/terms_of_service_api.py index 808999b..47cd485 100644 --- a/openapi_generated/pinterest_client/api/terms_of_service_api.py +++ b/openapi_generated/pinterest_client/api/terms_of_service_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/api/user_account_api.py b/openapi_generated/pinterest_client/api/user_account_api.py index f345bcb..7d7a1c6 100644 --- a/openapi_generated/pinterest_client/api/user_account_api.py +++ b/openapi_generated/pinterest_client/api/user_account_api.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -24,8 +24,10 @@ ) from openapi_generated.pinterest_client.model.account import Account from openapi_generated.pinterest_client.model.analytics_response import AnalyticsResponse +from openapi_generated.pinterest_client.model.board import Board from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.follow_user_request import FollowUserRequest +from openapi_generated.pinterest_client.model.interest import Interest from openapi_generated.pinterest_client.model.linked_business import LinkedBusiness from openapi_generated.pinterest_client.model.paginated import Paginated from openapi_generated.pinterest_client.model.top_pins_analytics_response import TopPinsAnalyticsResponse @@ -52,6 +54,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/user_account/following/boards', @@ -62,6 +65,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'bookmark', + 'page_size', 'explicit_following', 'ad_account_id', ], @@ -71,11 +75,17 @@ def __init__(self, api_client=None): 'enum': [ ], 'validation': [ + 'page_size', 'ad_account_id', ] }, root_map={ 'validations': { + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, ('ad_account_id',): { 'max_length': 18, 'regex': { @@ -88,6 +98,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'bookmark': (str,), + 'page_size': + (int,), 'explicit_following': (bool,), 'ad_account_id': @@ -95,11 +107,13 @@ def __init__(self, api_client=None): }, 'attribute_map': { 'bookmark': 'bookmark', + 'page_size': 'page_size', 'explicit_following': 'explicit_following', 'ad_account_id': 'ad_account_id', }, 'location_map': { 'bookmark': 'query', + 'page_size': 'query', 'explicit_following': 'query', 'ad_account_id': 'query', }, @@ -183,6 +197,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/user_account/followers', @@ -193,6 +208,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'bookmark', + 'page_size', ], 'required': [], 'nullable': [ @@ -200,22 +216,32 @@ def __init__(self, api_client=None): 'enum': [ ], 'validation': [ + 'page_size', ] }, root_map={ 'validations': { + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, }, 'allowed_values': { }, 'openapi_types': { 'bookmark': (str,), + 'page_size': + (int,), }, 'attribute_map': { 'bookmark': 'bookmark', + 'page_size': 'page_size', }, 'location_map': { 'bookmark': 'query', + 'page_size': 'query', }, 'collection_format_map': { } @@ -232,6 +258,7 @@ def __init__(self, api_client=None): settings={ 'response_type': ([LinkedBusiness],), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/user_account/businesses', @@ -341,6 +368,7 @@ def __init__(self, api_client=None): 'from_claimed_content', 'pin_format', 'app_types', + 'content_type', 'source', 'metric_types', 'split_field', @@ -356,6 +384,7 @@ def __init__(self, api_client=None): 'from_claimed_content', 'pin_format', 'app_types', + 'content_type', 'source', 'metric_types', 'split_field', @@ -383,9 +412,13 @@ def __init__(self, api_client=None): ('pin_format',): { "ALL": "ALL", - "PRODUCT": "PRODUCT", - "REGULAR": "REGULAR", - "VIDEO": "VIDEO" + "ORGANIC_IMAGE": "ORGANIC_IMAGE", + "ORGANIC_PRODUCT": "ORGANIC_PRODUCT", + "ORGANIC_VIDEO": "ORGANIC_VIDEO", + "ADS_STANDARD": "ADS_STANDARD", + "ADS_PRODUCT": "ADS_PRODUCT", + "ADS_VIDEO": "ADS_VIDEO", + "ADS_IDEA": "ADS_IDEA" }, ('app_types',): { @@ -394,6 +427,12 @@ def __init__(self, api_client=None): "TABLET": "TABLET", "WEB": "WEB" }, + ('content_type',): { + + "ALL": "ALL", + "PAID": "PAID", + "ORGANIC": "ORGANIC" + }, ('source',): { "ALL": "ALL", @@ -432,6 +471,8 @@ def __init__(self, api_client=None): (str,), 'app_types': (str,), + 'content_type': + (str,), 'source': (str,), 'metric_types': @@ -447,6 +488,7 @@ def __init__(self, api_client=None): 'from_claimed_content': 'from_claimed_content', 'pin_format': 'pin_format', 'app_types': 'app_types', + 'content_type': 'content_type', 'source': 'source', 'metric_types': 'metric_types', 'split_field': 'split_field', @@ -458,6 +500,7 @@ def __init__(self, api_client=None): 'from_claimed_content': 'query', 'pin_format': 'query', 'app_types': 'query', + 'content_type': 'query', 'source': 'query', 'metric_types': 'query', 'split_field': 'query', @@ -479,6 +522,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (TopPinsAnalyticsResponse,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/user_account/analytics/top_pins', @@ -555,9 +599,13 @@ def __init__(self, api_client=None): ('pin_format',): { "ALL": "ALL", - "PRODUCT": "PRODUCT", - "REGULAR": "REGULAR", - "VIDEO": "VIDEO" + "ORGANIC_IMAGE": "ORGANIC_IMAGE", + "ORGANIC_PRODUCT": "ORGANIC_PRODUCT", + "ORGANIC_VIDEO": "ORGANIC_VIDEO", + "ADS_STANDARD": "ADS_STANDARD", + "ADS_PRODUCT": "ADS_PRODUCT", + "ADS_VIDEO": "ADS_VIDEO", + "ADS_IDEA": "ADS_IDEA" }, ('app_types',): { @@ -665,6 +713,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (TopVideoPinsAnalyticsResponse,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/user_account/analytics/top_video_pins', @@ -745,9 +794,13 @@ def __init__(self, api_client=None): ('pin_format',): { "ALL": "ALL", - "PRODUCT": "PRODUCT", - "REGULAR": "REGULAR", - "VIDEO": "VIDEO" + "ORGANIC_IMAGE": "ORGANIC_IMAGE", + "ORGANIC_PRODUCT": "ORGANIC_PRODUCT", + "ORGANIC_VIDEO": "ORGANIC_VIDEO", + "ADS_STANDARD": "ADS_STANDARD", + "ADS_PRODUCT": "ADS_PRODUCT", + "ADS_VIDEO": "ADS_VIDEO", + "ADS_IDEA": "ADS_IDEA" }, ('app_types',): { @@ -851,10 +904,86 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.user_account_followed_interests_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'client_credentials', + 'pinterest_oauth2' + ], + 'endpoint_path': '/users/{username}/interests/follow', + 'operation_id': 'user_account_followed_interests', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'username', + 'bookmark', + 'page_size', + ], + 'required': [ + 'username', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'username', + 'page_size', + ] + }, + root_map={ + 'validations': { + ('username',): { + + 'regex': { + 'pattern': r'(?!^\d+$)^.+$', # noqa: E501 + }, + }, + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'username': + (str,), + 'bookmark': + (str,), + 'page_size': + (int,), + }, + 'attribute_map': { + 'username': 'username', + 'bookmark': 'bookmark', + 'page_size': 'page_size', + }, + 'location_map': { + 'username': 'path', + 'bookmark': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.user_account_get_endpoint = _Endpoint( settings={ 'response_type': (Account,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/user_account', @@ -911,6 +1040,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/user_account/following', @@ -921,6 +1051,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'bookmark', + 'page_size', 'feed_type', 'explicit_following', 'ad_account_id', @@ -931,11 +1062,17 @@ def __init__(self, api_client=None): 'enum': [ ], 'validation': [ + 'page_size', 'ad_account_id', ] }, root_map={ 'validations': { + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, ('ad_account_id',): { 'max_length': 18, 'regex': { @@ -948,6 +1085,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'bookmark': (str,), + 'page_size': + (int,), 'feed_type': (UserFollowingFeedType,), 'explicit_following': @@ -957,12 +1096,14 @@ def __init__(self, api_client=None): }, 'attribute_map': { 'bookmark': 'bookmark', + 'page_size': 'page_size', 'feed_type': 'feed_type', 'explicit_following': 'explicit_following', 'ad_account_id': 'ad_account_id', }, 'location_map': { 'bookmark': 'query', + 'page_size': 'query', 'feed_type': 'query', 'explicit_following': 'query', 'ad_account_id': 'query', @@ -992,6 +1133,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'bookmark', + 'page_size', ], 'required': [], 'nullable': [ @@ -999,22 +1141,32 @@ def __init__(self, api_client=None): 'enum': [ ], 'validation': [ + 'page_size', ] }, root_map={ 'validations': { + ('page_size',): { + + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, + }, }, 'allowed_values': { }, 'openapi_types': { 'bookmark': (str,), + 'page_size': + (int,), }, 'attribute_map': { 'bookmark': 'bookmark', + 'page_size': 'page_size', }, 'location_map': { 'bookmark': 'query', + 'page_size': 'query', }, 'collection_format_map': { } @@ -1041,6 +1193,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'user_website_verify_request', + 'ad_account_id', ], 'required': [ 'user_website_verify_request', @@ -1050,21 +1203,32 @@ def __init__(self, api_client=None): 'enum': [ ], 'validation': [ + 'ad_account_id', ] }, root_map={ 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, }, 'allowed_values': { }, 'openapi_types': { 'user_website_verify_request': (UserWebsiteVerifyRequest,), + 'ad_account_id': + (str,), }, 'attribute_map': { + 'ad_account_id': 'ad_account_id', }, 'location_map': { 'user_website_verify_request': 'body', + 'ad_account_id': 'query', }, 'collection_format_map': { } @@ -1083,6 +1247,7 @@ def __init__(self, api_client=None): settings={ 'response_type': (UserWebsiteVerificationCode,), 'auth': [ + 'client_credentials', 'pinterest_oauth2' ], 'endpoint_path': '/user_account/websites/verification', @@ -1092,6 +1257,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'ad_account_id', ], 'required': [], 'nullable': [ @@ -1099,18 +1265,29 @@ def __init__(self, api_client=None): 'enum': [ ], 'validation': [ + 'ad_account_id', ] }, root_map={ 'validations': { + ('ad_account_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, }, 'allowed_values': { }, 'openapi_types': { + 'ad_account_id': + (str,), }, 'attribute_map': { + 'ad_account_id': 'ad_account_id', }, 'location_map': { + 'ad_account_id': 'query', }, 'collection_format_map': { } @@ -1140,6 +1317,7 @@ def boards_user_follows_list( Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 explicit_following (bool): Whether or not to include implicit user follows, which means followees with board follows. When explicit_following is True, it means we only want explicit user follows.. [optional] if omitted the server will use the default value of False ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status @@ -1208,7 +1386,7 @@ def follow_user_update( ): """Follow user # noqa: E501 - This endpoint is currently in beta and not available to all apps. Learn more. Use this request, as a signed-in user, to follow another user. # noqa: E501 + This endpoint is currently in beta and not available to all apps. Learn more. Use this request, as a signed-in user, to follow another user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1288,7 +1466,7 @@ def followers_list( ): """List followers # noqa: E501 - Get a list of your followers, or a specific user's followers. # noqa: E501 + Get a list of your followers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1298,6 +1476,7 @@ def followers_list( Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -1530,6 +1709,7 @@ def user_account_analytics( from_claimed_content (str): Filter on Pins that match your claimed domain.. [optional] if omitted the server will use the default value of "BOTH" pin_format (str): Pin formats to get data for, default is all.. [optional] if omitted the server will use the default value of "ALL" app_types (str): Apps or devices to get data for, default is all.. [optional] if omitted the server will use the default value of "ALL" + content_type (str): Filter to paid or organic data. Default is all.. [optional] if omitted the server will use the default value of "ALL" source (str): Filter to activity from Pins created and saved by your, or activity created and saved by others from your claimed accounts. [optional] if omitted the server will use the default value of "ALL" metric_types ([str]): Metric types to get data for, default is all. . [optional] split_field (str): How to split the data into groups. Not including this param means data won't be split.. [optional] if omitted the server will use the default value of "NO_SPLIT" @@ -1786,13 +1966,93 @@ def user_account_analytics_top_video_pins( sort_by return self.user_account_analytics_top_video_pins_endpoint.call_with_http_info(**kwargs) + def user_account_followed_interests( + self, + username, + **kwargs + ): + """List following interests # noqa: E501 + + Get a list of a user's following interests in one place. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.user_account_followed_interests(username, async_req=True) + >>> result = thread.get() + + Args: + username (str): A valid username + + Keyword Args: + bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['username'] = \ + username + return self.user_account_followed_interests_endpoint.call_with_http_info(**kwargs) + def user_account_get( self, **kwargs ): """Get user account # noqa: E501 - Get account information for the \"operation user_account\" - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. # noqa: E501 + Get account information for the \"operation user_account\" - By default, the \"operation user_account\" is the token user_account. If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\". See Understanding Business Access for more information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1876,6 +2136,7 @@ def user_following_get( Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 feed_type (UserFollowingFeedType): Thrift param specifying what type of followees will be kept. Default to include all followees.. [optional] explicit_following (bool): Whether or not to include implicit user follows, which means followees with board follows. When explicit_following is True, it means we only want explicit user follows.. [optional] if omitted the server will use the default value of False ad_account_id (str): Unique identifier of an ad account.. [optional] @@ -1953,6 +2214,7 @@ def user_websites_get( Keyword Args: bookmark (str): Cursor used to fetch the next page of items. [optional] + page_size (int): Maximum number of items to include in a single page of the response. See documentation on Pagination for more information.. [optional] if omitted the server will use the default value of 25 _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -2029,6 +2291,7 @@ def verify_website_update( user_website_verify_request (UserWebsiteVerifyRequest): Verify a website. Keyword Args: + ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -2104,6 +2367,7 @@ def website_verification_get( Keyword Args: + ad_account_id (str): Unique identifier of an ad account.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object diff --git a/openapi_generated/pinterest_client/api_client.py b/openapi_generated/pinterest_client/api_client.py index 2506680..01400f7 100644 --- a/openapi_generated/pinterest_client/api_client.py +++ b/openapi_generated/pinterest_client/api_client.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/apis/__init__.py b/openapi_generated/pinterest_client/apis/__init__.py index 491c6e4..3932395 100644 --- a/openapi_generated/pinterest_client/apis/__init__.py +++ b/openapi_generated/pinterest_client/apis/__init__.py @@ -17,27 +17,34 @@ from openapi_generated.pinterest_client.api.ad_accounts_api import AdAccountsApi from openapi_generated.pinterest_client.api.ad_groups_api import AdGroupsApi from openapi_generated.pinterest_client.api.ads_api import AdsApi +from openapi_generated.pinterest_client.api.advanced_auction_api import AdvancedAuctionApi from openapi_generated.pinterest_client.api.audience_insights_api import AudienceInsightsApi +from openapi_generated.pinterest_client.api.audience_sharing_api import AudienceSharingApi from openapi_generated.pinterest_client.api.audiences_api import AudiencesApi +from openapi_generated.pinterest_client.api.billing_api import BillingApi from openapi_generated.pinterest_client.api.boards_api import BoardsApi from openapi_generated.pinterest_client.api.bulk_api import BulkApi +from openapi_generated.pinterest_client.api.business_access_assets_api import BusinessAccessAssetsApi +from openapi_generated.pinterest_client.api.business_access_invite_api import BusinessAccessInviteApi +from openapi_generated.pinterest_client.api.business_access_relationships_api import BusinessAccessRelationshipsApi from openapi_generated.pinterest_client.api.campaigns_api import CampaignsApi from openapi_generated.pinterest_client.api.catalogs_api import CatalogsApi from openapi_generated.pinterest_client.api.conversion_events_api import ConversionEventsApi from openapi_generated.pinterest_client.api.conversion_tags_api import ConversionTagsApi from openapi_generated.pinterest_client.api.customer_lists_api import CustomerListsApi from openapi_generated.pinterest_client.api.integrations_api import IntegrationsApi -from openapi_generated.pinterest_client.api.interests_api import InterestsApi from openapi_generated.pinterest_client.api.keywords_api import KeywordsApi +from openapi_generated.pinterest_client.api.lead_ads_api import LeadAdsApi from openapi_generated.pinterest_client.api.lead_forms_api import LeadFormsApi +from openapi_generated.pinterest_client.api.leads_export_api import LeadsExportApi from openapi_generated.pinterest_client.api.media_api import MediaApi from openapi_generated.pinterest_client.api.oauth_api import OauthApi from openapi_generated.pinterest_client.api.order_lines_api import OrderLinesApi from openapi_generated.pinterest_client.api.pins_api import PinsApi from openapi_generated.pinterest_client.api.product_group_promotions_api import ProductGroupPromotionsApi -from openapi_generated.pinterest_client.api.product_groups_api import ProductGroupsApi from openapi_generated.pinterest_client.api.resources_api import ResourcesApi from openapi_generated.pinterest_client.api.search_api import SearchApi +from openapi_generated.pinterest_client.api.targeting_template_api import TargetingTemplateApi from openapi_generated.pinterest_client.api.terms_api import TermsApi from openapi_generated.pinterest_client.api.terms_of_service_api import TermsOfServiceApi from openapi_generated.pinterest_client.api.user_account_api import UserAccountApi diff --git a/openapi_generated/pinterest_client/configuration.py b/openapi_generated/pinterest_client/configuration.py index 6b34053..e65437c 100644 --- a/openapi_generated/pinterest_client/configuration.py +++ b/openapi_generated/pinterest_client/configuration.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -394,6 +394,13 @@ def auth_settings(self): 'key': 'Authorization', 'value': self.get_basic_auth_token() } + if self.access_token is not None: + auth['client_credentials'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } if self.access_token is not None: auth['conversion_token'] = { 'type': 'bearer', @@ -418,8 +425,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 5.10.0\n"\ - "SDK Package Version: 0.1.8".\ + "Version of the API: 5.14.0\n"\ + "SDK Package Version: 0.1.9".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/openapi_generated/pinterest_client/exceptions.py b/openapi_generated/pinterest_client/exceptions.py index e66a8e6..12e43bd 100644 --- a/openapi_generated/pinterest_client/exceptions.py +++ b/openapi_generated/pinterest_client/exceptions.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/account.py b/openapi_generated/pinterest_client/model/account.py index 2e33976..0aa2bb7 100644 --- a/openapi_generated/pinterest_client/model/account.py +++ b/openapi_generated/pinterest_client/model/account.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/action_type.py b/openapi_generated/pinterest_client/model/action_type.py index fd9c195..0dba184 100644 --- a/openapi_generated/pinterest_client/model/action_type.py +++ b/openapi_generated/pinterest_client/model/action_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -107,10 +107,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Ad group billable event type.., must be one of ["CLICKTHROUGH", "IMPRESSION", "VIDEO_V_50_MRC", ] # noqa: E501 + args[0] (str): Ad group billable event type. For update, only draft ad groups may update billable event.., must be one of ["CLICKTHROUGH", "IMPRESSION", "VIDEO_V_50_MRC", ] # noqa: E501 Keyword Args: - value (str): Ad group billable event type.., must be one of ["CLICKTHROUGH", "IMPRESSION", "VIDEO_V_50_MRC", ] # noqa: E501 + value (str): Ad group billable event type. For update, only draft ad groups may update billable event.., must be one of ["CLICKTHROUGH", "IMPRESSION", "VIDEO_V_50_MRC", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -197,10 +197,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Ad group billable event type.., must be one of ["CLICKTHROUGH", "IMPRESSION", "VIDEO_V_50_MRC", ] # noqa: E501 + args[0] (str): Ad group billable event type. For update, only draft ad groups may update billable event.., must be one of ["CLICKTHROUGH", "IMPRESSION", "VIDEO_V_50_MRC", ] # noqa: E501 Keyword Args: - value (str): Ad group billable event type.., must be one of ["CLICKTHROUGH", "IMPRESSION", "VIDEO_V_50_MRC", ] # noqa: E501 + value (str): Ad group billable event type. For update, only draft ad groups may update billable event.., must be one of ["CLICKTHROUGH", "IMPRESSION", "VIDEO_V_50_MRC", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/ad_account.py b/openapi_generated/pinterest_client/model/ad_account.py index c36c5d7..a527292 100644 --- a/openapi_generated/pinterest_client/model/ad_account.py +++ b/openapi_generated/pinterest_client/model/ad_account.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -32,9 +32,11 @@ def lazy_import(): from openapi_generated.pinterest_client.model.ad_account_owner import AdAccountOwner + from openapi_generated.pinterest_client.model.business_access_role import BusinessAccessRole from openapi_generated.pinterest_client.model.country import Country from openapi_generated.pinterest_client.model.currency import Currency globals()['AdAccountOwner'] = AdAccountOwner + globals()['BusinessAccessRole'] = BusinessAccessRole globals()['Country'] = Country globals()['Currency'] = Currency @@ -97,7 +99,7 @@ def openapi_types(): 'owner': (AdAccountOwner,), # noqa: E501 'country': (Country,), # noqa: E501 'currency': (Currency,), # noqa: E501 - 'permissions': ([str, none_type],), # noqa: E501 + 'permissions': ([BusinessAccessRole],), # noqa: E501 'created_time': (int, none_type,), # noqa: E501 'updated_time': (int, none_type,), # noqa: E501 } @@ -164,7 +166,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 owner (AdAccountOwner): [optional] # noqa: E501 country (Country): [optional] # noqa: E501 currency (Currency): [optional] # noqa: E501 - permissions ([str, none_type]): [optional] # noqa: E501 + permissions ([BusinessAccessRole]): [optional] # noqa: E501 created_time (int, none_type): Creation time. Unix timestamp in seconds.. [optional] # noqa: E501 updated_time (int, none_type): Last update time. Unix timestamp in seconds.. [optional] # noqa: E501 """ @@ -253,7 +255,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 owner (AdAccountOwner): [optional] # noqa: E501 country (Country): [optional] # noqa: E501 currency (Currency): [optional] # noqa: E501 - permissions ([str, none_type]): [optional] # noqa: E501 + permissions ([BusinessAccessRole]): [optional] # noqa: E501 created_time (int, none_type): Creation time. Unix timestamp in seconds.. [optional] # noqa: E501 updated_time (int, none_type): Last update time. Unix timestamp in seconds.. [optional] # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/ad_account_analytics_response.py b/openapi_generated/pinterest_client/model/ad_account_analytics_response.py index 9afb335..921f404 100644 --- a/openapi_generated/pinterest_client/model/ad_account_analytics_response.py +++ b/openapi_generated/pinterest_client/model/ad_account_analytics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_account_create_request.py b/openapi_generated/pinterest_client/model/ad_account_create_request.py index db14722..0febbe1 100644 --- a/openapi_generated/pinterest_client/model/ad_account_create_request.py +++ b/openapi_generated/pinterest_client/model/ad_account_create_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_account_create_subscription_request.py b/openapi_generated/pinterest_client/model/ad_account_create_subscription_request.py new file mode 100644 index 0000000..8e75876 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_account_create_subscription_request.py @@ -0,0 +1,289 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.ad_account_create_subscription_request_partner_metadata import AdAccountCreateSubscriptionRequestPartnerMetadata + globals()['AdAccountCreateSubscriptionRequestPartnerMetadata'] = AdAccountCreateSubscriptionRequestPartnerMetadata + + +class AdAccountCreateSubscriptionRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('lead_form_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'webhook_url': (str,), # noqa: E501 + 'lead_form_id': (str,), # noqa: E501 + 'partner_access_token': (str,), # noqa: E501 + 'partner_refresh_token': (str,), # noqa: E501 + 'partner_metadata': (AdAccountCreateSubscriptionRequestPartnerMetadata,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'webhook_url': 'webhook_url', # noqa: E501 + 'lead_form_id': 'lead_form_id', # noqa: E501 + 'partner_access_token': 'partner_access_token', # noqa: E501 + 'partner_refresh_token': 'partner_refresh_token', # noqa: E501 + 'partner_metadata': 'partner_metadata', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, webhook_url, *args, **kwargs): # noqa: E501 + """AdAccountCreateSubscriptionRequest - a model defined in OpenAPI + + Args: + webhook_url (str): Standard HTTPS webhook URL. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + lead_form_id (str): Lead form ID.. [optional] # noqa: E501 + partner_access_token (str): Partner access token. Only for clients that requires authentication. We recommend to avoid this param.. [optional] # noqa: E501 + partner_refresh_token (str): Partner refresh token. Only for clients that requires authentication. We recommend to avoid this param.. [optional] # noqa: E501 + partner_metadata (AdAccountCreateSubscriptionRequestPartnerMetadata): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.webhook_url = webhook_url + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, webhook_url, *args, **kwargs): # noqa: E501 + """AdAccountCreateSubscriptionRequest - a model defined in OpenAPI + + Args: + webhook_url (str): Standard HTTPS webhook URL. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + lead_form_id (str): Lead form ID.. [optional] # noqa: E501 + partner_access_token (str): Partner access token. Only for clients that requires authentication. We recommend to avoid this param.. [optional] # noqa: E501 + partner_refresh_token (str): Partner refresh token. Only for clients that requires authentication. We recommend to avoid this param.. [optional] # noqa: E501 + partner_metadata (AdAccountCreateSubscriptionRequestPartnerMetadata): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.webhook_url = webhook_url + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ad_account_create_subscription_request_partner_metadata.py b/openapi_generated/pinterest_client/model/ad_account_create_subscription_request_partner_metadata.py new file mode 100644 index 0000000..b975c10 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_account_create_subscription_request_partner_metadata.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdAccountCreateSubscriptionRequestPartnerMetadata(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'subscriber_key': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'subscriber_key': 'subscriber_key', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdAccountCreateSubscriptionRequestPartnerMetadata - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + subscriber_key (str): Text field value that uniquely identifies a subscriber.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdAccountCreateSubscriptionRequestPartnerMetadata - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + subscriber_key (str): Text field value that uniquely identifies a subscriber.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ad_account_create_subscription_response.py b/openapi_generated/pinterest_client/model/ad_account_create_subscription_response.py new file mode 100644 index 0000000..6a55379 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_account_create_subscription_response.py @@ -0,0 +1,273 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdAccountCreateSubscriptionResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'cryptographic_key': (str, none_type,), # noqa: E501 + 'cryptographic_algorithm': (str, none_type,), # noqa: E501 + 'created_time': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'cryptographic_key': 'cryptographic_key', # noqa: E501 + 'cryptographic_algorithm': 'cryptographic_algorithm', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdAccountCreateSubscriptionResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Subscription ID.. [optional] # noqa: E501 + cryptographic_key (str, none_type): Base64 encoded key for client to decrypt lead data.. [optional] # noqa: E501 + cryptographic_algorithm (str, none_type): Lead data encryption algorithm.. [optional] # noqa: E501 + created_time (int): Subscription creation time. Unix timestamp in milliseconds.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdAccountCreateSubscriptionResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Subscription ID.. [optional] # noqa: E501 + cryptographic_key (str, none_type): Base64 encoded key for client to decrypt lead data.. [optional] # noqa: E501 + cryptographic_algorithm (str, none_type): Lead data encryption algorithm.. [optional] # noqa: E501 + created_time (int): Subscription creation time. Unix timestamp in milliseconds.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ad_account_get_subscription_response.py b/openapi_generated/pinterest_client/model/ad_account_get_subscription_response.py new file mode 100644 index 0000000..636a083 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_account_get_subscription_response.py @@ -0,0 +1,366 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.ad_account_get_subscription_response_all_of import AdAccountGetSubscriptionResponseAllOf + from openapi_generated.pinterest_client.model.ad_account_get_subscription_response_all_of1 import AdAccountGetSubscriptionResponseAllOf1 + globals()['AdAccountGetSubscriptionResponseAllOf'] = AdAccountGetSubscriptionResponseAllOf + globals()['AdAccountGetSubscriptionResponseAllOf1'] = AdAccountGetSubscriptionResponseAllOf1 + + +class AdAccountGetSubscriptionResponse(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('lead_form_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('user_account_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('ad_account_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'lead_form_id': (str, none_type,), # noqa: E501 + 'webhook_url': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'user_account_id': (str,), # noqa: E501 + 'ad_account_id': (str,), # noqa: E501 + 'api_version': (str,), # noqa: E501 + 'cryptographic_key': (str, none_type,), # noqa: E501 + 'cryptographic_algorithm': (str, none_type,), # noqa: E501 + 'created_time': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'lead_form_id': 'lead_form_id', # noqa: E501 + 'webhook_url': 'webhook_url', # noqa: E501 + 'id': 'id', # noqa: E501 + 'user_account_id': 'user_account_id', # noqa: E501 + 'ad_account_id': 'ad_account_id', # noqa: E501 + 'api_version': 'api_version', # noqa: E501 + 'cryptographic_key': 'cryptographic_key', # noqa: E501 + 'cryptographic_algorithm': 'cryptographic_algorithm', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdAccountGetSubscriptionResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + lead_form_id (str, none_type): Lead form ID.. [optional] # noqa: E501 + webhook_url (str): Standard HTTPS webhook URL.. [optional] # noqa: E501 + id (str): Subscription ID.. [optional] # noqa: E501 + user_account_id (str): User account used to subscribe lead data.. [optional] # noqa: E501 + ad_account_id (str): The Ad Account ID that this lead form belongs to.. [optional] # noqa: E501 + api_version (str): API version.. [optional] # noqa: E501 + cryptographic_key (str, none_type): Base64 encoded key for client to decrypt lead data.. [optional] # noqa: E501 + cryptographic_algorithm (str, none_type): Lead data encryption algorithm.. [optional] # noqa: E501 + created_time (int): Lead form creation time. Unix timestamp in milliseconds.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdAccountGetSubscriptionResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + lead_form_id (str, none_type): Lead form ID.. [optional] # noqa: E501 + webhook_url (str): Standard HTTPS webhook URL.. [optional] # noqa: E501 + id (str): Subscription ID.. [optional] # noqa: E501 + user_account_id (str): User account used to subscribe lead data.. [optional] # noqa: E501 + ad_account_id (str): The Ad Account ID that this lead form belongs to.. [optional] # noqa: E501 + api_version (str): API version.. [optional] # noqa: E501 + cryptographic_key (str, none_type): Base64 encoded key for client to decrypt lead data.. [optional] # noqa: E501 + cryptographic_algorithm (str, none_type): Lead data encryption algorithm.. [optional] # noqa: E501 + created_time (int): Lead form creation time. Unix timestamp in milliseconds.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/ad_account_get_subscription_response_all_of.py b/openapi_generated/pinterest_client/model/ad_account_get_subscription_response_all_of.py new file mode 100644 index 0000000..d0b8ed6 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_account_get_subscription_response_all_of.py @@ -0,0 +1,265 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdAccountGetSubscriptionResponseAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('lead_form_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'lead_form_id': (str, none_type,), # noqa: E501 + 'webhook_url': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'lead_form_id': 'lead_form_id', # noqa: E501 + 'webhook_url': 'webhook_url', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdAccountGetSubscriptionResponseAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + lead_form_id (str, none_type): Lead form ID.. [optional] # noqa: E501 + webhook_url (str): Standard HTTPS webhook URL.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdAccountGetSubscriptionResponseAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + lead_form_id (str, none_type): Lead form ID.. [optional] # noqa: E501 + webhook_url (str): Standard HTTPS webhook URL.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ad_account_get_subscription_response_all_of1.py b/openapi_generated/pinterest_client/model/ad_account_get_subscription_response_all_of1.py new file mode 100644 index 0000000..2a64d27 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_account_get_subscription_response_all_of1.py @@ -0,0 +1,295 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdAccountGetSubscriptionResponseAllOf1(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('user_account_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('ad_account_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'user_account_id': (str,), # noqa: E501 + 'ad_account_id': (str,), # noqa: E501 + 'api_version': (str,), # noqa: E501 + 'cryptographic_key': (str, none_type,), # noqa: E501 + 'cryptographic_algorithm': (str, none_type,), # noqa: E501 + 'created_time': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'user_account_id': 'user_account_id', # noqa: E501 + 'ad_account_id': 'ad_account_id', # noqa: E501 + 'api_version': 'api_version', # noqa: E501 + 'cryptographic_key': 'cryptographic_key', # noqa: E501 + 'cryptographic_algorithm': 'cryptographic_algorithm', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdAccountGetSubscriptionResponseAllOf1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Subscription ID.. [optional] # noqa: E501 + user_account_id (str): User account used to subscribe lead data.. [optional] # noqa: E501 + ad_account_id (str): The Ad Account ID that this lead form belongs to.. [optional] # noqa: E501 + api_version (str): API version.. [optional] # noqa: E501 + cryptographic_key (str, none_type): Base64 encoded key for client to decrypt lead data.. [optional] # noqa: E501 + cryptographic_algorithm (str, none_type): Lead data encryption algorithm.. [optional] # noqa: E501 + created_time (int): Lead form creation time. Unix timestamp in milliseconds.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdAccountGetSubscriptionResponseAllOf1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Subscription ID.. [optional] # noqa: E501 + user_account_id (str): User account used to subscribe lead data.. [optional] # noqa: E501 + ad_account_id (str): The Ad Account ID that this lead form belongs to.. [optional] # noqa: E501 + api_version (str): API version.. [optional] # noqa: E501 + cryptographic_key (str, none_type): Base64 encoded key for client to decrypt lead data.. [optional] # noqa: E501 + cryptographic_algorithm (str, none_type): Lead data encryption algorithm.. [optional] # noqa: E501 + created_time (int): Lead form creation time. Unix timestamp in milliseconds.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ad_account_owner.py b/openapi_generated/pinterest_client/model/ad_account_owner.py index 2740db8..a98a2c3 100644 --- a/openapi_generated/pinterest_client/model/ad_account_owner.py +++ b/openapi_generated/pinterest_client/model/ad_account_owner.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_accounts_country_response.py b/openapi_generated/pinterest_client/model/ad_accounts_country_response.py index e99132e..559c5f0 100644 --- a/openapi_generated/pinterest_client/model/ad_accounts_country_response.py +++ b/openapi_generated/pinterest_client/model/ad_accounts_country_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_accounts_country_response_data.py b/openapi_generated/pinterest_client/model/ad_accounts_country_response_data.py index 2233c86..5958471 100644 --- a/openapi_generated/pinterest_client/model/ad_accounts_country_response_data.py +++ b/openapi_generated/pinterest_client/model/ad_accounts_country_response_data.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.country import Country - globals()['Country'] = Country + from openapi_generated.pinterest_client.model.ad_country import AdCountry + globals()['AdCountry'] = AdCountry class AdAccountsCountryResponseData(ModelNormal): @@ -88,7 +88,7 @@ def openapi_types(): """ lazy_import() return { - 'code': (Country,), # noqa: E501 + 'code': (AdCountry,), # noqa: E501 'currency': (str,), # noqa: E501 'index': (float,), # noqa: E501 'name': (str,), # noqa: E501 @@ -147,7 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - code (Country): [optional] # noqa: E501 + code (AdCountry): [optional] # noqa: E501 currency (str): Country currency.. [optional] # noqa: E501 index (float): Country index. [optional] # noqa: E501 name (str): Country name. [optional] # noqa: E501 @@ -232,7 +232,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - code (Country): [optional] # noqa: E501 + code (AdCountry): [optional] # noqa: E501 currency (str): Country currency.. [optional] # noqa: E501 index (float): Country index. [optional] # noqa: E501 name (str): Country name. [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/ad_array_response.py b/openapi_generated/pinterest_client/model/ad_array_response.py index 75ba2e9..74b8037 100644 --- a/openapi_generated/pinterest_client/model/ad_array_response.py +++ b/openapi_generated/pinterest_client/model/ad_array_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_array_response_element.py b/openapi_generated/pinterest_client/model/ad_array_response_element.py index 0cbc7b0..2127ade 100644 --- a/openapi_generated/pinterest_client/model/ad_array_response_element.py +++ b/openapi_generated/pinterest_client/model/ad_array_response_element.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_common.py b/openapi_generated/pinterest_client/model/ad_common.py index a324534..db5a88b 100644 --- a/openapi_generated/pinterest_client/model/ad_common.py +++ b/openapi_generated/pinterest_client/model/ad_common.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -33,9 +33,13 @@ def lazy_import(): from openapi_generated.pinterest_client.model.creative_type import CreativeType from openapi_generated.pinterest_client.model.entity_status import EntityStatus + from openapi_generated.pinterest_client.model.grid_click_type import GridClickType + from openapi_generated.pinterest_client.model.quiz_pin_data import QuizPinData from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls globals()['CreativeType'] = CreativeType globals()['EntityStatus'] = EntityStatus + globals()['GridClickType'] = GridClickType + globals()['QuizPinData'] = QuizPinData globals()['TrackingUrls'] = TrackingUrls @@ -64,6 +68,28 @@ class AdCommon(ModelNormal): """ allowed_values = { + ('customizable_cta_type',): { + 'None': None, + 'GET_OFFER': "GET_OFFER", + 'LEARN_MORE': "LEARN_MORE", + 'ORDER_NOW': "ORDER_NOW", + 'SHOP_NOW': "SHOP_NOW", + 'SIGN_UP': "SIGN_UP", + 'SUBSCRIBE': "SUBSCRIBE", + 'BUY_NOW': "BUY_NOW", + 'CONTACT_US': "CONTACT_US", + 'GET_QUOTE': "GET_QUOTE", + 'VISIT_SITE': "VISIT_SITE", + 'APPLY_NOW': "APPLY_NOW", + 'BOOK_NOW': "BOOK_NOW", + 'REQUEST_DEMO': "REQUEST_DEMO", + 'REGISTER_NOW': "REGISTER_NOW", + 'FIND_A_DEALER': "FIND_A_DEALER", + 'ADD_TO_CART': "ADD_TO_CART", + 'WATCH_NOW': "WATCH_NOW", + 'READ_MORE': "READ_MORE", + 'NULL': "null", + }, } validations = { @@ -72,6 +98,11 @@ class AdCommon(ModelNormal): 'pattern': r'^(AG)?\d+$', # noqa: E501 }, }, + ('lead_form_id',): { + 'regex': { + 'pattern': r'^(AG)?\d+$', # noqa: E501 + }, + }, } @cached_property @@ -112,6 +143,10 @@ def openapi_types(): 'status': (EntityStatus,), # noqa: E501 'tracking_urls': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'view_tracking_url': (str, none_type,), # noqa: E501 + 'lead_form_id': (str, none_type,), # noqa: E501 + 'grid_click_type': (GridClickType,), # noqa: E501 + 'customizable_cta_type': (str, none_type,), # noqa: E501 + 'quiz_pin_data': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 } @cached_property @@ -135,6 +170,10 @@ def discriminator(): 'status': 'status', # noqa: E501 'tracking_urls': 'tracking_urls', # noqa: E501 'view_tracking_url': 'view_tracking_url', # noqa: E501 + 'lead_form_id': 'lead_form_id', # noqa: E501 + 'grid_click_type': 'grid_click_type', # noqa: E501 + 'customizable_cta_type': 'customizable_cta_type', # noqa: E501 + 'quiz_pin_data': 'quiz_pin_data', # noqa: E501 } read_only_vars = { @@ -179,20 +218,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) ad_group_id (str): ID of the ad group that contains the ad.. [optional] # noqa: E501 - android_deep_link (str, none_type): Deep link URL for Android devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + android_deep_link (str, none_type): Deep link URL for Android devices.. [optional] # noqa: E501 carousel_android_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on Android.. [optional] # noqa: E501 carousel_destination_urls ([str], none_type): Comma-separated destination URLs for the carousel pin to promote.. [optional] # noqa: E501 carousel_ios_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on iOS.. [optional] # noqa: E501 click_tracking_url (str, none_type): Tracking url for the ad clicks.. [optional] # noqa: E501 creative_type (CreativeType): [optional] # noqa: E501 destination_url (str, none_type): Destination URL.. [optional] # noqa: E501 - ios_deep_link (str, none_type): Deep link URL for iOS devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + ios_deep_link (str, none_type): Deep link URL for iOS devices.. [optional] # noqa: E501 is_pin_deleted (bool): Is original pin deleted?. [optional] # noqa: E501 is_removable (bool): Is pin repinnable?. [optional] # noqa: E501 name (str, none_type): Name of the ad - 255 chars max.. [optional] # noqa: E501 status (EntityStatus): [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 view_tracking_url (str, none_type): Tracking URL for ad impressions.. [optional] # noqa: E501 + lead_form_id (str, none_type): Lead form ID for lead ad generation.. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + customizable_cta_type (str, none_type): Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only). [optional] # noqa: E501 + quiz_pin_data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -275,20 +318,24 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) ad_group_id (str): ID of the ad group that contains the ad.. [optional] # noqa: E501 - android_deep_link (str, none_type): Deep link URL for Android devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + android_deep_link (str, none_type): Deep link URL for Android devices.. [optional] # noqa: E501 carousel_android_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on Android.. [optional] # noqa: E501 carousel_destination_urls ([str], none_type): Comma-separated destination URLs for the carousel pin to promote.. [optional] # noqa: E501 carousel_ios_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on iOS.. [optional] # noqa: E501 click_tracking_url (str, none_type): Tracking url for the ad clicks.. [optional] # noqa: E501 creative_type (CreativeType): [optional] # noqa: E501 destination_url (str, none_type): Destination URL.. [optional] # noqa: E501 - ios_deep_link (str, none_type): Deep link URL for iOS devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + ios_deep_link (str, none_type): Deep link URL for iOS devices.. [optional] # noqa: E501 is_pin_deleted (bool): Is original pin deleted?. [optional] # noqa: E501 is_removable (bool): Is pin repinnable?. [optional] # noqa: E501 name (str, none_type): Name of the ad - 255 chars max.. [optional] # noqa: E501 status (EntityStatus): [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 view_tracking_url (str, none_type): Tracking URL for ad impressions.. [optional] # noqa: E501 + lead_form_id (str, none_type): Lead form ID for lead ad generation.. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + customizable_cta_type (str, none_type): Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only). [optional] # noqa: E501 + quiz_pin_data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/ad_country.py b/openapi_generated/pinterest_client/model/ad_country.py new file mode 100644 index 0000000..0e831ab --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_country.py @@ -0,0 +1,529 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdCountry(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'AD': "AD", + 'AE': "AE", + 'AF': "AF", + 'AG': "AG", + 'AI': "AI", + 'AL': "AL", + 'AM': "AM", + 'AO': "AO", + 'AQ': "AQ", + 'AR': "AR", + 'AS': "AS", + 'AT': "AT", + 'AU': "AU", + 'AW': "AW", + 'AX': "AX", + 'AZ': "AZ", + 'BA': "BA", + 'BB': "BB", + 'BD': "BD", + 'BE': "BE", + 'BF': "BF", + 'BG': "BG", + 'BH': "BH", + 'BI': "BI", + 'BJ': "BJ", + 'BL': "BL", + 'BM': "BM", + 'BN': "BN", + 'BO': "BO", + 'BQ': "BQ", + 'BR': "BR", + 'BS': "BS", + 'BT': "BT", + 'BV': "BV", + 'BW': "BW", + 'BY': "BY", + 'BZ': "BZ", + 'CA': "CA", + 'CC': "CC", + 'CD': "CD", + 'CF': "CF", + 'CG': "CG", + 'CH': "CH", + 'CI': "CI", + 'CK': "CK", + 'CL': "CL", + 'CM': "CM", + 'CN': "CN", + 'CO': "CO", + 'CR': "CR", + 'CU': "CU", + 'CV': "CV", + 'CW': "CW", + 'CX': "CX", + 'CY': "CY", + 'CZ': "CZ", + 'DE': "DE", + 'DJ': "DJ", + 'DK': "DK", + 'DM': "DM", + 'DO': "DO", + 'DZ': "DZ", + 'EC': "EC", + 'EE': "EE", + 'EG': "EG", + 'EH': "EH", + 'ER': "ER", + 'ES': "ES", + 'ET': "ET", + 'FI': "FI", + 'FJ': "FJ", + 'FK': "FK", + 'FM': "FM", + 'FO': "FO", + 'FR': "FR", + 'GA': "GA", + 'GB': "GB", + 'GD': "GD", + 'GE': "GE", + 'GF': "GF", + 'GG': "GG", + 'GH': "GH", + 'GI': "GI", + 'GL': "GL", + 'GM': "GM", + 'GN': "GN", + 'GP': "GP", + 'GQ': "GQ", + 'GR': "GR", + 'GS': "GS", + 'GT': "GT", + 'GU': "GU", + 'GW': "GW", + 'GY': "GY", + 'HK': "HK", + 'HM': "HM", + 'HN': "HN", + 'HR': "HR", + 'HT': "HT", + 'HU': "HU", + 'ID': "ID", + 'IE': "IE", + 'IL': "IL", + 'IM': "IM", + 'IN': "IN", + 'IO': "IO", + 'IQ': "IQ", + 'IR': "IR", + 'IS': "IS", + 'IT': "IT", + 'JE': "JE", + 'JM': "JM", + 'JO': "JO", + 'JP': "JP", + 'KE': "KE", + 'KG': "KG", + 'KH': "KH", + 'KI': "KI", + 'KM': "KM", + 'KN': "KN", + 'KR': "KR", + 'KW': "KW", + 'KY': "KY", + 'KZ': "KZ", + 'LA': "LA", + 'LB': "LB", + 'LC': "LC", + 'LI': "LI", + 'LK': "LK", + 'LR': "LR", + 'LS': "LS", + 'LT': "LT", + 'LU': "LU", + 'LV': "LV", + 'LY': "LY", + 'MA': "MA", + 'MC': "MC", + 'MD': "MD", + 'ME': "ME", + 'MF': "MF", + 'MG': "MG", + 'MH': "MH", + 'MK': "MK", + 'ML': "ML", + 'MM': "MM", + 'MN': "MN", + 'MO': "MO", + 'MP': "MP", + 'MQ': "MQ", + 'MR': "MR", + 'MS': "MS", + 'MT': "MT", + 'MU': "MU", + 'MV': "MV", + 'MW': "MW", + 'MX': "MX", + 'MY': "MY", + 'MZ': "MZ", + 'NA': "NA", + 'NC': "NC", + 'NE': "NE", + 'NF': "NF", + 'NG': "NG", + 'NI': "NI", + 'NL': "NL", + 'NO': "NO", + 'NP': "NP", + 'NR': "NR", + 'NU': "NU", + 'NZ': "NZ", + 'OM': "OM", + 'PA': "PA", + 'PE': "PE", + 'PF': "PF", + 'PG': "PG", + 'PH': "PH", + 'PK': "PK", + 'PL': "PL", + 'PM': "PM", + 'PN': "PN", + 'PR': "PR", + 'PS': "PS", + 'PT': "PT", + 'PW': "PW", + 'PY': "PY", + 'QA': "QA", + 'RE': "RE", + 'RO': "RO", + 'RS': "RS", + 'RU': "RU", + 'RW': "RW", + 'SA': "SA", + 'SB': "SB", + 'SC': "SC", + 'SD': "SD", + 'SE': "SE", + 'SG': "SG", + 'SH': "SH", + 'SI': "SI", + 'SJ': "SJ", + 'SK': "SK", + 'SL': "SL", + 'SM': "SM", + 'SN': "SN", + 'SO': "SO", + 'SR': "SR", + 'SS': "SS", + 'ST': "ST", + 'SV': "SV", + 'SX': "SX", + 'SY': "SY", + 'SZ': "SZ", + 'TC': "TC", + 'TD': "TD", + 'TF': "TF", + 'TG': "TG", + 'TH': "TH", + 'TJ': "TJ", + 'TK': "TK", + 'TL': "TL", + 'TM': "TM", + 'TN': "TN", + 'TO': "TO", + 'TR': "TR", + 'TT': "TT", + 'TV': "TV", + 'TW': "TW", + 'TZ': "TZ", + 'UA': "UA", + 'UG': "UG", + 'UM': "UM", + 'US': "US", + 'UY': "UY", + 'UZ': "UZ", + 'VA': "VA", + 'VC': "VC", + 'VE': "VE", + 'VG': "VG", + 'VI': "VI", + 'VN': "VN", + 'VU': "VU", + 'WF': "WF", + 'WS': "WS", + 'YE': "YE", + 'YT': "YT", + 'ZA': "ZA", + 'ZM': "ZM", + 'ZW': "ZW", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AdCountry - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Country ID from ISO 3166-1 alpha-2.., must be one of ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW", ] # noqa: E501 + + Keyword Args: + value (str): Country ID from ISO 3166-1 alpha-2.., must be one of ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AdCountry - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Country ID from ISO 3166-1 alpha-2.., must be one of ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW", ] # noqa: E501 + + Keyword Args: + value (str): Country ID from ISO 3166-1 alpha-2.., must be one of ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/ad_create_request.py b/openapi_generated/pinterest_client/model/ad_create_request.py index b40c983..c0f379e 100644 --- a/openapi_generated/pinterest_client/model/ad_create_request.py +++ b/openapi_generated/pinterest_client/model/ad_create_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -35,11 +35,15 @@ def lazy_import(): from openapi_generated.pinterest_client.model.ad_pin_id import AdPinId from openapi_generated.pinterest_client.model.creative_type import CreativeType from openapi_generated.pinterest_client.model.entity_status import EntityStatus + from openapi_generated.pinterest_client.model.grid_click_type import GridClickType + from openapi_generated.pinterest_client.model.quiz_pin_data import QuizPinData from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls globals()['AdCommon'] = AdCommon globals()['AdPinId'] = AdPinId globals()['CreativeType'] = CreativeType globals()['EntityStatus'] = EntityStatus + globals()['GridClickType'] = GridClickType + globals()['QuizPinData'] = QuizPinData globals()['TrackingUrls'] = TrackingUrls @@ -68,6 +72,28 @@ class AdCreateRequest(ModelComposed): """ allowed_values = { + ('customizable_cta_type',): { + 'None': None, + 'GET_OFFER': "GET_OFFER", + 'LEARN_MORE': "LEARN_MORE", + 'ORDER_NOW': "ORDER_NOW", + 'SHOP_NOW': "SHOP_NOW", + 'SIGN_UP': "SIGN_UP", + 'SUBSCRIBE': "SUBSCRIBE", + 'BUY_NOW': "BUY_NOW", + 'CONTACT_US': "CONTACT_US", + 'GET_QUOTE': "GET_QUOTE", + 'VISIT_SITE': "VISIT_SITE", + 'APPLY_NOW': "APPLY_NOW", + 'BOOK_NOW': "BOOK_NOW", + 'REQUEST_DEMO': "REQUEST_DEMO", + 'REGISTER_NOW': "REGISTER_NOW", + 'FIND_A_DEALER': "FIND_A_DEALER", + 'ADD_TO_CART': "ADD_TO_CART", + 'WATCH_NOW': "WATCH_NOW", + 'READ_MORE': "READ_MORE", + 'NULL': "null", + }, } validations = { @@ -81,6 +107,11 @@ class AdCreateRequest(ModelComposed): 'pattern': r'^\d+$', # noqa: E501 }, }, + ('lead_form_id',): { + 'regex': { + 'pattern': r'^(AG)?\d+$', # noqa: E501 + }, + }, } @cached_property @@ -122,6 +153,10 @@ def openapi_types(): 'status': (EntityStatus,), # noqa: E501 'tracking_urls': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'view_tracking_url': (str, none_type,), # noqa: E501 + 'lead_form_id': (str, none_type,), # noqa: E501 + 'grid_click_type': (GridClickType,), # noqa: E501 + 'customizable_cta_type': (str, none_type,), # noqa: E501 + 'quiz_pin_data': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 } @cached_property @@ -146,6 +181,10 @@ def discriminator(): 'status': 'status', # noqa: E501 'tracking_urls': 'tracking_urls', # noqa: E501 'view_tracking_url': 'view_tracking_url', # noqa: E501 + 'lead_form_id': 'lead_form_id', # noqa: E501 + 'grid_click_type': 'grid_click_type', # noqa: E501 + 'customizable_cta_type': 'customizable_cta_type', # noqa: E501 + 'quiz_pin_data': 'quiz_pin_data', # noqa: E501 } read_only_vars = { @@ -190,19 +229,23 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - android_deep_link (str, none_type): Deep link URL for Android devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + android_deep_link (str, none_type): Deep link URL for Android devices.. [optional] # noqa: E501 carousel_android_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on Android.. [optional] # noqa: E501 carousel_destination_urls ([str], none_type): Comma-separated destination URLs for the carousel pin to promote.. [optional] # noqa: E501 carousel_ios_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on iOS.. [optional] # noqa: E501 click_tracking_url (str, none_type): Tracking url for the ad clicks.. [optional] # noqa: E501 destination_url (str, none_type): Destination URL.. [optional] # noqa: E501 - ios_deep_link (str, none_type): Deep link URL for iOS devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + ios_deep_link (str, none_type): Deep link URL for iOS devices.. [optional] # noqa: E501 is_pin_deleted (bool): Is original pin deleted?. [optional] # noqa: E501 is_removable (bool): Is pin repinnable?. [optional] # noqa: E501 name (str, none_type): Name of the ad - 255 chars max.. [optional] # noqa: E501 status (EntityStatus): [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 view_tracking_url (str, none_type): Tracking URL for ad impressions.. [optional] # noqa: E501 + lead_form_id (str, none_type): Lead form ID for lead ad generation.. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + customizable_cta_type (str, none_type): Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only). [optional] # noqa: E501 + quiz_pin_data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -305,19 +348,23 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - android_deep_link (str, none_type): Deep link URL for Android devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + android_deep_link (str, none_type): Deep link URL for Android devices.. [optional] # noqa: E501 carousel_android_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on Android.. [optional] # noqa: E501 carousel_destination_urls ([str], none_type): Comma-separated destination URLs for the carousel pin to promote.. [optional] # noqa: E501 carousel_ios_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on iOS.. [optional] # noqa: E501 click_tracking_url (str, none_type): Tracking url for the ad clicks.. [optional] # noqa: E501 destination_url (str, none_type): Destination URL.. [optional] # noqa: E501 - ios_deep_link (str, none_type): Deep link URL for iOS devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + ios_deep_link (str, none_type): Deep link URL for iOS devices.. [optional] # noqa: E501 is_pin_deleted (bool): Is original pin deleted?. [optional] # noqa: E501 is_removable (bool): Is pin repinnable?. [optional] # noqa: E501 name (str, none_type): Name of the ad - 255 chars max.. [optional] # noqa: E501 status (EntityStatus): [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 view_tracking_url (str, none_type): Tracking URL for ad impressions.. [optional] # noqa: E501 + lead_form_id (str, none_type): Lead form ID for lead ad generation.. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + customizable_cta_type (str, none_type): Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only). [optional] # noqa: E501 + quiz_pin_data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/ad_group_array_response.py b/openapi_generated/pinterest_client/model/ad_group_array_response.py index a2ded3c..3e1099b 100644 --- a/openapi_generated/pinterest_client/model/ad_group_array_response.py +++ b/openapi_generated/pinterest_client/model/ad_group_array_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_group_array_response_element.py b/openapi_generated/pinterest_client/model/ad_group_array_response_element.py index 2272e9a..650a27e 100644 --- a/openapi_generated/pinterest_client/model/ad_group_array_response_element.py +++ b/openapi_generated/pinterest_client/model/ad_group_array_response_element.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_group_audience_sizing_request.py b/openapi_generated/pinterest_client/model/ad_group_audience_sizing_request.py new file mode 100644 index 0000000..86c42d6 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_group_audience_sizing_request.py @@ -0,0 +1,297 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.ad_group_audience_sizing_request_keywords import AdGroupAudienceSizingRequestKeywords + from openapi_generated.pinterest_client.model.placement_group_type import PlacementGroupType + from openapi_generated.pinterest_client.model.targeting_spec import TargetingSpec + globals()['AdGroupAudienceSizingRequestKeywords'] = AdGroupAudienceSizingRequestKeywords + globals()['PlacementGroupType'] = PlacementGroupType + globals()['TargetingSpec'] = TargetingSpec + + +class AdGroupAudienceSizingRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('creative_types',): { + 'None': None, + 'REGULAR': "REGULAR", + 'VIDEO': "VIDEO", + 'SHOPPING': "SHOPPING", + 'CAROUSEL': "CAROUSEL", + 'MAX_VIDEO': "MAX_VIDEO", + 'SHOP_THE_PIN': "SHOP_THE_PIN", + 'COLLECTION': "COLLECTION", + 'IDEA': "IDEA", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'auto_targeting_enabled': (bool,), # noqa: E501 + 'placement_group': (str,), # noqa: E501 + 'creative_types': ([str], none_type,), # noqa: E501 + 'targeting_spec': (TargetingSpec,), # noqa: E501 + 'product_group_ids': ([str], none_type,), # noqa: E501 + 'keywords': ([AdGroupAudienceSizingRequestKeywords], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'auto_targeting_enabled': 'auto_targeting_enabled', # noqa: E501 + 'placement_group': 'placement_group', # noqa: E501 + 'creative_types': 'creative_types', # noqa: E501 + 'targeting_spec': 'targeting_spec', # noqa: E501 + 'product_group_ids': 'product_group_ids', # noqa: E501 + 'keywords': 'keywords', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdGroupAudienceSizingRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + auto_targeting_enabled (bool): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] if omitted the server will use the default value of True # noqa: E501 + placement_group (str): Placement group.. [optional] if omitted the server will use the default value of "ALL" # noqa: E501 + creative_types ([str], none_type): Pin creative types filter.

Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.. [optional] # noqa: E501 + targeting_spec (TargetingSpec): [optional] # noqa: E501 + product_group_ids ([str], none_type): Targeted product group IDs.

Note: This can only be combined with shopping/catalog sales campaigns. For more information, click here. SHOPPING_RETARGETING must be included in targeting_spec object or this field will be ignored.. [optional] # noqa: E501 + keywords ([AdGroupAudienceSizingRequestKeywords], none_type): Array of keyword objects. If the keywords field is missing, all keywords will be targeted.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdGroupAudienceSizingRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + auto_targeting_enabled (bool): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] if omitted the server will use the default value of True # noqa: E501 + placement_group (str): Placement group.. [optional] if omitted the server will use the default value of "ALL" # noqa: E501 + creative_types ([str], none_type): Pin creative types filter.

Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.. [optional] # noqa: E501 + targeting_spec (TargetingSpec): [optional] # noqa: E501 + product_group_ids ([str], none_type): Targeted product group IDs.

Note: This can only be combined with shopping/catalog sales campaigns. For more information, click here. SHOPPING_RETARGETING must be included in targeting_spec object or this field will be ignored.. [optional] # noqa: E501 + keywords ([AdGroupAudienceSizingRequestKeywords], none_type): Array of keyword objects. If the keywords field is missing, all keywords will be targeted.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ad_group_audience_sizing_request_keywords.py b/openapi_generated/pinterest_client/model/ad_group_audience_sizing_request_keywords.py new file mode 100644 index 0000000..505d15c --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_group_audience_sizing_request_keywords.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.match_type_response import MatchTypeResponse + globals()['MatchTypeResponse'] = MatchTypeResponse + + +class AdGroupAudienceSizingRequestKeywords(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'match_type': (MatchTypeResponse,), # noqa: E501 + 'value': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'match_type': 'match_type', # noqa: E501 + 'value': 'value', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, match_type, value, *args, **kwargs): # noqa: E501 + """AdGroupAudienceSizingRequestKeywords - a model defined in OpenAPI + + Args: + match_type (MatchTypeResponse): + value (str): Keyword value (120 chars max). + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.match_type = match_type + self.value = value + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, match_type, value, *args, **kwargs): # noqa: E501 + """AdGroupAudienceSizingRequestKeywords - a model defined in OpenAPI + + Args: + match_type (MatchTypeResponse): + value (str): Keyword value (120 chars max). + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.match_type = match_type + self.value = value + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ad_group_audience_sizing_response.py b/openapi_generated/pinterest_client/model/ad_group_audience_sizing_response.py new file mode 100644 index 0000000..120c0e4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_group_audience_sizing_response.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdGroupAudienceSizingResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'audience_size_lower_bound': (float,), # noqa: E501 + 'audience_size_upper_bound': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audience_size_lower_bound': 'audience_size_lower_bound', # noqa: E501 + 'audience_size_upper_bound': 'audience_size_upper_bound', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdGroupAudienceSizingResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + audience_size_lower_bound (float): The lower confidence bound of the estimated potential audience size. \"Potential audience size\" estimates the number of people you may be able to reach per month with your campaign. It is based on historical advertising data and the targeting criteria you select. It does not guarantee results or take into account factors such as bid, budget, schedule, seasonality or product experiments.. [optional] # noqa: E501 + audience_size_upper_bound (float): The upper confidence bound of the estimated potential audience size. \"Potential audience size\" estimates the number of people you may be able to reach per month with your campaign. It is based on historical advertising data and the targeting criteria you select. It does not guarantee results or take into account factors such as bid, budget, schedule, seasonality or product experiments.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdGroupAudienceSizingResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + audience_size_lower_bound (float): The lower confidence bound of the estimated potential audience size. \"Potential audience size\" estimates the number of people you may be able to reach per month with your campaign. It is based on historical advertising data and the targeting criteria you select. It does not guarantee results or take into account factors such as bid, budget, schedule, seasonality or product experiments.. [optional] # noqa: E501 + audience_size_upper_bound (float): The upper confidence bound of the estimated potential audience size. \"Potential audience size\" estimates the number of people you may be able to reach per month with your campaign. It is based on historical advertising data and the targeting criteria you select. It does not guarantee results or take into account factors such as bid, budget, schedule, seasonality or product experiments.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ad_group_common.py b/openapi_generated/pinterest_client/model/ad_group_common.py index 35374d5..83037a2 100644 --- a/openapi_generated/pinterest_client/model/ad_group_common.py +++ b/openapi_generated/pinterest_client/model/ad_group_common.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -89,6 +89,9 @@ class AdGroupCommon(ModelNormal): 'pattern': r'^[C]?\d+$', # noqa: E501 }, }, + ('targeting_template_ids',): { + 'max_items': 1, + }, } @cached_property @@ -131,6 +134,7 @@ def openapi_types(): 'campaign_id': (str,), # noqa: E501 'billable_event': (ActionType,), # noqa: E501 'bid_strategy_type': (str, none_type,), # noqa: E501 + 'targeting_template_ids': ([str], none_type,), # noqa: E501 } @cached_property @@ -156,6 +160,7 @@ def discriminator(): 'campaign_id': 'campaign_id', # noqa: E501 'billable_event': 'billable_event', # noqa: E501 'bid_strategy_type': 'bid_strategy_type', # noqa: E501 + 'targeting_template_ids': 'targeting_template_ids', # noqa: E501 } read_only_vars = { @@ -208,14 +213,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 start_time (int, none_type): Ad group start time. Unix timestamp in seconds. Defaults to current time.. [optional] # noqa: E501 end_time (int, none_type): Ad group end time. Unix timestamp in seconds.. [optional] # noqa: E501 targeting_spec (TargetingSpec): [optional] # noqa: E501 - lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 - tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 + lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 + tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 auto_targeting_enabled (bool, none_type): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] # noqa: E501 - placement_group (str): Placement group.. [optional] # noqa: E501 + placement_group (str): Placement group.. [optional] # noqa: E501 pacing_delivery_type (str): [optional] # noqa: E501 campaign_id (str): Campaign ID of the ad group.. [optional] # noqa: E501 billable_event (ActionType): [optional] # noqa: E501 - bid_strategy_type (str, none_type): Bid strategy type. [optional] # noqa: E501 + bid_strategy_type (str, none_type): Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID.. [optional] # noqa: E501 + targeting_template_ids ([str], none_type): Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0'].. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -306,14 +312,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 start_time (int, none_type): Ad group start time. Unix timestamp in seconds. Defaults to current time.. [optional] # noqa: E501 end_time (int, none_type): Ad group end time. Unix timestamp in seconds.. [optional] # noqa: E501 targeting_spec (TargetingSpec): [optional] # noqa: E501 - lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 - tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 + lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 + tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 auto_targeting_enabled (bool, none_type): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] # noqa: E501 - placement_group (str): Placement group.. [optional] # noqa: E501 + placement_group (str): Placement group.. [optional] # noqa: E501 pacing_delivery_type (str): [optional] # noqa: E501 campaign_id (str): Campaign ID of the ad group.. [optional] # noqa: E501 billable_event (ActionType): [optional] # noqa: E501 - bid_strategy_type (str, none_type): Bid strategy type. [optional] # noqa: E501 + bid_strategy_type (str, none_type): Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID.. [optional] # noqa: E501 + targeting_template_ids ([str], none_type): Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0'].. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/ad_group_create_request.py b/openapi_generated/pinterest_client/model/ad_group_create_request.py index ee71f44..50be24c 100644 --- a/openapi_generated/pinterest_client/model/ad_group_create_request.py +++ b/openapi_generated/pinterest_client/model/ad_group_create_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -93,6 +93,9 @@ class AdGroupCreateRequest(ModelComposed): 'pattern': r'^[C]?\d+$', # noqa: E501 }, }, + ('targeting_template_ids',): { + 'max_items': 1, + }, } @cached_property @@ -135,6 +138,7 @@ def openapi_types(): 'placement_group': (str,), # noqa: E501 'pacing_delivery_type': (str,), # noqa: E501 'bid_strategy_type': (str, none_type,), # noqa: E501 + 'targeting_template_ids': ([str], none_type,), # noqa: E501 } @cached_property @@ -160,6 +164,7 @@ def discriminator(): 'placement_group': 'placement_group', # noqa: E501 'pacing_delivery_type': 'pacing_delivery_type', # noqa: E501 'bid_strategy_type': 'bid_strategy_type', # noqa: E501 + 'targeting_template_ids': 'targeting_template_ids', # noqa: E501 } read_only_vars = { @@ -212,12 +217,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 start_time (int, none_type): Ad group start time. Unix timestamp in seconds. Defaults to current time.. [optional] # noqa: E501 end_time (int, none_type): Ad group end time. Unix timestamp in seconds.. [optional] # noqa: E501 targeting_spec (TargetingSpec): [optional] # noqa: E501 - lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 - tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 - auto_targeting_enabled (bool): [optional] if omitted the server will use the default value of True # noqa: E501 - placement_group (str): Placement group.. [optional] # noqa: E501 + lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 + tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 + auto_targeting_enabled (bool): [optional] # noqa: E501 + placement_group (str): Placement group.. [optional] # noqa: E501 pacing_delivery_type (str): [optional] if omitted the server will use the default value of "STANDARD" # noqa: E501 - bid_strategy_type (str, none_type): Bid strategy type. [optional] # noqa: E501 + bid_strategy_type (str, none_type): Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID.. [optional] # noqa: E501 + targeting_template_ids ([str], none_type): Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0'].. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -328,12 +334,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 start_time (int, none_type): Ad group start time. Unix timestamp in seconds. Defaults to current time.. [optional] # noqa: E501 end_time (int, none_type): Ad group end time. Unix timestamp in seconds.. [optional] # noqa: E501 targeting_spec (TargetingSpec): [optional] # noqa: E501 - lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 - tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 - auto_targeting_enabled (bool): [optional] if omitted the server will use the default value of True # noqa: E501 - placement_group (str): Placement group.. [optional] # noqa: E501 + lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 + tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 + auto_targeting_enabled (bool): [optional] # noqa: E501 + placement_group (str): Placement group.. [optional] # noqa: E501 pacing_delivery_type (str): [optional] if omitted the server will use the default value of "STANDARD" # noqa: E501 - bid_strategy_type (str, none_type): Bid strategy type. [optional] # noqa: E501 + bid_strategy_type (str, none_type): Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID.. [optional] # noqa: E501 + targeting_template_ids ([str], none_type): Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0'].. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/ad_group_create_request_all_of.py b/openapi_generated/pinterest_client/model/ad_group_create_request_all_of.py index 87c28f9..6cb67cf 100644 --- a/openapi_generated/pinterest_client/model/ad_group_create_request_all_of.py +++ b/openapi_generated/pinterest_client/model/ad_group_create_request_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -148,7 +148,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) pacing_delivery_type (str): [optional] if omitted the server will use the default value of "STANDARD" # noqa: E501 - auto_targeting_enabled (bool): [optional] if omitted the server will use the default value of True # noqa: E501 + auto_targeting_enabled (bool): [optional] # noqa: E501 budget_type (str): [optional] if omitted the server will use the default value of "DAILY" # noqa: E501 """ @@ -232,7 +232,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) pacing_delivery_type (str): [optional] if omitted the server will use the default value of "STANDARD" # noqa: E501 - auto_targeting_enabled (bool): [optional] if omitted the server will use the default value of True # noqa: E501 + auto_targeting_enabled (bool): [optional] # noqa: E501 budget_type (str): [optional] if omitted the server will use the default value of "DAILY" # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/ad_group_response.py b/openapi_generated/pinterest_client/model/ad_group_response.py index b2eabf1..e0e2654 100644 --- a/openapi_generated/pinterest_client/model/ad_group_response.py +++ b/openapi_generated/pinterest_client/model/ad_group_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -101,6 +101,9 @@ class AdGroupResponse(ModelComposed): 'pattern': r'^[C]?\d+$', # noqa: E501 }, }, + ('targeting_template_ids',): { + 'max_items': 1, + }, ('id',): { 'regex': { 'pattern': r'^\d+$', # noqa: E501 @@ -153,6 +156,7 @@ def openapi_types(): 'campaign_id': (str,), # noqa: E501 'billable_event': (ActionType,), # noqa: E501 'bid_strategy_type': (str, none_type,), # noqa: E501 + 'targeting_template_ids': ([str], none_type,), # noqa: E501 'id': (str,), # noqa: E501 'ad_account_id': (str,), # noqa: E501 'created_time': (int,), # noqa: E501 @@ -187,6 +191,7 @@ def discriminator(): 'campaign_id': 'campaign_id', # noqa: E501 'billable_event': 'billable_event', # noqa: E501 'bid_strategy_type': 'bid_strategy_type', # noqa: E501 + 'targeting_template_ids': 'targeting_template_ids', # noqa: E501 'id': 'id', # noqa: E501 'ad_account_id': 'ad_account_id', # noqa: E501 'created_time': 'created_time', # noqa: E501 @@ -246,14 +251,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 start_time (int, none_type): Ad group start time. Unix timestamp in seconds. Defaults to current time.. [optional] # noqa: E501 end_time (int, none_type): Ad group end time. Unix timestamp in seconds.. [optional] # noqa: E501 targeting_spec (TargetingSpec): [optional] # noqa: E501 - lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 - tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 + lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 + tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 auto_targeting_enabled (bool, none_type): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] # noqa: E501 - placement_group (str): Placement group.. [optional] # noqa: E501 + placement_group (str): Placement group.. [optional] # noqa: E501 pacing_delivery_type (str): [optional] # noqa: E501 campaign_id (str): Campaign ID of the ad group.. [optional] # noqa: E501 billable_event (ActionType): [optional] # noqa: E501 - bid_strategy_type (str, none_type): Bid strategy type. [optional] # noqa: E501 + bid_strategy_type (str, none_type): Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID.. [optional] # noqa: E501 + targeting_template_ids ([str], none_type): Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0'].. [optional] # noqa: E501 id (str): Ad group ID.. [optional] # noqa: E501 ad_account_id (str): Advertiser ID.. [optional] # noqa: E501 created_time (int): Ad group creation time. Unix timestamp in seconds.. [optional] # noqa: E501 @@ -371,14 +377,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 start_time (int, none_type): Ad group start time. Unix timestamp in seconds. Defaults to current time.. [optional] # noqa: E501 end_time (int, none_type): Ad group end time. Unix timestamp in seconds.. [optional] # noqa: E501 targeting_spec (TargetingSpec): [optional] # noqa: E501 - lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 - tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 + lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 + tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 auto_targeting_enabled (bool, none_type): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] # noqa: E501 - placement_group (str): Placement group.. [optional] # noqa: E501 + placement_group (str): Placement group.. [optional] # noqa: E501 pacing_delivery_type (str): [optional] # noqa: E501 campaign_id (str): Campaign ID of the ad group.. [optional] # noqa: E501 billable_event (ActionType): [optional] # noqa: E501 - bid_strategy_type (str, none_type): Bid strategy type. [optional] # noqa: E501 + bid_strategy_type (str, none_type): Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID.. [optional] # noqa: E501 + targeting_template_ids ([str], none_type): Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0'].. [optional] # noqa: E501 id (str): Ad group ID.. [optional] # noqa: E501 ad_account_id (str): Advertiser ID.. [optional] # noqa: E501 created_time (int): Ad group creation time. Unix timestamp in seconds.. [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/ad_group_response_all_of.py b/openapi_generated/pinterest_client/model/ad_group_response_all_of.py index 58831e2..a3ff6be 100644 --- a/openapi_generated/pinterest_client/model/ad_group_response_all_of.py +++ b/openapi_generated/pinterest_client/model/ad_group_response_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_group_summary_status.py b/openapi_generated/pinterest_client/model/ad_group_summary_status.py index 156edce..f29cf55 100644 --- a/openapi_generated/pinterest_client/model/ad_group_summary_status.py +++ b/openapi_generated/pinterest_client/model/ad_group_summary_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -59,6 +59,8 @@ class AdGroupSummaryStatus(ModelSimple): 'COMPLETED': "COMPLETED", 'ADVERTISER_DISABLED': "ADVERTISER_DISABLED", 'ARCHIVED': "ARCHIVED", + 'DRAFT': "DRAFT", + 'DELETED_DRAFT': "DELETED_DRAFT", }, } @@ -110,10 +112,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Summary status for ad group., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + args[0] (str): Summary status for ad group., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 Keyword Args: - value (str): Summary status for ad group., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + value (str): Summary status for ad group., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -200,10 +202,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Summary status for ad group., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + args[0] (str): Summary status for ad group., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 Keyword Args: - value (str): Summary status for ad group., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + value (str): Summary status for ad group., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/ad_group_update_request.py b/openapi_generated/pinterest_client/model/ad_group_update_request.py index 9a22e72..3fcac69 100644 --- a/openapi_generated/pinterest_client/model/ad_group_update_request.py +++ b/openapi_generated/pinterest_client/model/ad_group_update_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -98,6 +98,9 @@ class AdGroupUpdateRequest(ModelComposed): 'pattern': r'^[C]?\d+$', # noqa: E501 }, }, + ('targeting_template_ids',): { + 'max_items': 1, + }, } @cached_property @@ -141,6 +144,7 @@ def openapi_types(): 'campaign_id': (str,), # noqa: E501 'billable_event': (ActionType,), # noqa: E501 'bid_strategy_type': (str, none_type,), # noqa: E501 + 'targeting_template_ids': ([str], none_type,), # noqa: E501 } @cached_property @@ -167,6 +171,7 @@ def discriminator(): 'campaign_id': 'campaign_id', # noqa: E501 'billable_event': 'billable_event', # noqa: E501 'bid_strategy_type': 'bid_strategy_type', # noqa: E501 + 'targeting_template_ids': 'targeting_template_ids', # noqa: E501 } read_only_vars = { @@ -218,14 +223,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 start_time (int, none_type): Ad group start time. Unix timestamp in seconds. Defaults to current time.. [optional] # noqa: E501 end_time (int, none_type): Ad group end time. Unix timestamp in seconds.. [optional] # noqa: E501 targeting_spec (TargetingSpec): [optional] # noqa: E501 - lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 - tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 + lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 + tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 auto_targeting_enabled (bool, none_type): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] # noqa: E501 - placement_group (str): Placement group.. [optional] # noqa: E501 + placement_group (str): Placement group.. [optional] # noqa: E501 pacing_delivery_type (str): [optional] # noqa: E501 campaign_id (str): Campaign ID of the ad group.. [optional] # noqa: E501 billable_event (ActionType): [optional] # noqa: E501 - bid_strategy_type (str, none_type): Bid strategy type. [optional] # noqa: E501 + bid_strategy_type (str, none_type): Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID.. [optional] # noqa: E501 + targeting_template_ids ([str], none_type): Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0'].. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -335,14 +341,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 start_time (int, none_type): Ad group start time. Unix timestamp in seconds. Defaults to current time.. [optional] # noqa: E501 end_time (int, none_type): Ad group end time. Unix timestamp in seconds.. [optional] # noqa: E501 targeting_spec (TargetingSpec): [optional] # noqa: E501 - lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 - tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 + lifetime_frequency_cap (int): Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field **REQUIRES** the `end_time` field.. [optional] # noqa: E501 + tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Third-party tracking URLs.
JSON object with the format: {\"Tracking event enum\":[URL string array],...}
For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.

For more information, see Third-party and dynamic tracking.. [optional] # noqa: E501 auto_targeting_enabled (bool, none_type): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] # noqa: E501 - placement_group (str): Placement group.. [optional] # noqa: E501 + placement_group (str): Placement group.. [optional] # noqa: E501 pacing_delivery_type (str): [optional] # noqa: E501 campaign_id (str): Campaign ID of the ad group.. [optional] # noqa: E501 billable_event (ActionType): [optional] # noqa: E501 - bid_strategy_type (str, none_type): Bid strategy type. [optional] # noqa: E501 + bid_strategy_type (str, none_type): Bid strategy type. For Campaigns with Video Completion objectives, the only supported bid strategy type is AUTOMATIC_BID.. [optional] # noqa: E501 + targeting_template_ids ([str], none_type): Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0'].. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/ad_group_update_request_all_of.py b/openapi_generated/pinterest_client/model/ad_group_update_request_all_of.py index 99d6af6..b6aa564 100644 --- a/openapi_generated/pinterest_client/model/ad_group_update_request_all_of.py +++ b/openapi_generated/pinterest_client/model/ad_group_update_request_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_groups_analytics_response.py b/openapi_generated/pinterest_client/model/ad_groups_analytics_response.py index f751bb0..e7c268c 100644 --- a/openapi_generated/pinterest_client/model/ad_groups_analytics_response.py +++ b/openapi_generated/pinterest_client/model/ad_groups_analytics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_pin_id.py b/openapi_generated/pinterest_client/model/ad_pin_id.py index 7b6b034..d88f93a 100644 --- a/openapi_generated/pinterest_client/model/ad_pin_id.py +++ b/openapi_generated/pinterest_client/model/ad_pin_id.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_preview_create_from_image.py b/openapi_generated/pinterest_client/model/ad_preview_create_from_image.py index 5619236..1e90312 100644 --- a/openapi_generated/pinterest_client/model/ad_preview_create_from_image.py +++ b/openapi_generated/pinterest_client/model/ad_preview_create_from_image.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_preview_create_from_pin.py b/openapi_generated/pinterest_client/model/ad_preview_create_from_pin.py index 1e7a495..cc5ca98 100644 --- a/openapi_generated/pinterest_client/model/ad_preview_create_from_pin.py +++ b/openapi_generated/pinterest_client/model/ad_preview_create_from_pin.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_preview_request.py b/openapi_generated/pinterest_client/model/ad_preview_request.py index ec36c8a..a713521 100644 --- a/openapi_generated/pinterest_client/model/ad_preview_request.py +++ b/openapi_generated/pinterest_client/model/ad_preview_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_preview_url_response.py b/openapi_generated/pinterest_client/model/ad_preview_url_response.py index 95ec15d..abc0eeb 100644 --- a/openapi_generated/pinterest_client/model/ad_preview_url_response.py +++ b/openapi_generated/pinterest_client/model/ad_preview_url_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -135,7 +135,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - url (str): 'Preview URL, expires in 24 hours. Can be used in an iframe. For example: https://ads.pinterest.com/ad-preview/74667c814dd2b19/ The preview object ID/key is the last param - 74667c814dd2b19'. [optional] # noqa: E501 + url (str): 'Preview URL, expires in 7 days. Can be used in an iframe. For example: https://ads.pinterest.com/ad-preview/74667c814dd2b19/ The preview object ID/key is the last param - 74667c814dd2b19'. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -217,7 +217,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - url (str): 'Preview URL, expires in 24 hours. Can be used in an iframe. For example: https://ads.pinterest.com/ad-preview/74667c814dd2b19/ The preview object ID/key is the last param - 74667c814dd2b19'. [optional] # noqa: E501 + url (str): 'Preview URL, expires in 7 days. Can be used in an iframe. For example: https://ads.pinterest.com/ad-preview/74667c814dd2b19/ The preview object ID/key is the last param - 74667c814dd2b19'. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/ad_response.py b/openapi_generated/pinterest_client/model/ad_response.py index c80eaf4..ae893d8 100644 --- a/openapi_generated/pinterest_client/model/ad_response.py +++ b/openapi_generated/pinterest_client/model/ad_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -36,14 +36,18 @@ def lazy_import(): from openapi_generated.pinterest_client.model.ad_response_all_of import AdResponseAllOf from openapi_generated.pinterest_client.model.creative_type import CreativeType from openapi_generated.pinterest_client.model.entity_status import EntityStatus + from openapi_generated.pinterest_client.model.grid_click_type import GridClickType from openapi_generated.pinterest_client.model.pin_promotion_summary_status import PinPromotionSummaryStatus + from openapi_generated.pinterest_client.model.quiz_pin_data import QuizPinData from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls globals()['AdCommon'] = AdCommon globals()['AdPinId'] = AdPinId globals()['AdResponseAllOf'] = AdResponseAllOf globals()['CreativeType'] = CreativeType globals()['EntityStatus'] = EntityStatus + globals()['GridClickType'] = GridClickType globals()['PinPromotionSummaryStatus'] = PinPromotionSummaryStatus + globals()['QuizPinData'] = QuizPinData globals()['TrackingUrls'] = TrackingUrls @@ -72,6 +76,28 @@ class AdResponse(ModelComposed): """ allowed_values = { + ('customizable_cta_type',): { + 'None': None, + 'GET_OFFER': "GET_OFFER", + 'LEARN_MORE': "LEARN_MORE", + 'ORDER_NOW': "ORDER_NOW", + 'SHOP_NOW': "SHOP_NOW", + 'SIGN_UP': "SIGN_UP", + 'SUBSCRIBE': "SUBSCRIBE", + 'BUY_NOW': "BUY_NOW", + 'CONTACT_US': "CONTACT_US", + 'GET_QUOTE': "GET_QUOTE", + 'VISIT_SITE': "VISIT_SITE", + 'APPLY_NOW': "APPLY_NOW", + 'BOOK_NOW': "BOOK_NOW", + 'REQUEST_DEMO': "REQUEST_DEMO", + 'REGISTER_NOW': "REGISTER_NOW", + 'FIND_A_DEALER': "FIND_A_DEALER", + 'ADD_TO_CART': "ADD_TO_CART", + 'WATCH_NOW': "WATCH_NOW", + 'READ_MORE': "READ_MORE", + 'NULL': "null", + }, ('rejected_reasons',): { 'HASHTAGS': "HASHTAGS", 'PROMOTIONS_AND_PRICES': "PROMOTIONS_AND_PRICES", @@ -136,6 +162,11 @@ class AdResponse(ModelComposed): 'pattern': r'^(AG)?\d+$', # noqa: E501 }, }, + ('lead_form_id',): { + 'regex': { + 'pattern': r'^(AG)?\d+$', # noqa: E501 + }, + }, ('pin_id',): { 'regex': { 'pattern': r'^\d+$', # noqa: E501 @@ -196,6 +227,10 @@ def openapi_types(): 'status': (EntityStatus,), # noqa: E501 'tracking_urls': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'view_tracking_url': (str, none_type,), # noqa: E501 + 'lead_form_id': (str, none_type,), # noqa: E501 + 'grid_click_type': (GridClickType,), # noqa: E501 + 'customizable_cta_type': (str, none_type,), # noqa: E501 + 'quiz_pin_data': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'pin_id': (str,), # noqa: E501 'ad_account_id': (str,), # noqa: E501 'campaign_id': (str,), # noqa: E501 @@ -231,6 +266,10 @@ def discriminator(): 'status': 'status', # noqa: E501 'tracking_urls': 'tracking_urls', # noqa: E501 'view_tracking_url': 'view_tracking_url', # noqa: E501 + 'lead_form_id': 'lead_form_id', # noqa: E501 + 'grid_click_type': 'grid_click_type', # noqa: E501 + 'customizable_cta_type': 'customizable_cta_type', # noqa: E501 + 'quiz_pin_data': 'quiz_pin_data', # noqa: E501 'pin_id': 'pin_id', # noqa: E501 'ad_account_id': 'ad_account_id', # noqa: E501 'campaign_id': 'campaign_id', # noqa: E501 @@ -285,20 +324,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) ad_group_id (str): ID of the ad group that contains the ad.. [optional] # noqa: E501 - android_deep_link (str, none_type): Deep link URL for Android devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + android_deep_link (str, none_type): Deep link URL for Android devices.. [optional] # noqa: E501 carousel_android_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on Android.. [optional] # noqa: E501 carousel_destination_urls ([str], none_type): Comma-separated destination URLs for the carousel pin to promote.. [optional] # noqa: E501 carousel_ios_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on iOS.. [optional] # noqa: E501 click_tracking_url (str, none_type): Tracking url for the ad clicks.. [optional] # noqa: E501 creative_type (CreativeType): [optional] # noqa: E501 destination_url (str, none_type): Destination URL.. [optional] # noqa: E501 - ios_deep_link (str, none_type): Deep link URL for iOS devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + ios_deep_link (str, none_type): Deep link URL for iOS devices.. [optional] # noqa: E501 is_pin_deleted (bool): Is original pin deleted?. [optional] # noqa: E501 is_removable (bool): Is pin repinnable?. [optional] # noqa: E501 name (str, none_type): Name of the ad - 255 chars max.. [optional] # noqa: E501 status (EntityStatus): [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 view_tracking_url (str, none_type): Tracking URL for ad impressions.. [optional] # noqa: E501 + lead_form_id (str, none_type): Lead form ID for lead ad generation.. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + customizable_cta_type (str, none_type): Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only). [optional] # noqa: E501 + quiz_pin_data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved.. [optional] # noqa: E501 pin_id (str): Pin ID.. [optional] # noqa: E501 ad_account_id (str): The ID of the advertiser that this ad belongs to.. [optional] # noqa: E501 campaign_id (str): ID of the ad campaign that contains this ad.. [optional] # noqa: E501 @@ -411,20 +454,24 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) ad_group_id (str): ID of the ad group that contains the ad.. [optional] # noqa: E501 - android_deep_link (str, none_type): Deep link URL for Android devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + android_deep_link (str, none_type): Deep link URL for Android devices.. [optional] # noqa: E501 carousel_android_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on Android.. [optional] # noqa: E501 carousel_destination_urls ([str], none_type): Comma-separated destination URLs for the carousel pin to promote.. [optional] # noqa: E501 carousel_ios_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on iOS.. [optional] # noqa: E501 click_tracking_url (str, none_type): Tracking url for the ad clicks.. [optional] # noqa: E501 creative_type (CreativeType): [optional] # noqa: E501 destination_url (str, none_type): Destination URL.. [optional] # noqa: E501 - ios_deep_link (str, none_type): Deep link URL for iOS devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + ios_deep_link (str, none_type): Deep link URL for iOS devices.. [optional] # noqa: E501 is_pin_deleted (bool): Is original pin deleted?. [optional] # noqa: E501 is_removable (bool): Is pin repinnable?. [optional] # noqa: E501 name (str, none_type): Name of the ad - 255 chars max.. [optional] # noqa: E501 status (EntityStatus): [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 view_tracking_url (str, none_type): Tracking URL for ad impressions.. [optional] # noqa: E501 + lead_form_id (str, none_type): Lead form ID for lead ad generation.. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + customizable_cta_type (str, none_type): Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only). [optional] # noqa: E501 + quiz_pin_data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved.. [optional] # noqa: E501 pin_id (str): Pin ID.. [optional] # noqa: E501 ad_account_id (str): The ID of the advertiser that this ad belongs to.. [optional] # noqa: E501 campaign_id (str): ID of the ad campaign that contains this ad.. [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/ad_response_all_of.py b/openapi_generated/pinterest_client/model/ad_response_all_of.py index 3da31a9..fe7297e 100644 --- a/openapi_generated/pinterest_client/model/ad_response_all_of.py +++ b/openapi_generated/pinterest_client/model/ad_response_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ad_update_request.py b/openapi_generated/pinterest_client/model/ad_update_request.py index 8b434c7..dd4145f 100644 --- a/openapi_generated/pinterest_client/model/ad_update_request.py +++ b/openapi_generated/pinterest_client/model/ad_update_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -35,11 +35,15 @@ def lazy_import(): from openapi_generated.pinterest_client.model.ad_update_request1 import AdUpdateRequest1 from openapi_generated.pinterest_client.model.creative_type import CreativeType from openapi_generated.pinterest_client.model.entity_status import EntityStatus + from openapi_generated.pinterest_client.model.grid_click_type import GridClickType + from openapi_generated.pinterest_client.model.quiz_pin_data import QuizPinData from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls globals()['AdCommon'] = AdCommon globals()['AdUpdateRequest1'] = AdUpdateRequest1 globals()['CreativeType'] = CreativeType globals()['EntityStatus'] = EntityStatus + globals()['GridClickType'] = GridClickType + globals()['QuizPinData'] = QuizPinData globals()['TrackingUrls'] = TrackingUrls @@ -68,6 +72,28 @@ class AdUpdateRequest(ModelComposed): """ allowed_values = { + ('customizable_cta_type',): { + 'None': None, + 'GET_OFFER': "GET_OFFER", + 'LEARN_MORE': "LEARN_MORE", + 'ORDER_NOW': "ORDER_NOW", + 'SHOP_NOW': "SHOP_NOW", + 'SIGN_UP': "SIGN_UP", + 'SUBSCRIBE': "SUBSCRIBE", + 'BUY_NOW': "BUY_NOW", + 'CONTACT_US': "CONTACT_US", + 'GET_QUOTE': "GET_QUOTE", + 'VISIT_SITE': "VISIT_SITE", + 'APPLY_NOW': "APPLY_NOW", + 'BOOK_NOW': "BOOK_NOW", + 'REQUEST_DEMO': "REQUEST_DEMO", + 'REGISTER_NOW': "REGISTER_NOW", + 'FIND_A_DEALER': "FIND_A_DEALER", + 'ADD_TO_CART': "ADD_TO_CART", + 'WATCH_NOW': "WATCH_NOW", + 'READ_MORE': "READ_MORE", + 'NULL': "null", + }, } validations = { @@ -81,6 +107,16 @@ class AdUpdateRequest(ModelComposed): 'pattern': r'^(AG)?\d+$', # noqa: E501 }, }, + ('lead_form_id',): { + 'regex': { + 'pattern': r'^(AG)?\d+$', # noqa: E501 + }, + }, + ('pin_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, } @cached_property @@ -122,6 +158,11 @@ def openapi_types(): 'status': (EntityStatus,), # noqa: E501 'tracking_urls': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'view_tracking_url': (str, none_type,), # noqa: E501 + 'lead_form_id': (str, none_type,), # noqa: E501 + 'grid_click_type': (GridClickType,), # noqa: E501 + 'customizable_cta_type': (str, none_type,), # noqa: E501 + 'quiz_pin_data': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'pin_id': (str, none_type,), # noqa: E501 } @cached_property @@ -146,6 +187,11 @@ def discriminator(): 'status': 'status', # noqa: E501 'tracking_urls': 'tracking_urls', # noqa: E501 'view_tracking_url': 'view_tracking_url', # noqa: E501 + 'lead_form_id': 'lead_form_id', # noqa: E501 + 'grid_click_type': 'grid_click_type', # noqa: E501 + 'customizable_cta_type': 'customizable_cta_type', # noqa: E501 + 'quiz_pin_data': 'quiz_pin_data', # noqa: E501 + 'pin_id': 'pin_id', # noqa: E501 } read_only_vars = { @@ -189,20 +235,25 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) ad_group_id (str): ID of the ad group that contains the ad.. [optional] # noqa: E501 - android_deep_link (str, none_type): Deep link URL for Android devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + android_deep_link (str, none_type): Deep link URL for Android devices.. [optional] # noqa: E501 carousel_android_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on Android.. [optional] # noqa: E501 carousel_destination_urls ([str], none_type): Comma-separated destination URLs for the carousel pin to promote.. [optional] # noqa: E501 carousel_ios_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on iOS.. [optional] # noqa: E501 click_tracking_url (str, none_type): Tracking url for the ad clicks.. [optional] # noqa: E501 creative_type (CreativeType): [optional] # noqa: E501 destination_url (str, none_type): Destination URL.. [optional] # noqa: E501 - ios_deep_link (str, none_type): Deep link URL for iOS devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + ios_deep_link (str, none_type): Deep link URL for iOS devices.. [optional] # noqa: E501 is_pin_deleted (bool): Is original pin deleted?. [optional] # noqa: E501 is_removable (bool): Is pin repinnable?. [optional] # noqa: E501 name (str, none_type): Name of the ad - 255 chars max.. [optional] # noqa: E501 status (EntityStatus): [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 view_tracking_url (str, none_type): Tracking URL for ad impressions.. [optional] # noqa: E501 + lead_form_id (str, none_type): Lead form ID for lead ad generation.. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + customizable_cta_type (str, none_type): Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only). [optional] # noqa: E501 + quiz_pin_data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved.. [optional] # noqa: E501 + pin_id (str, none_type): Pin ID. This field may only be updated for draft ads.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -304,20 +355,25 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) ad_group_id (str): ID of the ad group that contains the ad.. [optional] # noqa: E501 - android_deep_link (str, none_type): Deep link URL for Android devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + android_deep_link (str, none_type): Deep link URL for Android devices.. [optional] # noqa: E501 carousel_android_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on Android.. [optional] # noqa: E501 carousel_destination_urls ([str], none_type): Comma-separated destination URLs for the carousel pin to promote.. [optional] # noqa: E501 carousel_ios_deep_links ([str], none_type): Comma-separated deep links for the carousel pin on iOS.. [optional] # noqa: E501 click_tracking_url (str, none_type): Tracking url for the ad clicks.. [optional] # noqa: E501 creative_type (CreativeType): [optional] # noqa: E501 destination_url (str, none_type): Destination URL.. [optional] # noqa: E501 - ios_deep_link (str, none_type): Deep link URL for iOS devices. Not currently available. Using this field will generate an error.. [optional] # noqa: E501 + ios_deep_link (str, none_type): Deep link URL for iOS devices.. [optional] # noqa: E501 is_pin_deleted (bool): Is original pin deleted?. [optional] # noqa: E501 is_removable (bool): Is pin repinnable?. [optional] # noqa: E501 name (str, none_type): Name of the ad - 255 chars max.. [optional] # noqa: E501 status (EntityStatus): [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 view_tracking_url (str, none_type): Tracking URL for ad impressions.. [optional] # noqa: E501 + lead_form_id (str, none_type): Lead form ID for lead ad generation.. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + customizable_cta_type (str, none_type): Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_SITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only). [optional] # noqa: E501 + quiz_pin_data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved.. [optional] # noqa: E501 + pin_id (str, none_type): Pin ID. This field may only be updated for draft ads.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/ad_update_request1.py b/openapi_generated/pinterest_client/model/ad_update_request1.py index 7e1726f..f9295fe 100644 --- a/openapi_generated/pinterest_client/model/ad_update_request1.py +++ b/openapi_generated/pinterest_client/model/ad_update_request1.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -64,6 +64,11 @@ class AdUpdateRequest1(ModelNormal): 'pattern': r'^\d+$', # noqa: E501 }, }, + ('pin_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, } @cached_property @@ -88,6 +93,7 @@ def openapi_types(): """ return { 'id': (str,), # noqa: E501 + 'pin_id': (str, none_type,), # noqa: E501 } @cached_property @@ -97,6 +103,7 @@ def discriminator(): attribute_map = { 'id': 'id', # noqa: E501 + 'pin_id': 'pin_id', # noqa: E501 } read_only_vars = { @@ -143,6 +150,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + pin_id (str, none_type): Pin ID. This field may only be updated for draft ads.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -228,6 +236,7 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + pin_id (str, none_type): Pin ID. This field may only be updated for draft ads.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/ads_analytics_ad_targeting_type.py b/openapi_generated/pinterest_client/model/ads_analytics_ad_targeting_type.py new file mode 100644 index 0000000..ff22714 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ads_analytics_ad_targeting_type.py @@ -0,0 +1,295 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdsAnalyticsAdTargetingType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'KEYWORD': "KEYWORD", + 'APPTYPE': "APPTYPE", + 'GENDER': "GENDER", + 'LOCATION': "LOCATION", + 'PLACEMENT': "PLACEMENT", + 'COUNTRY': "COUNTRY", + 'TARGETED_INTEREST': "TARGETED_INTEREST", + 'PINNER_INTEREST': "PINNER_INTEREST", + 'AUDIENCE_INCLUDE': "AUDIENCE_INCLUDE", + 'GEO': "GEO", + 'AGE_BUCKET': "AGE_BUCKET", + 'REGION': "REGION", + 'QUIZ_RESULT': "QUIZ_RESULT", + 'AGE_BUCKET_AND_GENDER': "AGE_BUCKET_AND_GENDER", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AdsAnalyticsAdTargetingType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Reporting targeting type for ads., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "QUIZ_RESULT", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 + + Keyword Args: + value (str): Reporting targeting type for ads., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "QUIZ_RESULT", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AdsAnalyticsAdTargetingType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Reporting targeting type for ads., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "QUIZ_RESULT", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 + + Keyword Args: + value (str): Reporting targeting type for ads., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "QUIZ_RESULT", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/ads_analytics_campaign_targeting_type.py b/openapi_generated/pinterest_client/model/ads_analytics_campaign_targeting_type.py new file mode 100644 index 0000000..680e311 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ads_analytics_campaign_targeting_type.py @@ -0,0 +1,295 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdsAnalyticsCampaignTargetingType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'KEYWORD': "KEYWORD", + 'APPTYPE': "APPTYPE", + 'GENDER': "GENDER", + 'LOCATION': "LOCATION", + 'PLACEMENT': "PLACEMENT", + 'COUNTRY': "COUNTRY", + 'TARGETED_INTEREST': "TARGETED_INTEREST", + 'PINNER_INTEREST': "PINNER_INTEREST", + 'AUDIENCE_INCLUDE': "AUDIENCE_INCLUDE", + 'GEO': "GEO", + 'AGE_BUCKET': "AGE_BUCKET", + 'REGION': "REGION", + 'CREATIVE_TYPE': "CREATIVE_TYPE", + 'AGE_BUCKET_AND_GENDER': "AGE_BUCKET_AND_GENDER", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AdsAnalyticsCampaignTargetingType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Reporting targeting type for campaigns., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "CREATIVE_TYPE", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 + + Keyword Args: + value (str): Reporting targeting type for campaigns., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "CREATIVE_TYPE", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AdsAnalyticsCampaignTargetingType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Reporting targeting type for campaigns., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "CREATIVE_TYPE", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 + + Keyword Args: + value (str): Reporting targeting type for campaigns., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "CREATIVE_TYPE", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/ads_analytics_create_async_request.py b/openapi_generated/pinterest_client/model/ads_analytics_create_async_request.py index 044709f..3fd1385 100644 --- a/openapi_generated/pinterest_client/model/ads_analytics_create_async_request.py +++ b/openapi_generated/pinterest_client/model/ads_analytics_create_async_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -103,6 +103,14 @@ class AdsAnalyticsCreateAsyncRequest(ModelComposed): 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 }, }, + ('start_hour',): { + 'inclusive_maximum': 23, + 'inclusive_minimum': 0, + }, + ('end_hour',): { + 'inclusive_maximum': 23, + 'inclusive_minimum': 0, + }, ('campaign_ids',): { 'max_items': 500, 'min_items': 1, @@ -112,7 +120,7 @@ class AdsAnalyticsCreateAsyncRequest(ModelComposed): 'min_items': 1, }, ('campaign_objective_types',): { - 'max_items': 6, + 'max_items': 7, 'min_items': 1, }, ('ad_group_ids',): { @@ -186,6 +194,9 @@ def openapi_types(): 'conversion_report_time': (str,), # noqa: E501 'attribution_types': ([ConversionReportAttributionType],), # noqa: E501 'report_format': (str,), # noqa: E501 + 'primary_sort': (str,), # noqa: E501 + 'start_hour': (int,), # noqa: E501 + 'end_hour': (int,), # noqa: E501 'campaign_ids': ([str],), # noqa: E501 'campaign_statuses': ([CampaignSummaryStatus],), # noqa: E501 'campaign_objective_types': ([ObjectiveType],), # noqa: E501 @@ -217,6 +228,9 @@ def discriminator(): 'conversion_report_time': 'conversion_report_time', # noqa: E501 'attribution_types': 'attribution_types', # noqa: E501 'report_format': 'report_format', # noqa: E501 + 'primary_sort': 'primary_sort', # noqa: E501 + 'start_hour': 'start_hour', # noqa: E501 + 'end_hour': 'end_hour', # noqa: E501 'campaign_ids': 'campaign_ids', # noqa: E501 'campaign_statuses': 'campaign_statuses', # noqa: E501 'campaign_objective_types': 'campaign_objective_types', # noqa: E501 @@ -243,7 +257,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 start_date (str): Metric report start date (UTC). Format: YYYY-MM-DD end_date (str): Metric report end date (UTC). Format: YYYY-MM-DD granularity (str): TOTAL - metrics are aggregated over the specified date range.
DAY - metrics are broken down daily.
HOUR - metrics are broken down hourly.
WEEKLY - metrics are broken down weekly.
MONTHLY - metrics are broken down monthly - columns ([ReportingColumnAsync]): Metric and entity columns + columns ([ReportingColumnAsync]): Metric and entity columns. Pin promotion and ad related columns are not supported for the Product Item level reports. level (str): Level of the report _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -280,18 +294,21 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 view_window_days (int): Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.. [optional] if omitted the server will use the default value of 1 # noqa: E501 conversion_report_time (str): The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.. [optional] if omitted the server will use the default value of "TIME_OF_AD_ACTION" # noqa: E501 attribution_types ([ConversionReportAttributionType]): List of types of attribution for the conversion report. [optional] # noqa: E501 - report_format (str): Specification for formatting report data. [optional] if omitted the server will use the default value of "JSON" # noqa: E501 + report_format (str): Specification for formatting the report data. Reports in JSON will not zero-fill metrics, whereas reports in CSV will. Both report formats will omit rows where all the columns are equal to 0.. [optional] if omitted the server will use the default value of "JSON" # noqa: E501 + primary_sort (str): [optional] if omitted the server will use the default value of "BY_ID" # noqa: E501 + start_hour (int): Which hour of the start date to begin the report. The entire day will be included if no start hour is provided. Only allowed for hourly reports.. [optional] # noqa: E501 + end_hour (int): Which hour of the end date to stop the report (inclusive). For example, with an end_date of '2020-01-01' and end_hour of '15', the report will contain metrics up to '2020-01-01 14:59:59'. The entire day will be included if no end hour is provided. Only allowed for hourly reports.. [optional] # noqa: E501 campaign_ids ([str]): List of campaign ids. [optional] # noqa: E501 campaign_statuses ([CampaignSummaryStatus]): List of status values for filtering. [optional] # noqa: E501 campaign_objective_types ([ObjectiveType]): List of values for filtering. [\"WEB_SESSIONS\"] in BETA.. [optional] # noqa: E501 ad_group_ids ([str]): List of ad group ids. [optional] # noqa: E501 ad_group_statuses ([AdGroupSummaryStatus]): List of values for filtering. [optional] # noqa: E501 - ad_ids ([str]): List of ad ids. [optional] # noqa: E501 - ad_statuses ([PinPromotionSummaryStatus]): List of values for filtering. [optional] # noqa: E501 + ad_ids ([str]): List of ad ids [This parameter is no supported for Product Item Level Reports]. [optional] # noqa: E501 + ad_statuses ([PinPromotionSummaryStatus]): List of values for filtering [This parameter is not supported for Product Item Level Reports]. [optional] # noqa: E501 product_group_ids ([str]): List of product group ids. [optional] # noqa: E501 product_group_statuses ([ProductGroupSummaryStatus]): List of values for filtering. [optional] # noqa: E501 product_item_ids ([str]): List of product item ids. [optional] # noqa: E501 - targeting_types ([AdsAnalyticsTargetingType]): List of targeting types. Requires `level` to be a value ending in `_TARGETING`.. [optional] # noqa: E501 + targeting_types ([AdsAnalyticsTargetingType]): List of targeting types. Requires `level` to be a value ending in `_TARGETING`. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users.. [optional] # noqa: E501 metrics_filters ([AdsAnalyticsMetricsFilter]): List of metrics filters. [optional] # noqa: E501 """ @@ -365,7 +382,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 start_date (str): Metric report start date (UTC). Format: YYYY-MM-DD end_date (str): Metric report end date (UTC). Format: YYYY-MM-DD granularity (str): TOTAL - metrics are aggregated over the specified date range.
DAY - metrics are broken down daily.
HOUR - metrics are broken down hourly.
WEEKLY - metrics are broken down weekly.
MONTHLY - metrics are broken down monthly - columns ([ReportingColumnAsync]): Metric and entity columns + columns ([ReportingColumnAsync]): Metric and entity columns. Pin promotion and ad related columns are not supported for the Product Item level reports. level (str): Level of the report _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -402,18 +419,21 @@ def __init__(self, *args, **kwargs): # noqa: E501 view_window_days (int): Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.. [optional] if omitted the server will use the default value of 1 # noqa: E501 conversion_report_time (str): The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.. [optional] if omitted the server will use the default value of "TIME_OF_AD_ACTION" # noqa: E501 attribution_types ([ConversionReportAttributionType]): List of types of attribution for the conversion report. [optional] # noqa: E501 - report_format (str): Specification for formatting report data. [optional] if omitted the server will use the default value of "JSON" # noqa: E501 + report_format (str): Specification for formatting the report data. Reports in JSON will not zero-fill metrics, whereas reports in CSV will. Both report formats will omit rows where all the columns are equal to 0.. [optional] if omitted the server will use the default value of "JSON" # noqa: E501 + primary_sort (str): [optional] if omitted the server will use the default value of "BY_ID" # noqa: E501 + start_hour (int): Which hour of the start date to begin the report. The entire day will be included if no start hour is provided. Only allowed for hourly reports.. [optional] # noqa: E501 + end_hour (int): Which hour of the end date to stop the report (inclusive). For example, with an end_date of '2020-01-01' and end_hour of '15', the report will contain metrics up to '2020-01-01 14:59:59'. The entire day will be included if no end hour is provided. Only allowed for hourly reports.. [optional] # noqa: E501 campaign_ids ([str]): List of campaign ids. [optional] # noqa: E501 campaign_statuses ([CampaignSummaryStatus]): List of status values for filtering. [optional] # noqa: E501 campaign_objective_types ([ObjectiveType]): List of values for filtering. [\"WEB_SESSIONS\"] in BETA.. [optional] # noqa: E501 ad_group_ids ([str]): List of ad group ids. [optional] # noqa: E501 ad_group_statuses ([AdGroupSummaryStatus]): List of values for filtering. [optional] # noqa: E501 - ad_ids ([str]): List of ad ids. [optional] # noqa: E501 - ad_statuses ([PinPromotionSummaryStatus]): List of values for filtering. [optional] # noqa: E501 + ad_ids ([str]): List of ad ids [This parameter is no supported for Product Item Level Reports]. [optional] # noqa: E501 + ad_statuses ([PinPromotionSummaryStatus]): List of values for filtering [This parameter is not supported for Product Item Level Reports]. [optional] # noqa: E501 product_group_ids ([str]): List of product group ids. [optional] # noqa: E501 product_group_statuses ([ProductGroupSummaryStatus]): List of values for filtering. [optional] # noqa: E501 product_item_ids ([str]): List of product item ids. [optional] # noqa: E501 - targeting_types ([AdsAnalyticsTargetingType]): List of targeting types. Requires `level` to be a value ending in `_TARGETING`.. [optional] # noqa: E501 + targeting_types ([AdsAnalyticsTargetingType]): List of targeting types. Requires `level` to be a value ending in `_TARGETING`. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users.. [optional] # noqa: E501 metrics_filters ([AdsAnalyticsMetricsFilter]): List of metrics filters. [optional] # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/ads_analytics_create_async_request_all_of.py b/openapi_generated/pinterest_client/model/ads_analytics_create_async_request_all_of.py index 8969e40..649b656 100644 --- a/openapi_generated/pinterest_client/model/ads_analytics_create_async_request_all_of.py +++ b/openapi_generated/pinterest_client/model/ads_analytics_create_async_request_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ads_analytics_create_async_request_all_of1.py b/openapi_generated/pinterest_client/model/ads_analytics_create_async_request_all_of1.py index 1590ecd..3530fd9 100644 --- a/openapi_generated/pinterest_client/model/ads_analytics_create_async_request_all_of1.py +++ b/openapi_generated/pinterest_client/model/ads_analytics_create_async_request_all_of1.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -67,6 +67,14 @@ class AdsAnalyticsCreateAsyncRequestAllOf1(ModelNormal): } validations = { + ('start_hour',): { + 'inclusive_maximum': 23, + 'inclusive_minimum': 0, + }, + ('end_hour',): { + 'inclusive_maximum': 23, + 'inclusive_minimum': 0, + }, } @cached_property @@ -95,6 +103,9 @@ def openapi_types(): 'columns': ([ReportingColumnAsync],), # noqa: E501 'level': (str,), # noqa: E501 'report_format': (str,), # noqa: E501 + 'primary_sort': (str,), # noqa: E501 + 'start_hour': (int,), # noqa: E501 + 'end_hour': (int,), # noqa: E501 } @cached_property @@ -106,6 +117,9 @@ def discriminator(): 'columns': 'columns', # noqa: E501 'level': 'level', # noqa: E501 'report_format': 'report_format', # noqa: E501 + 'primary_sort': 'primary_sort', # noqa: E501 + 'start_hour': 'start_hour', # noqa: E501 + 'end_hour': 'end_hour', # noqa: E501 } read_only_vars = { @@ -119,7 +133,7 @@ def _from_openapi_data(cls, columns, level, *args, **kwargs): # noqa: E501 """AdsAnalyticsCreateAsyncRequestAllOf1 - a model defined in OpenAPI Args: - columns ([ReportingColumnAsync]): Metric and entity columns + columns ([ReportingColumnAsync]): Metric and entity columns. Pin promotion and ad related columns are not supported for the Product Item level reports. level (str): Level of the report Keyword Args: @@ -153,7 +167,10 @@ def _from_openapi_data(cls, columns, level, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - report_format (str): Specification for formatting report data. [optional] if omitted the server will use the default value of "JSON" # noqa: E501 + report_format (str): Specification for formatting the report data. Reports in JSON will not zero-fill metrics, whereas reports in CSV will. Both report formats will omit rows where all the columns are equal to 0.. [optional] if omitted the server will use the default value of "JSON" # noqa: E501 + primary_sort (str): [optional] if omitted the server will use the default value of "BY_ID" # noqa: E501 + start_hour (int): Which hour of the start date to begin the report. The entire day will be included if no start hour is provided. Only allowed for hourly reports.. [optional] # noqa: E501 + end_hour (int): Which hour of the end date to stop the report (inclusive). For example, with an end_date of '2020-01-01' and end_hour of '15', the report will contain metrics up to '2020-01-01 14:59:59'. The entire day will be included if no end hour is provided. Only allowed for hourly reports.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -207,7 +224,7 @@ def __init__(self, columns, level, *args, **kwargs): # noqa: E501 """AdsAnalyticsCreateAsyncRequestAllOf1 - a model defined in OpenAPI Args: - columns ([ReportingColumnAsync]): Metric and entity columns + columns ([ReportingColumnAsync]): Metric and entity columns. Pin promotion and ad related columns are not supported for the Product Item level reports. level (str): Level of the report Keyword Args: @@ -241,7 +258,10 @@ def __init__(self, columns, level, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - report_format (str): Specification for formatting report data. [optional] if omitted the server will use the default value of "JSON" # noqa: E501 + report_format (str): Specification for formatting the report data. Reports in JSON will not zero-fill metrics, whereas reports in CSV will. Both report formats will omit rows where all the columns are equal to 0.. [optional] if omitted the server will use the default value of "JSON" # noqa: E501 + primary_sort (str): [optional] if omitted the server will use the default value of "BY_ID" # noqa: E501 + start_hour (int): Which hour of the start date to begin the report. The entire day will be included if no start hour is provided. Only allowed for hourly reports.. [optional] # noqa: E501 + end_hour (int): Which hour of the end date to stop the report (inclusive). For example, with an end_date of '2020-01-01' and end_hour of '15', the report will contain metrics up to '2020-01-01 14:59:59'. The entire day will be included if no end hour is provided. Only allowed for hourly reports.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/ads_analytics_create_async_response.py b/openapi_generated/pinterest_client/model/ads_analytics_create_async_response.py index cb8e2bd..a0b0a9d 100644 --- a/openapi_generated/pinterest_client/model/ads_analytics_create_async_response.py +++ b/openapi_generated/pinterest_client/model/ads_analytics_create_async_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ads_analytics_filter_column.py b/openapi_generated/pinterest_client/model/ads_analytics_filter_column.py index ba05474..0342331 100644 --- a/openapi_generated/pinterest_client/model/ads_analytics_filter_column.py +++ b/openapi_generated/pinterest_client/model/ads_analytics_filter_column.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ads_analytics_filter_operator.py b/openapi_generated/pinterest_client/model/ads_analytics_filter_operator.py index 9050f40..3508dbd 100644 --- a/openapi_generated/pinterest_client/model/ads_analytics_filter_operator.py +++ b/openapi_generated/pinterest_client/model/ads_analytics_filter_operator.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ads_analytics_get_async_response.py b/openapi_generated/pinterest_client/model/ads_analytics_get_async_response.py index f8acf1b..f78a473 100644 --- a/openapi_generated/pinterest_client/model/ads_analytics_get_async_response.py +++ b/openapi_generated/pinterest_client/model/ads_analytics_get_async_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ads_analytics_metrics_filter.py b/openapi_generated/pinterest_client/model/ads_analytics_metrics_filter.py index d024174..c65ebef 100644 --- a/openapi_generated/pinterest_client/model/ads_analytics_metrics_filter.py +++ b/openapi_generated/pinterest_client/model/ads_analytics_metrics_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ads_analytics_response.py b/openapi_generated/pinterest_client/model/ads_analytics_response.py index 3f9c159..a2edb9f 100644 --- a/openapi_generated/pinterest_client/model/ads_analytics_response.py +++ b/openapi_generated/pinterest_client/model/ads_analytics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ads_analytics_targeting_type.py b/openapi_generated/pinterest_client/model/ads_analytics_targeting_type.py index ba5f294..96e2f20 100644 --- a/openapi_generated/pinterest_client/model/ads_analytics_targeting_type.py +++ b/openapi_generated/pinterest_client/model/ads_analytics_targeting_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -65,6 +65,7 @@ class AdsAnalyticsTargetingType(ModelSimple): 'GEO': "GEO", 'AGE_BUCKET': "AGE_BUCKET", 'REGION': "REGION", + 'AGE_BUCKET_AND_GENDER': "AGE_BUCKET_AND_GENDER", }, } @@ -116,10 +117,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Reporting targeting type., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", ] # noqa: E501 + args[0] (str): Reporting targeting type., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 Keyword Args: - value (str): Reporting targeting type., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", ] # noqa: E501 + value (str): Reporting targeting type., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -206,10 +207,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Reporting targeting type., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", ] # noqa: E501 + args[0] (str): Reporting targeting type., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 Keyword Args: - value (str): Reporting targeting type., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", ] # noqa: E501 + value (str): Reporting targeting type., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "AGE_BUCKET_AND_GENDER", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/ads_credit_discounts_response.py b/openapi_generated/pinterest_client/model/ads_credit_discounts_response.py new file mode 100644 index 0000000..22557be --- /dev/null +++ b/openapi_generated/pinterest_client/model/ads_credit_discounts_response.py @@ -0,0 +1,309 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdsCreditDiscountsResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('discount_type',): { + 'None': None, + 'COUPON': "COUPON", + 'CREDIT': "CREDIT", + 'COUPON_APPLIED': "COUPON_APPLIED", + 'CREDIT_APPLIED': "CREDIT_APPLIED", + 'MARKETING_OFFER_CREDIT': "MARKETING_OFFER_CREDIT", + 'MARKETING_OFFER_CREDIT_APPLIED': "MARKETING_OFFER_CREDIT_APPLIED", + 'GOODWILL_CREDIT': "GOODWILL_CREDIT", + 'GOODWILL_CREDIT_APPLIED': "GOODWILL_CREDIT_APPLIED", + 'INTERNAL_CREDIT': "INTERNAL_CREDIT", + 'INTERNAL_CREDIT_APPLIED': "INTERNAL_CREDIT_APPLIED", + 'PREPAID_CREDIT': "PREPAID_CREDIT", + 'PREPAID_CREDIT_APPLIED': "PREPAID_CREDIT_APPLIED", + 'SALES_INCENTIVE_CREDIT': "SALES_INCENTIVE_CREDIT", + 'SALES_INCENTIVE_CREDIT_APPLIED': "SALES_INCENTIVE_CREDIT_APPLIED", + 'CREDIT_EXPIRED': "CREDIT_EXPIRED", + 'FUTURE_CREDIT': "FUTURE_CREDIT", + 'REFERRAL_CREDIT': "REFERRAL_CREDIT", + 'INVOICE_SALES_INCENTIVE_CREDIT': "INVOICE_SALES_INCENTIVE_CREDIT", + 'INVOICE_SALES_INCENTIVE_CREDIT_APPLIED': "INVOICE_SALES_INCENTIVE_CREDIT_APPLIED", + 'PREPAID_CREDIT_REFUND': "PREPAID_CREDIT_REFUND", + 'NULL': "null", + }, + } + + validations = { + ('advertiser_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'active': (bool,), # noqa: E501 + 'advertiser_id': (str,), # noqa: E501 + 'discount_type': (str, none_type,), # noqa: E501 + 'discount_in_micro_currency': (float, none_type,), # noqa: E501 + 'discount_currency': (str, none_type,), # noqa: E501 + 'title': (str, none_type,), # noqa: E501 + 'remaining_discount_in_micro_currency': (float, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'active': 'active', # noqa: E501 + 'advertiser_id': 'advertiser_id', # noqa: E501 + 'discount_type': 'discountType', # noqa: E501 + 'discount_in_micro_currency': 'discountInMicroCurrency', # noqa: E501 + 'discount_currency': 'discountCurrency', # noqa: E501 + 'title': 'title', # noqa: E501 + 'remaining_discount_in_micro_currency': 'remainingDiscountInMicroCurrency', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdsCreditDiscountsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + active (bool): True if the offer code is currently active.. [optional] # noqa: E501 + advertiser_id (str): Advertiser ID the offer was applied to.. [optional] # noqa: E501 + discount_type (str, none_type): The type of discount of this credit. [optional] # noqa: E501 + discount_in_micro_currency (float, none_type): The discount applied in the offer’s currency value.. [optional] # noqa: E501 + discount_currency (str, none_type): Currency value for the discount.. [optional] # noqa: E501 + title (str, none_type): Human readable title of the offer code.. [optional] # noqa: E501 + remaining_discount_in_micro_currency (float, none_type): The credits left to spend.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdsCreditDiscountsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + active (bool): True if the offer code is currently active.. [optional] # noqa: E501 + advertiser_id (str): Advertiser ID the offer was applied to.. [optional] # noqa: E501 + discount_type (str, none_type): The type of discount of this credit. [optional] # noqa: E501 + discount_in_micro_currency (float, none_type): The discount applied in the offer’s currency value.. [optional] # noqa: E501 + discount_currency (str, none_type): Currency value for the discount.. [optional] # noqa: E501 + title (str, none_type): Human readable title of the offer code.. [optional] # noqa: E501 + remaining_discount_in_micro_currency (float, none_type): The credits left to spend.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ads_credit_redeem_request.py b/openapi_generated/pinterest_client/model/ads_credit_redeem_request.py new file mode 100644 index 0000000..a915aeb --- /dev/null +++ b/openapi_generated/pinterest_client/model/ads_credit_redeem_request.py @@ -0,0 +1,273 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdsCreditRedeemRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('offer_code_hash',): { + 'regex': { + 'pattern': r'^[a-z0-9]*$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'offer_code_hash': (str,), # noqa: E501 + 'validate_only': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'offer_code_hash': 'offerCodeHash', # noqa: E501 + 'validate_only': 'validateOnly', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, offer_code_hash, validate_only, *args, **kwargs): # noqa: E501 + """AdsCreditRedeemRequest - a model defined in OpenAPI + + Args: + offer_code_hash (str): Takes in a SHA256 hash of the offerCode. + validate_only (bool): If true, only validate if we can redeem offer code. Otherwise it will actually apply the offer code to the account + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.offer_code_hash = offer_code_hash + self.validate_only = validate_only + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, offer_code_hash, validate_only, *args, **kwargs): # noqa: E501 + """AdsCreditRedeemRequest - a model defined in OpenAPI + + Args: + offer_code_hash (str): Takes in a SHA256 hash of the offerCode. + validate_only (bool): If true, only validate if we can redeem offer code. Otherwise it will actually apply the offer code to the account + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.offer_code_hash = offer_code_hash + self.validate_only = validate_only + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ads_credit_redeem_response.py b/openapi_generated/pinterest_client/model/ads_credit_redeem_response.py new file mode 100644 index 0000000..f4e6433 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ads_credit_redeem_response.py @@ -0,0 +1,264 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdsCreditRedeemResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'success': (bool,), # noqa: E501 + 'error_code': (int, none_type,), # noqa: E501 + 'error_message': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'success': 'success', # noqa: E501 + 'error_code': 'errorCode', # noqa: E501 + 'error_message': 'errorMessage', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdsCreditRedeemResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + success (bool): Returns true if the offer code was successfully applied(validateOnly=false) or can be applied(validateOnly=true).. [optional] # noqa: E501 + error_code (int, none_type): Error code type if error occurs. [optional] # noqa: E501 + error_message (str, none_type): Reason for failure. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdsCreditRedeemResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + success (bool): Returns true if the offer code was successfully applied(validateOnly=false) or can be applied(validateOnly=true).. [optional] # noqa: E501 + error_code (int, none_type): Error code type if error occurs. [optional] # noqa: E501 + error_message (str, none_type): Reason for failure. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/advanced_auction_bid_options.py b/openapi_generated/pinterest_client/model/advanced_auction_bid_options.py new file mode 100644 index 0000000..8233836 --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_bid_options.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.app_type_multipliers import AppTypeMultipliers + from openapi_generated.pinterest_client.model.placement_multipliers import PlacementMultipliers + globals()['AppTypeMultipliers'] = AppTypeMultipliers + globals()['PlacementMultipliers'] = PlacementMultipliers + + +class AdvancedAuctionBidOptions(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'bid_in_micro_currency': (int, none_type,), # noqa: E501 + 'app_type_multipliers': (AppTypeMultipliers,), # noqa: E501 + 'placement_multipliers': (PlacementMultipliers,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'bid_in_micro_currency': 'bid_in_micro_currency', # noqa: E501 + 'app_type_multipliers': 'app_type_multipliers', # noqa: E501 + 'placement_multipliers': 'placement_multipliers', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionBidOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + bid_in_micro_currency (int, none_type): Bid price in micro currency. A value of 0 will stop distribution for this item in `MAX_BID` ad groups in `CATALOG_SALES` campaigns. A value of `null` will fallback to the ad group's `bid_in_micro_currency`.. [optional] # noqa: E501 + app_type_multipliers (AppTypeMultipliers): [optional] # noqa: E501 + placement_multipliers (PlacementMultipliers): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionBidOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + bid_in_micro_currency (int, none_type): Bid price in micro currency. A value of 0 will stop distribution for this item in `MAX_BID` ad groups in `CATALOG_SALES` campaigns. A value of `null` will fallback to the ad group's `bid_in_micro_currency`.. [optional] # noqa: E501 + app_type_multipliers (AppTypeMultipliers): [optional] # noqa: E501 + placement_multipliers (PlacementMultipliers): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/advanced_auction_item.py b/openapi_generated/pinterest_client/model/advanced_auction_item.py new file mode 100644 index 0000000..cb9b292 --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_item.py @@ -0,0 +1,332 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_bid_options import AdvancedAuctionBidOptions + from openapi_generated.pinterest_client.model.advanced_auction_item_all_of import AdvancedAuctionItemAllOf + from openapi_generated.pinterest_client.model.advanced_auction_key import AdvancedAuctionKey + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.language import Language + globals()['AdvancedAuctionBidOptions'] = AdvancedAuctionBidOptions + globals()['AdvancedAuctionItemAllOf'] = AdvancedAuctionItemAllOf + globals()['AdvancedAuctionKey'] = AdvancedAuctionKey + globals()['Country'] = Country + globals()['Language'] = Language + + +class AdvancedAuctionItem(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (Language,), # noqa: E501 + 'bid_options': (AdvancedAuctionBidOptions,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + 'bid_options': 'bid_options', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItem - a model defined in OpenAPI + + Keyword Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + bid_options (AdvancedAuctionBidOptions): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItem - a model defined in OpenAPI + + Keyword Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + bid_options (AdvancedAuctionBidOptions): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/advanced_auction_item_all_of.py b/openapi_generated/pinterest_client/model/advanced_auction_item_all_of.py new file mode 100644 index 0000000..4ba9da0 --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_item_all_of.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_bid_options import AdvancedAuctionBidOptions + globals()['AdvancedAuctionBidOptions'] = AdvancedAuctionBidOptions + + +class AdvancedAuctionItemAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'bid_options': (AdvancedAuctionBidOptions,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'bid_options': 'bid_options', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, bid_options, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemAllOf - a model defined in OpenAPI + + Args: + bid_options (AdvancedAuctionBidOptions): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.bid_options = bid_options + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, bid_options, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemAllOf - a model defined in OpenAPI + + Args: + bid_options (AdvancedAuctionBidOptions): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.bid_options = bid_options + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/advanced_auction_items.py b/openapi_generated/pinterest_client/model/advanced_auction_items.py new file mode 100644 index 0000000..0245eea --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_items.py @@ -0,0 +1,271 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_item import AdvancedAuctionItem + globals()['AdvancedAuctionItem'] = AdvancedAuctionItem + + +class AdvancedAuctionItems(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_id': (str,), # noqa: E501 + 'items': ([AdvancedAuctionItem],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_id': 'catalog_id', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Response object of item bid options. [optional] # noqa: E501 + items ([AdvancedAuctionItem]): Array with item bid options. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Response object of item bid options. [optional] # noqa: E501 + items ([AdvancedAuctionItem]): Array with item bid options. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/advanced_auction_items_get_record.py b/openapi_generated/pinterest_client/model/advanced_auction_items_get_record.py new file mode 100644 index 0000000..1e125bb --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_items_get_record.py @@ -0,0 +1,324 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_key import AdvancedAuctionKey + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.language import Language + globals()['AdvancedAuctionKey'] = AdvancedAuctionKey + globals()['Country'] = Country + globals()['Language'] = Language + + +class AdvancedAuctionItemsGetRecord(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (Language,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsGetRecord - a model defined in OpenAPI + + Keyword Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsGetRecord - a model defined in OpenAPI + + Keyword Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/advanced_auction_items_get_request.py b/openapi_generated/pinterest_client/model/advanced_auction_items_get_request.py new file mode 100644 index 0000000..527986d --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_items_get_request.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_items_get_record import AdvancedAuctionItemsGetRecord + globals()['AdvancedAuctionItemsGetRecord'] = AdvancedAuctionItemsGetRecord + + +class AdvancedAuctionItemsGetRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('items',): { + 'max_items': 10000, + 'min_items': 1, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_id': (str,), # noqa: E501 + 'items': ([AdvancedAuctionItemsGetRecord],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_id': 'catalog_id', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_id, items, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsGetRequest - a model defined in OpenAPI + + Args: + catalog_id (str): Catalog id pertaining to the retail item + items ([AdvancedAuctionItemsGetRecord]): A list of retail catalog items to fetch bid options for + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_id = catalog_id + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_id, items, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsGetRequest - a model defined in OpenAPI + + Args: + catalog_id (str): Catalog id pertaining to the retail item + items ([AdvancedAuctionItemsGetRecord]): A list of retail catalog items to fetch bid options for + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_id = catalog_id + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/advanced_auction_items_submit_delete_record.py b/openapi_generated/pinterest_client/model/advanced_auction_items_submit_delete_record.py new file mode 100644 index 0000000..ad1a16d --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_items_submit_delete_record.py @@ -0,0 +1,324 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_key import AdvancedAuctionKey + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.language import Language + globals()['AdvancedAuctionKey'] = AdvancedAuctionKey + globals()['Country'] = Country + globals()['Language'] = Language + + +class AdvancedAuctionItemsSubmitDeleteRecord(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (Language,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsSubmitDeleteRecord - a model defined in OpenAPI + + Keyword Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsSubmitDeleteRecord - a model defined in OpenAPI + + Keyword Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/advanced_auction_items_submit_record.py b/openapi_generated/pinterest_client/model/advanced_auction_items_submit_record.py new file mode 100644 index 0000000..b5fe48d --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_items_submit_record.py @@ -0,0 +1,357 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_bid_options import AdvancedAuctionBidOptions + from openapi_generated.pinterest_client.model.advanced_auction_items_submit_delete_record import AdvancedAuctionItemsSubmitDeleteRecord + from openapi_generated.pinterest_client.model.advanced_auction_items_submit_upsert_record import AdvancedAuctionItemsSubmitUpsertRecord + from openapi_generated.pinterest_client.model.advanced_auction_operation import AdvancedAuctionOperation + from openapi_generated.pinterest_client.model.advanced_auction_processed_item import AdvancedAuctionProcessedItem + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.language import Language + from openapi_generated.pinterest_client.model.update_mask_bid_option_field import UpdateMaskBidOptionField + globals()['AdvancedAuctionBidOptions'] = AdvancedAuctionBidOptions + globals()['AdvancedAuctionItemsSubmitDeleteRecord'] = AdvancedAuctionItemsSubmitDeleteRecord + globals()['AdvancedAuctionItemsSubmitUpsertRecord'] = AdvancedAuctionItemsSubmitUpsertRecord + globals()['AdvancedAuctionOperation'] = AdvancedAuctionOperation + globals()['AdvancedAuctionProcessedItem'] = AdvancedAuctionProcessedItem + globals()['Country'] = Country + globals()['Language'] = Language + globals()['UpdateMaskBidOptionField'] = UpdateMaskBidOptionField + + +class AdvancedAuctionItemsSubmitRecord(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'operation': (AdvancedAuctionOperation,), # noqa: E501 + 'item_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (Language,), # noqa: E501 + 'bid_options': (AdvancedAuctionBidOptions,), # noqa: E501 + 'update_mask': ([UpdateMaskBidOptionField], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'AdvancedAuctionItemsSubmitDeleteRecord': AdvancedAuctionItemsSubmitDeleteRecord, + 'AdvancedAuctionItemsSubmitUpsertRecord': AdvancedAuctionItemsSubmitUpsertRecord, + 'AdvancedAuctionProcessedItem': AdvancedAuctionProcessedItem, + 'DELETE': AdvancedAuctionItemsSubmitDeleteRecord, + 'UPSERT': AdvancedAuctionItemsSubmitUpsertRecord, + } + if not val: + return None + return {'operation': val} + + attribute_map = { + 'operation': 'operation', # noqa: E501 + 'item_id': 'item_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + 'bid_options': 'bid_options', # noqa: E501 + 'update_mask': 'update_mask', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsSubmitRecord - a model defined in OpenAPI + + Keyword Args: + operation (AdvancedAuctionOperation): + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + bid_options (AdvancedAuctionBidOptions): + update_mask ([UpdateMaskBidOptionField], none_type): The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsSubmitRecord - a model defined in OpenAPI + + Keyword Args: + operation (AdvancedAuctionOperation): + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + bid_options (AdvancedAuctionBidOptions): + update_mask ([UpdateMaskBidOptionField], none_type): The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + AdvancedAuctionItemsSubmitDeleteRecord, + AdvancedAuctionItemsSubmitUpsertRecord, + ], + } diff --git a/openapi_generated/pinterest_client/model/advanced_auction_items_submit_request.py b/openapi_generated/pinterest_client/model/advanced_auction_items_submit_request.py new file mode 100644 index 0000000..d8e4285 --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_items_submit_request.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_items_submit_record import AdvancedAuctionItemsSubmitRecord + globals()['AdvancedAuctionItemsSubmitRecord'] = AdvancedAuctionItemsSubmitRecord + + +class AdvancedAuctionItemsSubmitRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('items',): { + 'max_items': 10000, + 'min_items': 1, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_id': (str,), # noqa: E501 + 'items': ([AdvancedAuctionItemsSubmitRecord],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_id': 'catalog_id', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_id, items, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsSubmitRequest - a model defined in OpenAPI + + Args: + catalog_id (str): Catalog id pertaining to all items + items ([AdvancedAuctionItemsSubmitRecord]): Array of item bid option operations + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_id = catalog_id + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_id, items, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsSubmitRequest - a model defined in OpenAPI + + Args: + catalog_id (str): Catalog id pertaining to all items + items ([AdvancedAuctionItemsSubmitRecord]): Array of item bid option operations + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_id = catalog_id + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/advanced_auction_items_submit_upsert_record.py b/openapi_generated/pinterest_client/model/advanced_auction_items_submit_upsert_record.py new file mode 100644 index 0000000..c64223a --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_items_submit_upsert_record.py @@ -0,0 +1,338 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_bid_options import AdvancedAuctionBidOptions + from openapi_generated.pinterest_client.model.advanced_auction_item import AdvancedAuctionItem + from openapi_generated.pinterest_client.model.advanced_auction_items_submit_upsert_record_all_of import AdvancedAuctionItemsSubmitUpsertRecordAllOf + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.language import Language + from openapi_generated.pinterest_client.model.update_mask_bid_option_field import UpdateMaskBidOptionField + globals()['AdvancedAuctionBidOptions'] = AdvancedAuctionBidOptions + globals()['AdvancedAuctionItem'] = AdvancedAuctionItem + globals()['AdvancedAuctionItemsSubmitUpsertRecordAllOf'] = AdvancedAuctionItemsSubmitUpsertRecordAllOf + globals()['Country'] = Country + globals()['Language'] = Language + globals()['UpdateMaskBidOptionField'] = UpdateMaskBidOptionField + + +class AdvancedAuctionItemsSubmitUpsertRecord(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (Language,), # noqa: E501 + 'bid_options': (AdvancedAuctionBidOptions,), # noqa: E501 + 'update_mask': ([UpdateMaskBidOptionField], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + 'bid_options': 'bid_options', # noqa: E501 + 'update_mask': 'update_mask', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsSubmitUpsertRecord - a model defined in OpenAPI + + Keyword Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + bid_options (AdvancedAuctionBidOptions): + update_mask ([UpdateMaskBidOptionField], none_type): The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsSubmitUpsertRecord - a model defined in OpenAPI + + Keyword Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + bid_options (AdvancedAuctionBidOptions): + update_mask ([UpdateMaskBidOptionField], none_type): The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/advanced_auction_items_submit_upsert_record_all_of.py b/openapi_generated/pinterest_client/model/advanced_auction_items_submit_upsert_record_all_of.py new file mode 100644 index 0000000..62754c7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_items_submit_upsert_record_all_of.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.update_mask_bid_option_field import UpdateMaskBidOptionField + globals()['UpdateMaskBidOptionField'] = UpdateMaskBidOptionField + + +class AdvancedAuctionItemsSubmitUpsertRecordAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'update_mask': ([UpdateMaskBidOptionField], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'update_mask': 'update_mask', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, update_mask, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsSubmitUpsertRecordAllOf - a model defined in OpenAPI + + Args: + update_mask ([UpdateMaskBidOptionField], none_type): The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.update_mask = update_mask + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, update_mask, *args, **kwargs): # noqa: E501 + """AdvancedAuctionItemsSubmitUpsertRecordAllOf - a model defined in OpenAPI + + Args: + update_mask ([UpdateMaskBidOptionField], none_type): The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.update_mask = update_mask + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/advanced_auction_key.py b/openapi_generated/pinterest_client/model/advanced_auction_key.py new file mode 100644 index 0000000..0a1fb52 --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_key.py @@ -0,0 +1,282 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.language import Language + globals()['Country'] = Country + globals()['Language'] = Language + + +class AdvancedAuctionKey(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (Language,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, item_id, country, language, *args, **kwargs): # noqa: E501 + """AdvancedAuctionKey - a model defined in OpenAPI + + Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.country = country + self.language = language + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, item_id, country, language, *args, **kwargs): # noqa: E501 + """AdvancedAuctionKey - a model defined in OpenAPI + + Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.country = country + self.language = language + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/advanced_auction_operation.py b/openapi_generated/pinterest_client/model/advanced_auction_operation.py new file mode 100644 index 0000000..b004df4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_operation.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdvancedAuctionOperation(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'UPSERT': "UPSERT", + 'DELETE': "DELETE", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AdvancedAuctionOperation - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["UPSERT", "DELETE", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["UPSERT", "DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AdvancedAuctionOperation - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["UPSERT", "DELETE", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["UPSERT", "DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/advanced_auction_operation_error.py b/openapi_generated/pinterest_client/model/advanced_auction_operation_error.py new file mode 100644 index 0000000..36bff89 --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_operation_error.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AdvancedAuctionOperationError(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'code': 'code', # noqa: E501 + 'message': 'message', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionOperationError - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + code (int): The error code for the item bid option operation validation error. [optional] # noqa: E501 + message (str): Message describing the item bid option operation validation error. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionOperationError - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + code (int): The error code for the item bid option operation validation error. [optional] # noqa: E501 + message (str): Message describing the item bid option operation validation error. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/advanced_auction_processed_item.py b/openapi_generated/pinterest_client/model/advanced_auction_processed_item.py new file mode 100644 index 0000000..b52498c --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_processed_item.py @@ -0,0 +1,354 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_bid_options import AdvancedAuctionBidOptions + from openapi_generated.pinterest_client.model.advanced_auction_items_submit_delete_record import AdvancedAuctionItemsSubmitDeleteRecord + from openapi_generated.pinterest_client.model.advanced_auction_items_submit_record import AdvancedAuctionItemsSubmitRecord + from openapi_generated.pinterest_client.model.advanced_auction_items_submit_upsert_record import AdvancedAuctionItemsSubmitUpsertRecord + from openapi_generated.pinterest_client.model.advanced_auction_operation_error import AdvancedAuctionOperationError + from openapi_generated.pinterest_client.model.advanced_auction_processed_item_all_of import AdvancedAuctionProcessedItemAllOf + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.language import Language + from openapi_generated.pinterest_client.model.update_mask_bid_option_field import UpdateMaskBidOptionField + globals()['AdvancedAuctionBidOptions'] = AdvancedAuctionBidOptions + globals()['AdvancedAuctionItemsSubmitDeleteRecord'] = AdvancedAuctionItemsSubmitDeleteRecord + globals()['AdvancedAuctionItemsSubmitRecord'] = AdvancedAuctionItemsSubmitRecord + globals()['AdvancedAuctionItemsSubmitUpsertRecord'] = AdvancedAuctionItemsSubmitUpsertRecord + globals()['AdvancedAuctionOperationError'] = AdvancedAuctionOperationError + globals()['AdvancedAuctionProcessedItemAllOf'] = AdvancedAuctionProcessedItemAllOf + globals()['Country'] = Country + globals()['Language'] = Language + globals()['UpdateMaskBidOptionField'] = UpdateMaskBidOptionField + + +class AdvancedAuctionProcessedItem(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (Language,), # noqa: E501 + 'bid_options': (AdvancedAuctionBidOptions,), # noqa: E501 + 'update_mask': ([UpdateMaskBidOptionField], none_type,), # noqa: E501 + 'errors': ([AdvancedAuctionOperationError],), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'DELETE': AdvancedAuctionItemsSubmitDeleteRecord, + 'UPSERT': AdvancedAuctionItemsSubmitUpsertRecord, + } + if not val: + return None + return {'operation': val} + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + 'bid_options': 'bid_options', # noqa: E501 + 'update_mask': 'update_mask', # noqa: E501 + 'errors': 'errors', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionProcessedItem - a model defined in OpenAPI + + Keyword Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + bid_options (AdvancedAuctionBidOptions): + update_mask ([UpdateMaskBidOptionField], none_type): The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + errors ([AdvancedAuctionOperationError]): Array with validation errors for the supplied item bid option modification operation. A non empty errors list means this single item operation was not applied.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionProcessedItem - a model defined in OpenAPI + + Keyword Args: + item_id (str): The catalog retail item id in the merchant namespace + country (Country): + language (Language): + bid_options (AdvancedAuctionBidOptions): + update_mask ([UpdateMaskBidOptionField], none_type): The list of item bid option fields to be set or updated. Fields specified in the updated mask without a value specified in the `bid_options` object in the body will be set to `null`. If an item bid option record is being created, fields not specified in the update mask will be initialized to `null`. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + errors ([AdvancedAuctionOperationError]): Array with validation errors for the supplied item bid option modification operation. A non empty errors list means this single item operation was not applied.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/advanced_auction_processed_item_all_of.py b/openapi_generated/pinterest_client/model/advanced_auction_processed_item_all_of.py new file mode 100644 index 0000000..66c2b91 --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_processed_item_all_of.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_operation_error import AdvancedAuctionOperationError + globals()['AdvancedAuctionOperationError'] = AdvancedAuctionOperationError + + +class AdvancedAuctionProcessedItemAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'errors': ([AdvancedAuctionOperationError],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'errors': 'errors', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionProcessedItemAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + errors ([AdvancedAuctionOperationError]): Array with validation errors for the supplied item bid option modification operation. A non empty errors list means this single item operation was not applied.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionProcessedItemAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + errors ([AdvancedAuctionOperationError]): Array with validation errors for the supplied item bid option modification operation. A non empty errors list means this single item operation was not applied.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/advanced_auction_processed_items.py b/openapi_generated/pinterest_client/model/advanced_auction_processed_items.py new file mode 100644 index 0000000..3009e82 --- /dev/null +++ b/openapi_generated/pinterest_client/model/advanced_auction_processed_items.py @@ -0,0 +1,271 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.advanced_auction_processed_item import AdvancedAuctionProcessedItem + globals()['AdvancedAuctionProcessedItem'] = AdvancedAuctionProcessedItem + + +class AdvancedAuctionProcessedItems(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_id': (str,), # noqa: E501 + 'items': ([AdvancedAuctionProcessedItem],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_id': 'catalog_id', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdvancedAuctionProcessedItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to all items. [optional] # noqa: E501 + items ([AdvancedAuctionProcessedItem]): Array of advanced auction processed items. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AdvancedAuctionProcessedItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to all items. [optional] # noqa: E501 + items ([AdvancedAuctionProcessedItem]): Array of advanced auction processed items. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/age_bucket_list.py b/openapi_generated/pinterest_client/model/age_bucket_list.py index f33415a..bc690ff 100644 --- a/openapi_generated/pinterest_client/model/age_bucket_list.py +++ b/openapi_generated/pinterest_client/model/age_bucket_list.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/analytics_daily_metrics.py b/openapi_generated/pinterest_client/model/analytics_daily_metrics.py index f87d59a..d1207e1 100644 --- a/openapi_generated/pinterest_client/model/analytics_daily_metrics.py +++ b/openapi_generated/pinterest_client/model/analytics_daily_metrics.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/analytics_metrics_response.py b/openapi_generated/pinterest_client/model/analytics_metrics_response.py index e68b37c..af8f48a 100644 --- a/openapi_generated/pinterest_client/model/analytics_metrics_response.py +++ b/openapi_generated/pinterest_client/model/analytics_metrics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -88,8 +88,8 @@ def openapi_types(): """ lazy_import() return { - 'daily_metrics': ([AnalyticsDailyMetrics],), # noqa: E501 'summary_metrics': ({str: (float,)},), # noqa: E501 + 'daily_metrics': ([AnalyticsDailyMetrics],), # noqa: E501 } @cached_property @@ -98,8 +98,8 @@ def discriminator(): attribute_map = { - 'daily_metrics': 'daily_metrics', # noqa: E501 'summary_metrics': 'summary_metrics', # noqa: E501 + 'daily_metrics': 'daily_metrics', # noqa: E501 } read_only_vars = { @@ -143,8 +143,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - daily_metrics ([AnalyticsDailyMetrics]): Array with the requested daily metric records. [optional] # noqa: E501 summary_metrics ({str: (float,)}): The metric name and value over the requested period for each requested metric. [optional] # noqa: E501 + daily_metrics ([AnalyticsDailyMetrics]): Array with the requested daily metric records. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -226,8 +226,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - daily_metrics ([AnalyticsDailyMetrics]): Array with the requested daily metric records. [optional] # noqa: E501 summary_metrics ({str: (float,)}): The metric name and value over the requested period for each requested metric. [optional] # noqa: E501 + daily_metrics ([AnalyticsDailyMetrics]): Array with the requested daily metric records. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/analytics_response.py b/openapi_generated/pinterest_client/model/analytics_response.py index 1c879b4..7352de9 100644 --- a/openapi_generated/pinterest_client/model/analytics_response.py +++ b/openapi_generated/pinterest_client/model/analytics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/app_type_multipliers.py b/openapi_generated/pinterest_client/model/app_type_multipliers.py new file mode 100644 index 0000000..98c6e0d --- /dev/null +++ b/openapi_generated/pinterest_client/model/app_type_multipliers.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.targeting_spec_app_type import TargetingSpecAppType + globals()['TargetingSpecAppType'] = TargetingSpecAppType + + +class AppTypeMultipliers(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (float,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'app_type': (TargetingSpecAppType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'app_type': 'APP_TYPE', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AppTypeMultipliers - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + app_type (TargetingSpecAppType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AppTypeMultipliers - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + app_type (TargetingSpecAppType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/asset_group_binding.py b/openapi_generated/pinterest_client/model/asset_group_binding.py new file mode 100644 index 0000000..b9becc8 --- /dev/null +++ b/openapi_generated/pinterest_client/model/asset_group_binding.py @@ -0,0 +1,303 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_access_user_summary import BusinessAccessUserSummary + globals()['BusinessAccessUserSummary'] = BusinessAccessUserSummary + + +class AssetGroupBinding(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'asset_group_name': (str, none_type,), # noqa: E501 + 'asset_group_description': (str, none_type,), # noqa: E501 + 'asset_group_types': ([str],), # noqa: E501 + 'ad_accounts_ids': ([str], none_type,), # noqa: E501 + 'profiles_ids': ([str], none_type,), # noqa: E501 + 'created_time': (int, none_type,), # noqa: E501 + 'updated_time': (int, none_type,), # noqa: E501 + 'owner': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'created_by': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'asset_group_name': 'asset_group_name', # noqa: E501 + 'asset_group_description': 'asset_group_description', # noqa: E501 + 'asset_group_types': 'asset_group_types', # noqa: E501 + 'ad_accounts_ids': 'ad_accounts_ids', # noqa: E501 + 'profiles_ids': 'profiles_ids', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + 'updated_time': 'updated_time', # noqa: E501 + 'owner': 'owner', # noqa: E501 + 'created_by': 'created_by', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssetGroupBinding - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Asset Group ID.. [optional] # noqa: E501 + asset_group_name (str, none_type): Asset Group name. [optional] # noqa: E501 + asset_group_description (str, none_type): Asset group description. [optional] # noqa: E501 + asset_group_types ([str]): Asset group types. [optional] # noqa: E501 + ad_accounts_ids ([str], none_type): A list of ad account IDs under the asset group. [optional] # noqa: E501 + profiles_ids ([str], none_type): A list of profile IDs under asset group. [optional] # noqa: E501 + created_time (int, none_type): The creation time of the asset group. [optional] # noqa: E501 + updated_time (int, none_type): The last update time of the asset group. [optional] # noqa: E501 + owner ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The data of the business that owns the asset group.. [optional] # noqa: E501 + created_by ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The data of the user that created the asset group.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssetGroupBinding - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Asset Group ID.. [optional] # noqa: E501 + asset_group_name (str, none_type): Asset Group name. [optional] # noqa: E501 + asset_group_description (str, none_type): Asset group description. [optional] # noqa: E501 + asset_group_types ([str]): Asset group types. [optional] # noqa: E501 + ad_accounts_ids ([str], none_type): A list of ad account IDs under the asset group. [optional] # noqa: E501 + profiles_ids ([str], none_type): A list of profile IDs under asset group. [optional] # noqa: E501 + created_time (int, none_type): The creation time of the asset group. [optional] # noqa: E501 + updated_time (int, none_type): The last update time of the asset group. [optional] # noqa: E501 + owner ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The data of the business that owns the asset group.. [optional] # noqa: E501 + created_by ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The data of the user that created the asset group.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/asset_group_type.py b/openapi_generated/pinterest_client/model/asset_group_type.py new file mode 100644 index 0000000..47d3dad --- /dev/null +++ b/openapi_generated/pinterest_client/model/asset_group_type.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AssetGroupType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'BRAND': "BRAND", + 'LOCATION_OR_LANGUAGE': "LOCATION_OR_LANGUAGE", + 'PRODUCT_LINE': "PRODUCT_LINE", + 'OTHER': "OTHER", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AssetGroupType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Asset group type., must be one of ["BRAND", "LOCATION_OR_LANGUAGE", "PRODUCT_LINE", "OTHER", ] # noqa: E501 + + Keyword Args: + value (str): Asset group type., must be one of ["BRAND", "LOCATION_OR_LANGUAGE", "PRODUCT_LINE", "OTHER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AssetGroupType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Asset group type., must be one of ["BRAND", "LOCATION_OR_LANGUAGE", "PRODUCT_LINE", "OTHER", ] # noqa: E501 + + Keyword Args: + value (str): Asset group type., must be one of ["BRAND", "LOCATION_OR_LANGUAGE", "PRODUCT_LINE", "OTHER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/asset_group_types.py b/openapi_generated/pinterest_client/model/asset_group_types.py new file mode 100644 index 0000000..a8cc209 --- /dev/null +++ b/openapi_generated/pinterest_client/model/asset_group_types.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_group_type import AssetGroupType + globals()['AssetGroupType'] = AssetGroupType + + +class AssetGroupTypes(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'value': ([AssetGroupType],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AssetGroupTypes - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([AssetGroupType]): Asset Group Types. Note: The asset group types are used for user reference and categorization purposes only and do not impact the functionality of the asset group.. # noqa: E501 + + Keyword Args: + value ([AssetGroupType]): Asset Group Types. Note: The asset group types are used for user reference and categorization purposes only and do not impact the functionality of the asset group.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AssetGroupTypes - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([AssetGroupType]): Asset Group Types. Note: The asset group types are used for user reference and categorization purposes only and do not impact the functionality of the asset group.. # noqa: E501 + + Keyword Args: + value ([AssetGroupType]): Asset Group Types. Note: The asset group types are used for user reference and categorization purposes only and do not impact the functionality of the asset group.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/asset_id_permissions.py b/openapi_generated/pinterest_client/model/asset_id_permissions.py new file mode 100644 index 0000000..bbcdf2e --- /dev/null +++ b/openapi_generated/pinterest_client/model/asset_id_permissions.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_group_binding import AssetGroupBinding + from openapi_generated.pinterest_client.model.permissions_response import PermissionsResponse + globals()['AssetGroupBinding'] = AssetGroupBinding + globals()['PermissionsResponse'] = PermissionsResponse + + +class AssetIdPermissions(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_id': (str,), # noqa: E501 + 'asset_type': (str,), # noqa: E501 + 'permissions': (PermissionsResponse,), # noqa: E501 + 'asset_group_info': (AssetGroupBinding,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_id': 'asset_id', # noqa: E501 + 'asset_type': 'asset_type', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + 'asset_group_info': 'asset_group_info', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssetIdPermissions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + asset_type (str): Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + asset_group_info (AssetGroupBinding): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssetIdPermissions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + asset_type (str): Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + asset_group_info (AssetGroupBinding): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/asset_id_to_permissions.py b/openapi_generated/pinterest_client/model/asset_id_to_permissions.py new file mode 100644 index 0000000..23a0816 --- /dev/null +++ b/openapi_generated/pinterest_client/model/asset_id_to_permissions.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.permissions import Permissions + globals()['Permissions'] = Permissions + + +class AssetIdToPermissions(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('value',): { + 'min_properties': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return ([Permissions],) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssetIdToPermissions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssetIdToPermissions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/audience.py b/openapi_generated/pinterest_client/model/audience.py index 752d590..295ea65 100644 --- a/openapi_generated/pinterest_client/model/audience.py +++ b/openapi_generated/pinterest_client/model/audience.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_account_type.py b/openapi_generated/pinterest_client/model/audience_account_type.py new file mode 100644 index 0000000..2be41cb --- /dev/null +++ b/openapi_generated/pinterest_client/model/audience_account_type.py @@ -0,0 +1,275 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AudienceAccountType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'AD_ACCOUNT': "AD_ACCOUNT", + 'BUSINESS_ACCOUNT': "BUSINESS_ACCOUNT", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AudienceAccountType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): if omitted defaults to "AD_ACCOUNT", must be one of ["AD_ACCOUNT", "BUSINESS_ACCOUNT", ] # noqa: E501 + + Keyword Args: + value (str): if omitted defaults to "AD_ACCOUNT", must be one of ["AD_ACCOUNT", "BUSINESS_ACCOUNT", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "AD_ACCOUNT" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AudienceAccountType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): if omitted defaults to "AD_ACCOUNT", must be one of ["AD_ACCOUNT", "BUSINESS_ACCOUNT", ] # noqa: E501 + + Keyword Args: + value (str): if omitted defaults to "AD_ACCOUNT", must be one of ["AD_ACCOUNT", "BUSINESS_ACCOUNT", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "AD_ACCOUNT" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/audience_category.py b/openapi_generated/pinterest_client/model/audience_category.py index 6c7b6d8..611fe19 100644 --- a/openapi_generated/pinterest_client/model/audience_category.py +++ b/openapi_generated/pinterest_client/model/audience_category.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -30,6 +30,10 @@ from openapi_generated.pinterest_client.exceptions import ApiAttributeError +def lazy_import(): + from openapi_generated.pinterest_client.model.audience_subcategory import AudienceSubcategory + globals()['AudienceSubcategory'] = AudienceSubcategory + class AudienceCategory(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -67,6 +71,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ + lazy_import() return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -81,12 +86,14 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ + lazy_import() return { 'key': (str,), # noqa: E501 'name': (str,), # noqa: E501 'ratio': (float,), # noqa: E501 'index': (float,), # noqa: E501 'id': (str,), # noqa: E501 + 'subcategories': ([AudienceSubcategory],), # noqa: E501 } @cached_property @@ -100,6 +107,7 @@ def discriminator(): 'ratio': 'ratio', # noqa: E501 'index': 'index', # noqa: E501 'id': 'id', # noqa: E501 + 'subcategories': 'subcategories', # noqa: E501 } read_only_vars = { @@ -148,6 +156,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ratio (float): Interest's percent of category's total audience.. [optional] # noqa: E501 index (float): Interest affinity index.. [optional] # noqa: E501 id (str): Interest ID.. [optional] # noqa: E501 + subcategories ([AudienceSubcategory]): Subcategory interest distribution. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -234,6 +243,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 ratio (float): Interest's percent of category's total audience.. [optional] # noqa: E501 index (float): Interest affinity index.. [optional] # noqa: E501 id (str): Interest ID.. [optional] # noqa: E501 + subcategories ([AudienceSubcategory]): Subcategory interest distribution. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/audience_common.py b/openapi_generated/pinterest_client/model/audience_common.py index 709b955..c627507 100644 --- a/openapi_generated/pinterest_client/model/audience_common.py +++ b/openapi_generated/pinterest_client/model/audience_common.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_create_custom_request.py b/openapi_generated/pinterest_client/model/audience_create_custom_request.py index c57e09e..a5ece9d 100644 --- a/openapi_generated/pinterest_client/model/audience_create_custom_request.py +++ b/openapi_generated/pinterest_client/model/audience_create_custom_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_create_custom_request1.py b/openapi_generated/pinterest_client/model/audience_create_custom_request1.py index 560b1fa..a44ee1e 100644 --- a/openapi_generated/pinterest_client/model/audience_create_custom_request1.py +++ b/openapi_generated/pinterest_client/model/audience_create_custom_request1.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_create_request.py b/openapi_generated/pinterest_client/model/audience_create_request.py index 5fa6dda..5c2f83b 100644 --- a/openapi_generated/pinterest_client/model/audience_create_request.py +++ b/openapi_generated/pinterest_client/model/audience_create_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_create_request1.py b/openapi_generated/pinterest_client/model/audience_create_request1.py index 65d2df1..4fefe56 100644 --- a/openapi_generated/pinterest_client/model/audience_create_request1.py +++ b/openapi_generated/pinterest_client/model/audience_create_request1.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_data_party.py b/openapi_generated/pinterest_client/model/audience_data_party.py index 93e0516..faa962e 100644 --- a/openapi_generated/pinterest_client/model/audience_data_party.py +++ b/openapi_generated/pinterest_client/model/audience_data_party.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_definition.py b/openapi_generated/pinterest_client/model/audience_definition.py index 04694c0..ac6e2ba 100644 --- a/openapi_generated/pinterest_client/model/audience_definition.py +++ b/openapi_generated/pinterest_client/model/audience_definition.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_definition_response.py b/openapi_generated/pinterest_client/model/audience_definition_response.py index a2adc4c..ad10dd5 100644 --- a/openapi_generated/pinterest_client/model/audience_definition_response.py +++ b/openapi_generated/pinterest_client/model/audience_definition_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_demographic_value.py b/openapi_generated/pinterest_client/model/audience_demographic_value.py index 3c283d5..7f1c860 100644 --- a/openapi_generated/pinterest_client/model/audience_demographic_value.py +++ b/openapi_generated/pinterest_client/model/audience_demographic_value.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_demographics.py b/openapi_generated/pinterest_client/model/audience_demographics.py index f6c771c..15d1262 100644 --- a/openapi_generated/pinterest_client/model/audience_demographics.py +++ b/openapi_generated/pinterest_client/model/audience_demographics.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_insight_category_array_response.py b/openapi_generated/pinterest_client/model/audience_insight_category_array_response.py index 7fb11ef..c9c9725 100644 --- a/openapi_generated/pinterest_client/model/audience_insight_category_array_response.py +++ b/openapi_generated/pinterest_client/model/audience_insight_category_array_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_insight_category_common.py b/openapi_generated/pinterest_client/model/audience_insight_category_common.py index 9db5293..2e10366 100644 --- a/openapi_generated/pinterest_client/model/audience_insight_category_common.py +++ b/openapi_generated/pinterest_client/model/audience_insight_category_common.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_insight_type.py b/openapi_generated/pinterest_client/model/audience_insight_type.py index aa66db0..38707e8 100644 --- a/openapi_generated/pinterest_client/model/audience_insight_type.py +++ b/openapi_generated/pinterest_client/model/audience_insight_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_insights_response.py b/openapi_generated/pinterest_client/model/audience_insights_response.py index 16f3155..2acbbb9 100644 --- a/openapi_generated/pinterest_client/model/audience_insights_response.py +++ b/openapi_generated/pinterest_client/model/audience_insights_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_rule.py b/openapi_generated/pinterest_client/model/audience_rule.py index 81b0c8c..ca6578b 100644 --- a/openapi_generated/pinterest_client/model/audience_rule.py +++ b/openapi_generated/pinterest_client/model/audience_rule.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_share_type.py b/openapi_generated/pinterest_client/model/audience_share_type.py new file mode 100644 index 0000000..7a7b2b2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/audience_share_type.py @@ -0,0 +1,275 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AudienceShareType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'SHARED': "SHARED", + 'RECEIVED': "RECEIVED", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AudienceShareType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): if omitted defaults to "SHARED", must be one of ["SHARED", "RECEIVED", ] # noqa: E501 + + Keyword Args: + value (str): if omitted defaults to "SHARED", must be one of ["SHARED", "RECEIVED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "SHARED" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AudienceShareType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): if omitted defaults to "SHARED", must be one of ["SHARED", "RECEIVED", ] # noqa: E501 + + Keyword Args: + value (str): if omitted defaults to "SHARED", must be one of ["SHARED", "RECEIVED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "SHARED" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/audience_sharing_type.py b/openapi_generated/pinterest_client/model/audience_sharing_type.py index ad55483..9039210 100644 --- a/openapi_generated/pinterest_client/model/audience_sharing_type.py +++ b/openapi_generated/pinterest_client/model/audience_sharing_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_subcategory.py b/openapi_generated/pinterest_client/model/audience_subcategory.py new file mode 100644 index 0000000..93bb8ab --- /dev/null +++ b/openapi_generated/pinterest_client/model/audience_subcategory.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class AudienceSubcategory(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'key': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'ratio': (float,), # noqa: E501 + 'index': (float,), # noqa: E501 + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'key': 'key', # noqa: E501 + 'name': 'name', # noqa: E501 + 'ratio': 'ratio', # noqa: E501 + 'index': 'index', # noqa: E501 + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AudienceSubcategory - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + key (str): Interest unique key (same as ID).. [optional] # noqa: E501 + name (str): Subinterest name.. [optional] # noqa: E501 + ratio (float): Subinterest's percent of category's total audience.. [optional] # noqa: E501 + index (float): Subinterest affinity index.. [optional] # noqa: E501 + id (str): Subinterest ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AudienceSubcategory - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + key (str): Interest unique key (same as ID).. [optional] # noqa: E501 + name (str): Subinterest name.. [optional] # noqa: E501 + ratio (float): Subinterest's percent of category's total audience.. [optional] # noqa: E501 + index (float): Subinterest affinity index.. [optional] # noqa: E501 + id (str): Subinterest ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/audience_type.py b/openapi_generated/pinterest_client/model/audience_type.py index f9c3f2d..9146003 100644 --- a/openapi_generated/pinterest_client/model/audience_type.py +++ b/openapi_generated/pinterest_client/model/audience_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -57,6 +57,7 @@ class AudienceType(ModelSimple): 'VISITOR': "VISITOR", 'ENGAGEMENT': "ENGAGEMENT", 'ACTALIKE': "ACTALIKE", + 'PERSONA': "PERSONA", }, } @@ -108,10 +109,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Audience type., must be one of ["CUSTOMER_LIST", "VISITOR", "ENGAGEMENT", "ACTALIKE", ] # noqa: E501 + args[0] (str): Audience type., must be one of ["CUSTOMER_LIST", "VISITOR", "ENGAGEMENT", "ACTALIKE", "PERSONA", ] # noqa: E501 Keyword Args: - value (str): Audience type., must be one of ["CUSTOMER_LIST", "VISITOR", "ENGAGEMENT", "ACTALIKE", ] # noqa: E501 + value (str): Audience type., must be one of ["CUSTOMER_LIST", "VISITOR", "ENGAGEMENT", "ACTALIKE", "PERSONA", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -198,10 +199,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Audience type., must be one of ["CUSTOMER_LIST", "VISITOR", "ENGAGEMENT", "ACTALIKE", ] # noqa: E501 + args[0] (str): Audience type., must be one of ["CUSTOMER_LIST", "VISITOR", "ENGAGEMENT", "ACTALIKE", "PERSONA", ] # noqa: E501 Keyword Args: - value (str): Audience type., must be one of ["CUSTOMER_LIST", "VISITOR", "ENGAGEMENT", "ACTALIKE", ] # noqa: E501 + value (str): Audience type., must be one of ["CUSTOMER_LIST", "VISITOR", "ENGAGEMENT", "ACTALIKE", "PERSONA", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/audience_update_operation_type.py b/openapi_generated/pinterest_client/model/audience_update_operation_type.py index 8294294..1c41aeb 100644 --- a/openapi_generated/pinterest_client/model/audience_update_operation_type.py +++ b/openapi_generated/pinterest_client/model/audience_update_operation_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_update_request.py b/openapi_generated/pinterest_client/model/audience_update_request.py index b818c74..d15c3c1 100644 --- a/openapi_generated/pinterest_client/model/audience_update_request.py +++ b/openapi_generated/pinterest_client/model/audience_update_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/audience_update_request1.py b/openapi_generated/pinterest_client/model/audience_update_request1.py index 9cb30e2..d0e7001 100644 --- a/openapi_generated/pinterest_client/model/audience_update_request1.py +++ b/openapi_generated/pinterest_client/model/audience_update_request1.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/auth_respond_invites_body.py b/openapi_generated/pinterest_client/model/auth_respond_invites_body.py new file mode 100644 index 0000000..63ca2af --- /dev/null +++ b/openapi_generated/pinterest_client/model/auth_respond_invites_body.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.auth_respond_invites_body_invites import AuthRespondInvitesBodyInvites + globals()['AuthRespondInvitesBodyInvites'] = AuthRespondInvitesBodyInvites + + +class AuthRespondInvitesBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('invites',): { + 'max_items': 100, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'invites': ([AuthRespondInvitesBodyInvites],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'invites': 'invites', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, invites, *args, **kwargs): # noqa: E501 + """AuthRespondInvitesBody - a model defined in OpenAPI + + Args: + invites ([AuthRespondInvitesBodyInvites]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.invites = invites + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, invites, *args, **kwargs): # noqa: E501 + """AuthRespondInvitesBody - a model defined in OpenAPI + + Args: + invites ([AuthRespondInvitesBodyInvites]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.invites = invites + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/auth_respond_invites_body_action.py b/openapi_generated/pinterest_client/model/auth_respond_invites_body_action.py new file mode 100644 index 0000000..1535113 --- /dev/null +++ b/openapi_generated/pinterest_client/model/auth_respond_invites_body_action.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_id_to_permissions import AssetIdToPermissions + globals()['AssetIdToPermissions'] = AssetIdToPermissions + + +class AuthRespondInvitesBodyAction(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'accept_invite': (bool,), # noqa: E501 + 'asset_id_to_permissions': (AssetIdToPermissions,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'accept_invite': 'accept_invite', # noqa: E501 + 'asset_id_to_permissions': 'asset_id_to_permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, accept_invite, *args, **kwargs): # noqa: E501 + """AuthRespondInvitesBodyAction - a model defined in OpenAPI + + Args: + accept_invite (bool): Whether the invite/request is accepted. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id_to_permissions (AssetIdToPermissions): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.accept_invite = accept_invite + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, accept_invite, *args, **kwargs): # noqa: E501 + """AuthRespondInvitesBodyAction - a model defined in OpenAPI + + Args: + accept_invite (bool): Whether the invite/request is accepted. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id_to_permissions (AssetIdToPermissions): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.accept_invite = accept_invite + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/auth_respond_invites_body_invites.py b/openapi_generated/pinterest_client/model/auth_respond_invites_body_invites.py new file mode 100644 index 0000000..7c132c9 --- /dev/null +++ b/openapi_generated/pinterest_client/model/auth_respond_invites_body_invites.py @@ -0,0 +1,281 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.auth_respond_invites_body_action import AuthRespondInvitesBodyAction + globals()['AuthRespondInvitesBodyAction'] = AuthRespondInvitesBodyAction + + +class AuthRespondInvitesBodyInvites(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('invite_id',): { + 'max_length': 25, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'action': (AuthRespondInvitesBodyAction,), # noqa: E501 + 'invite_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'action': 'action', # noqa: E501 + 'invite_id': 'invite_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, action, invite_id, *args, **kwargs): # noqa: E501 + """AuthRespondInvitesBodyInvites - a model defined in OpenAPI + + Args: + action (AuthRespondInvitesBodyAction): + invite_id (str): Unique identifier of an invite. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.action = action + self.invite_id = invite_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, action, invite_id, *args, **kwargs): # noqa: E501 + """AuthRespondInvitesBodyInvites - a model defined in OpenAPI + + Args: + action (AuthRespondInvitesBodyAction): + invite_id (str): Unique identifier of an invite. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.action = action + self.invite_id = invite_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/availability_filter.py b/openapi_generated/pinterest_client/model/availability_filter.py index 3fc5210..2efc032 100644 --- a/openapi_generated/pinterest_client/model/availability_filter.py +++ b/openapi_generated/pinterest_client/model/availability_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/base_invite_data_response.py b/openapi_generated/pinterest_client/model/base_invite_data_response.py new file mode 100644 index 0000000..c2a6095 --- /dev/null +++ b/openapi_generated/pinterest_client/model/base_invite_data_response.py @@ -0,0 +1,281 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.base_invite_data_response_invite_data import BaseInviteDataResponseInviteData + from openapi_generated.pinterest_client.model.business_access_user_summary import BusinessAccessUserSummary + globals()['BaseInviteDataResponseInviteData'] = BaseInviteDataResponseInviteData + globals()['BusinessAccessUserSummary'] = BusinessAccessUserSummary + + +class BaseInviteDataResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'invite_data': (BaseInviteDataResponseInviteData,), # noqa: E501 + 'is_received_invite': (bool,), # noqa: E501 + 'user': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'invite_data': 'invite_data', # noqa: E501 + 'is_received_invite': 'is_received_invite', # noqa: E501 + 'user': 'user', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BaseInviteDataResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the invite/request.. [optional] # noqa: E501 + invite_data (BaseInviteDataResponseInviteData): [optional] # noqa: E501 + is_received_invite (bool): Indicates whether the invite/request was received.. [optional] # noqa: E501 + user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Metadata for the member/partner that was sent the invite/request.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BaseInviteDataResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the invite/request.. [optional] # noqa: E501 + invite_data (BaseInviteDataResponseInviteData): [optional] # noqa: E501 + is_received_invite (bool): Indicates whether the invite/request was received.. [optional] # noqa: E501 + user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Metadata for the member/partner that was sent the invite/request.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/base_invite_data_response_invite_data.py b/openapi_generated/pinterest_client/model/base_invite_data_response_invite_data.py new file mode 100644 index 0000000..704fcf2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/base_invite_data_response_invite_data.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BaseInviteDataResponseInviteData(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'invite_expiration': (int,), # noqa: E501 + 'invite_status': (str,), # noqa: E501 + 'invite_type': (str,), # noqa: E501 + 'last_updated_time': (int,), # noqa: E501 + 'sent_at': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'invite_expiration': 'invite_expiration', # noqa: E501 + 'invite_status': 'invite_status', # noqa: E501 + 'invite_type': 'invite_type', # noqa: E501 + 'last_updated_time': 'last_updated_time', # noqa: E501 + 'sent_at': 'sent_at', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BaseInviteDataResponseInviteData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invite_expiration (int): The date and time when the invite/request will expire. Returned in milliseconds.. [optional] # noqa: E501 + invite_status (str): The current status of the invite. The invite can be in one of the following states PENDING, ACCEPTED, DECLINED, CANCELLED, EXPIRED.. [optional] # noqa: E501 + invite_type (str): The type of invite.
'MEMBER_INVITE' is to invite a member to access your business assets.
'PARTNER_INVITE' is to invite a partner to access your business assets.
'PARTNER_REQUEST' is to request access a partner's business assets.. [optional] # noqa: E501 + last_updated_time (int): The date and time the invite/request was last updated. Returned in milliseconds.. [optional] # noqa: E501 + sent_at (int): The date and time the invite/request was sent/created. Returned in milliseconds.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BaseInviteDataResponseInviteData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invite_expiration (int): The date and time when the invite/request will expire. Returned in milliseconds.. [optional] # noqa: E501 + invite_status (str): The current status of the invite. The invite can be in one of the following states PENDING, ACCEPTED, DECLINED, CANCELLED, EXPIRED.. [optional] # noqa: E501 + invite_type (str): The type of invite.
'MEMBER_INVITE' is to invite a member to access your business assets.
'PARTNER_INVITE' is to invite a partner to access your business assets.
'PARTNER_REQUEST' is to request access a partner's business assets.. [optional] # noqa: E501 + last_updated_time (int): The date and time the invite/request was last updated. Returned in milliseconds.. [optional] # noqa: E501 + sent_at (int): The date and time the invite/request was sent/created. Returned in milliseconds.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/batch_operation.py b/openapi_generated/pinterest_client/model/batch_operation.py index ec4b8cb..3e51532 100644 --- a/openapi_generated/pinterest_client/model/batch_operation.py +++ b/openapi_generated/pinterest_client/model/batch_operation.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -54,6 +54,7 @@ class BatchOperation(ModelSimple): allowed_values = { ('value',): { 'UPDATE': "UPDATE", + 'UPSERT': "UPSERT", 'CREATE': "CREATE", 'DELETE_DISCONTINUED': "DELETE_DISCONTINUED", 'DELETE': "DELETE", @@ -108,10 +109,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): The operation performed by the batch. The DELETE_DISCONTINUED operation only updates availablity to \"Out of Stock\".., must be one of ["UPDATE", "CREATE", "DELETE_DISCONTINUED", "DELETE", ] # noqa: E501 + args[0] (str): The operation performed by the batch. The DELETE_DISCONTINUED operation only updates availablity to \"Out of Stock\".., must be one of ["UPDATE", "UPSERT", "CREATE", "DELETE_DISCONTINUED", "DELETE", ] # noqa: E501 Keyword Args: - value (str): The operation performed by the batch. The DELETE_DISCONTINUED operation only updates availablity to \"Out of Stock\".., must be one of ["UPDATE", "CREATE", "DELETE_DISCONTINUED", "DELETE", ] # noqa: E501 + value (str): The operation performed by the batch. The DELETE_DISCONTINUED operation only updates availablity to \"Out of Stock\".., must be one of ["UPDATE", "UPSERT", "CREATE", "DELETE_DISCONTINUED", "DELETE", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -198,10 +199,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): The operation performed by the batch. The DELETE_DISCONTINUED operation only updates availablity to \"Out of Stock\".., must be one of ["UPDATE", "CREATE", "DELETE_DISCONTINUED", "DELETE", ] # noqa: E501 + args[0] (str): The operation performed by the batch. The DELETE_DISCONTINUED operation only updates availablity to \"Out of Stock\".., must be one of ["UPDATE", "UPSERT", "CREATE", "DELETE_DISCONTINUED", "DELETE", ] # noqa: E501 Keyword Args: - value (str): The operation performed by the batch. The DELETE_DISCONTINUED operation only updates availablity to \"Out of Stock\".., must be one of ["UPDATE", "CREATE", "DELETE_DISCONTINUED", "DELETE", ] # noqa: E501 + value (str): The operation performed by the batch. The DELETE_DISCONTINUED operation only updates availablity to \"Out of Stock\".., must be one of ["UPDATE", "UPSERT", "CREATE", "DELETE_DISCONTINUED", "DELETE", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/batch_operation_status.py b/openapi_generated/pinterest_client/model/batch_operation_status.py index 855c9f6..3c0a4bf 100644 --- a/openapi_generated/pinterest_client/model/batch_operation_status.py +++ b/openapi_generated/pinterest_client/model/batch_operation_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -55,6 +55,7 @@ class BatchOperationStatus(ModelSimple): ('value',): { 'PROCESSING': "PROCESSING", 'COMPLETED': "COMPLETED", + 'FAILED': "FAILED", }, } @@ -106,10 +107,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): The status of the operation performed by the batch., must be one of ["PROCESSING", "COMPLETED", ] # noqa: E501 + args[0] (str): The status of the operation performed by the batch., must be one of ["PROCESSING", "COMPLETED", "FAILED", ] # noqa: E501 Keyword Args: - value (str): The status of the operation performed by the batch., must be one of ["PROCESSING", "COMPLETED", ] # noqa: E501 + value (str): The status of the operation performed by the batch., must be one of ["PROCESSING", "COMPLETED", "FAILED", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -196,10 +197,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): The status of the operation performed by the batch., must be one of ["PROCESSING", "COMPLETED", ] # noqa: E501 + args[0] (str): The status of the operation performed by the batch., must be one of ["PROCESSING", "COMPLETED", "FAILED", ] # noqa: E501 Keyword Args: - value (str): The status of the operation performed by the batch., must be one of ["PROCESSING", "COMPLETED", ] # noqa: E501 + value (str): The status of the operation performed by the batch., must be one of ["PROCESSING", "COMPLETED", "FAILED", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/bid_floor.py b/openapi_generated/pinterest_client/model/bid_floor.py index e2a23fe..2b86d0a 100644 --- a/openapi_generated/pinterest_client/model/bid_floor.py +++ b/openapi_generated/pinterest_client/model/bid_floor.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bid_floor_request.py b/openapi_generated/pinterest_client/model/bid_floor_request.py index 2a18c6b..6088092 100644 --- a/openapi_generated/pinterest_client/model/bid_floor_request.py +++ b/openapi_generated/pinterest_client/model/bid_floor_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bid_floor_spec.py b/openapi_generated/pinterest_client/model/bid_floor_spec.py index e9cb3b4..04e2a97 100644 --- a/openapi_generated/pinterest_client/model/bid_floor_spec.py +++ b/openapi_generated/pinterest_client/model/bid_floor_spec.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/billing_profiles_response.py b/openapi_generated/pinterest_client/model/billing_profiles_response.py new file mode 100644 index 0000000..30db2a8 --- /dev/null +++ b/openapi_generated/pinterest_client/model/billing_profiles_response.py @@ -0,0 +1,310 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BillingProfilesResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('card_type',): { + 'UNKNOWN': "UNKNOWN", + 'VISA': "VISA", + 'MASTERCARD': "MASTERCARD", + 'AMERICAN_EXPRESS': "AMERICAN_EXPRESS", + 'DISCOVER': "DISCOVER", + 'ELO': "ELO", + }, + ('status',): { + 'UNSPECIFIED': "UNSPECIFIED", + 'VALID': "VALID", + 'INVALID': "INVALID", + 'PENDING': "PENDING", + 'DELETED': "DELETED", + 'SECONDARY': "SECONDARY", + 'PENDING_SECONDARY': "PENDING_SECONDARY", + }, + ('payment_method_brand',): { + 'UNKNOWN': "UNKNOWN", + 'VISA': "VISA", + 'MASTERCARD': "MASTERCARD", + 'AMERICAN_EXPRESS': "AMERICAN_EXPRESS", + 'DISCOVER': "DISCOVER", + 'SOFORT': "SOFORT", + 'DINERS_CLUB': "DINERS_CLUB", + 'ELO': "ELO", + 'CARTE_BANCAIRE': "CARTE_BANCAIRE", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('advertiser_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'card_type': (str,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'advertiser_id': (str,), # noqa: E501 + 'payment_method_brand': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'card_type': 'card_type', # noqa: E501 + 'status': 'status', # noqa: E501 + 'advertiser_id': 'advertiser_id', # noqa: E501 + 'payment_method_brand': 'payment_method_brand', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BillingProfilesResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Billing ID.. [optional] # noqa: E501 + card_type (str): Type of the card.. [optional] # noqa: E501 + status (str): Status of the billing.. [optional] # noqa: E501 + advertiser_id (str): Advertiser ID of the billing.. [optional] # noqa: E501 + payment_method_brand (str): Brand of the payment method.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BillingProfilesResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Billing ID.. [optional] # noqa: E501 + card_type (str): Type of the card.. [optional] # noqa: E501 + status (str): Status of the billing.. [optional] # noqa: E501 + advertiser_id (str): Advertiser ID of the billing.. [optional] # noqa: E501 + payment_method_brand (str): Brand of the payment method.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/board.py b/openapi_generated/pinterest_client/model/board.py index 38d7fe8..d28f271 100644 --- a/openapi_generated/pinterest_client/model/board.py +++ b/openapi_generated/pinterest_client/model/board.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/board_media.py b/openapi_generated/pinterest_client/model/board_media.py index 78a657d..298096a 100644 --- a/openapi_generated/pinterest_client/model/board_media.py +++ b/openapi_generated/pinterest_client/model/board_media.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/board_owner.py b/openapi_generated/pinterest_client/model/board_owner.py index 1cdc427..3fa7230 100644 --- a/openapi_generated/pinterest_client/model/board_owner.py +++ b/openapi_generated/pinterest_client/model/board_owner.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/board_section.py b/openapi_generated/pinterest_client/model/board_section.py index 26b6b13..2e93c9b 100644 --- a/openapi_generated/pinterest_client/model/board_section.py +++ b/openapi_generated/pinterest_client/model/board_section.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -86,8 +86,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 'name': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 } @cached_property @@ -96,8 +96,8 @@ def discriminator(): attribute_map = { - 'id': 'id', # noqa: E501 'name': 'name', # noqa: E501 + 'id': 'id', # noqa: E501 } read_only_vars = { @@ -108,9 +108,12 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 """BoardSection - a model defined in OpenAPI + Args: + name (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -143,7 +146,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) id (str): [optional] # noqa: E501 - name (str): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -171,6 +173,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.name = name for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -191,9 +194,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, name, *args, **kwargs): # noqa: E501 """BoardSection - a model defined in OpenAPI + Args: + name (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -226,7 +232,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) id (str): [optional] # noqa: E501 - name (str): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -252,6 +257,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.name = name for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/openapi_generated/pinterest_client/model/board_update.py b/openapi_generated/pinterest_client/model/board_update.py index b7e721b..9508afc 100644 --- a/openapi_generated/pinterest_client/model/board_update.py +++ b/openapi_generated/pinterest_client/model/board_update.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/book_closed_response.py b/openapi_generated/pinterest_client/model/book_closed_response.py index 0e01c35..e47d0d5 100644 --- a/openapi_generated/pinterest_client/model/book_closed_response.py +++ b/openapi_generated/pinterest_client/model/book_closed_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/brand_filter.py b/openapi_generated/pinterest_client/model/brand_filter.py index 79774f0..7644177 100644 --- a/openapi_generated/pinterest_client/model/brand_filter.py +++ b/openapi_generated/pinterest_client/model/brand_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/budget_type.py b/openapi_generated/pinterest_client/model/budget_type.py index e9e7c9f..ed597d1 100644 --- a/openapi_generated/pinterest_client/model/budget_type.py +++ b/openapi_generated/pinterest_client/model/budget_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -107,10 +107,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed.., must be one of ["DAILY", "LIFETIME", "CBO_ADGROUP", ] # noqa: E501 + args[0] (str): Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed. For update, only draft ad groups may update budget type.., must be one of ["DAILY", "LIFETIME", "CBO_ADGROUP", ] # noqa: E501 Keyword Args: - value (str): Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed.., must be one of ["DAILY", "LIFETIME", "CBO_ADGROUP", ] # noqa: E501 + value (str): Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed. For update, only draft ad groups may update budget type.., must be one of ["DAILY", "LIFETIME", "CBO_ADGROUP", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -197,10 +197,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed.., must be one of ["DAILY", "LIFETIME", "CBO_ADGROUP", ] # noqa: E501 + args[0] (str): Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed. For update, only draft ad groups may update budget type.., must be one of ["DAILY", "LIFETIME", "CBO_ADGROUP", ] # noqa: E501 Keyword Args: - value (str): Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed.., must be one of ["DAILY", "LIFETIME", "CBO_ADGROUP", ] # noqa: E501 + value (str): Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed. For update, only draft ad groups may update budget type.., must be one of ["DAILY", "LIFETIME", "CBO_ADGROUP", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/bulk_download_request.py b/openapi_generated/pinterest_client/model/bulk_download_request.py index 84868eb..bfdf310 100644 --- a/openapi_generated/pinterest_client/model/bulk_download_request.py +++ b/openapi_generated/pinterest_client/model/bulk_download_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_download_request_campaign_filter.py b/openapi_generated/pinterest_client/model/bulk_download_request_campaign_filter.py index ddf109d..94510bd 100644 --- a/openapi_generated/pinterest_client/model/bulk_download_request_campaign_filter.py +++ b/openapi_generated/pinterest_client/model/bulk_download_request_campaign_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_download_response.py b/openapi_generated/pinterest_client/model/bulk_download_response.py index c4a1fad..a7894b5 100644 --- a/openapi_generated/pinterest_client/model/bulk_download_response.py +++ b/openapi_generated/pinterest_client/model/bulk_download_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_entity_type.py b/openapi_generated/pinterest_client/model/bulk_entity_type.py index 53ca2aa..073e177 100644 --- a/openapi_generated/pinterest_client/model/bulk_entity_type.py +++ b/openapi_generated/pinterest_client/model/bulk_entity_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_output_format.py b/openapi_generated/pinterest_client/model/bulk_output_format.py index dd21f5a..c1c499b 100644 --- a/openapi_generated/pinterest_client/model/bulk_output_format.py +++ b/openapi_generated/pinterest_client/model/bulk_output_format.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_pin_analytics_response.py b/openapi_generated/pinterest_client/model/bulk_pin_analytics_response.py new file mode 100644 index 0000000..9c60fa7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/bulk_pin_analytics_response.py @@ -0,0 +1,258 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.pin_analytics_response import PinAnalyticsResponse + globals()['PinAnalyticsResponse'] = PinAnalyticsResponse + + +class BulkPinAnalyticsResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (PinAnalyticsResponse,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BulkPinAnalyticsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BulkPinAnalyticsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/bulk_reporting_job_status.py b/openapi_generated/pinterest_client/model/bulk_reporting_job_status.py index c6fceb6..d2ed2f4 100644 --- a/openapi_generated/pinterest_client/model/bulk_reporting_job_status.py +++ b/openapi_generated/pinterest_client/model/bulk_reporting_job_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_upsert_request.py b/openapi_generated/pinterest_client/model/bulk_upsert_request.py index 223d83b..f14cccc 100644 --- a/openapi_generated/pinterest_client/model/bulk_upsert_request.py +++ b/openapi_generated/pinterest_client/model/bulk_upsert_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_upsert_request_create.py b/openapi_generated/pinterest_client/model/bulk_upsert_request_create.py index 95b8443..6b4ed60 100644 --- a/openapi_generated/pinterest_client/model/bulk_upsert_request_create.py +++ b/openapi_generated/pinterest_client/model/bulk_upsert_request_create.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_upsert_request_update.py b/openapi_generated/pinterest_client/model/bulk_upsert_request_update.py index aa4a4d7..a928bb8 100644 --- a/openapi_generated/pinterest_client/model/bulk_upsert_request_update.py +++ b/openapi_generated/pinterest_client/model/bulk_upsert_request_update.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_upsert_response.py b/openapi_generated/pinterest_client/model/bulk_upsert_response.py index 4d3a94d..dda158d 100644 --- a/openapi_generated/pinterest_client/model/bulk_upsert_response.py +++ b/openapi_generated/pinterest_client/model/bulk_upsert_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_upsert_status.py b/openapi_generated/pinterest_client/model/bulk_upsert_status.py index d33afef..1e0d60a 100644 --- a/openapi_generated/pinterest_client/model/bulk_upsert_status.py +++ b/openapi_generated/pinterest_client/model/bulk_upsert_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/bulk_upsert_status_response.py b/openapi_generated/pinterest_client/model/bulk_upsert_status_response.py index 74373d2..4b8a4a3 100644 --- a/openapi_generated/pinterest_client/model/bulk_upsert_status_response.py +++ b/openapi_generated/pinterest_client/model/bulk_upsert_status_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/business_access_error.py b/openapi_generated/pinterest_client/model/business_access_error.py new file mode 100644 index 0000000..32b6124 --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_access_error.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BusinessAccessError(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'code': 'code', # noqa: E501 + 'message': 'message', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, code, message, *args, **kwargs): # noqa: E501 + """BusinessAccessError - a model defined in OpenAPI + + Args: + code (int): + message (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.code = code + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, code, message, *args, **kwargs): # noqa: E501 + """BusinessAccessError - a model defined in OpenAPI + + Args: + code (int): + message (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.code = code + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/business_access_role.py b/openapi_generated/pinterest_client/model/business_access_role.py new file mode 100644 index 0000000..015a83e --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_access_role.py @@ -0,0 +1,296 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BusinessAccessRole(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'OWNER': "OWNER", + 'ADMIN': "ADMIN", + 'ANALYST': "ANALYST", + 'SOS_READER': "SOS_READER", + 'FINANCE_MANAGER': "FINANCE_MANAGER", + 'AUDIENCE_MANAGER': "AUDIENCE_MANAGER", + 'CAMPAIGN_MANAGER': "CAMPAIGN_MANAGER", + 'CATALOGS_MANAGER': "CATALOGS_MANAGER", + 'RESTRICTED_OWNER': "RESTRICTED_OWNER", + 'PROFILE_MANAGER': "PROFILE_MANAGER", + 'PROFILE_PUBLISHER': "PROFILE_PUBLISHER", + 'RESOURCE_PINNER_LIST_OWNER': "RESOURCE_PINNER_LIST_OWNER", + 'RESOURCE_PINNER_LIST_READER': "RESOURCE_PINNER_LIST_READER", + 'BIZ_PINNER_LIST_SHARER': "BIZ_PINNER_LIST_SHARER", + 'RESOURCE_CONVERSION_TAGS_READER': "RESOURCE_CONVERSION_TAGS_READER", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """BusinessAccessRole - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Permission role for business access.., must be one of ["OWNER", "ADMIN", "ANALYST", "SOS_READER", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "RESTRICTED_OWNER", "PROFILE_MANAGER", "PROFILE_PUBLISHER", "RESOURCE_PINNER_LIST_OWNER", "RESOURCE_PINNER_LIST_READER", "BIZ_PINNER_LIST_SHARER", "RESOURCE_CONVERSION_TAGS_READER", ] # noqa: E501 + + Keyword Args: + value (str): Permission role for business access.., must be one of ["OWNER", "ADMIN", "ANALYST", "SOS_READER", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "RESTRICTED_OWNER", "PROFILE_MANAGER", "PROFILE_PUBLISHER", "RESOURCE_PINNER_LIST_OWNER", "RESOURCE_PINNER_LIST_READER", "BIZ_PINNER_LIST_SHARER", "RESOURCE_CONVERSION_TAGS_READER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """BusinessAccessRole - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Permission role for business access.., must be one of ["OWNER", "ADMIN", "ANALYST", "SOS_READER", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "RESTRICTED_OWNER", "PROFILE_MANAGER", "PROFILE_PUBLISHER", "RESOURCE_PINNER_LIST_OWNER", "RESOURCE_PINNER_LIST_READER", "BIZ_PINNER_LIST_SHARER", "RESOURCE_CONVERSION_TAGS_READER", ] # noqa: E501 + + Keyword Args: + value (str): Permission role for business access.., must be one of ["OWNER", "ADMIN", "ANALYST", "SOS_READER", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "RESTRICTED_OWNER", "PROFILE_MANAGER", "PROFILE_PUBLISHER", "RESOURCE_PINNER_LIST_OWNER", "RESOURCE_PINNER_LIST_READER", "BIZ_PINNER_LIST_SHARER", "RESOURCE_CONVERSION_TAGS_READER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/business_access_user_summary.py b/openapi_generated/pinterest_client/model/business_access_user_summary.py new file mode 100644 index 0000000..b846531 --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_access_user_summary.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BusinessAccessUserSummary(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'max_length': 20, + 'min_length': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'email': (str, none_type,), # noqa: E501 + 'id': (str, none_type,), # noqa: E501 + 'username': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'email': 'email', # noqa: E501 + 'id': 'id', # noqa: E501 + 'username': 'username', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BusinessAccessUserSummary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str, none_type): Email of the business member/partner.. [optional] # noqa: E501 + id (str, none_type): Unique identifier of the business member/partner.. [optional] # noqa: E501 + username (str, none_type): Username of the business member/partner.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BusinessAccessUserSummary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str, none_type): Email of the business member/partner.. [optional] # noqa: E501 + id (str, none_type): Unique identifier of the business member/partner.. [optional] # noqa: E501 + username (str, none_type): Username of the business member/partner.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/business_member_assets_summary.py b/openapi_generated/pinterest_client/model/business_member_assets_summary.py new file mode 100644 index 0000000..ab5f6ee --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_member_assets_summary.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_member_assets_summary_ad_accounts import BusinessMemberAssetsSummaryAdAccounts + from openapi_generated.pinterest_client.model.business_member_assets_summary_profiles import BusinessMemberAssetsSummaryProfiles + globals()['BusinessMemberAssetsSummaryAdAccounts'] = BusinessMemberAssetsSummaryAdAccounts + globals()['BusinessMemberAssetsSummaryProfiles'] = BusinessMemberAssetsSummaryProfiles + + +class BusinessMemberAssetsSummary(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'ad_accounts': ([BusinessMemberAssetsSummaryAdAccounts],), # noqa: E501 + 'profiles': ([BusinessMemberAssetsSummaryProfiles],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ad_accounts': 'ad_accounts', # noqa: E501 + 'profiles': 'profiles', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BusinessMemberAssetsSummary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + ad_accounts ([BusinessMemberAssetsSummaryAdAccounts]): List of ad account IDs and respective permission levels.. [optional] # noqa: E501 + profiles ([BusinessMemberAssetsSummaryProfiles]): List of profile IDs and respective permission levels.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BusinessMemberAssetsSummary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + ad_accounts ([BusinessMemberAssetsSummaryAdAccounts]): List of ad account IDs and respective permission levels.. [optional] # noqa: E501 + profiles ([BusinessMemberAssetsSummaryProfiles]): List of profile IDs and respective permission levels.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/business_member_assets_summary_ad_accounts.py b/openapi_generated/pinterest_client/model/business_member_assets_summary_ad_accounts.py new file mode 100644 index 0000000..a64ce75 --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_member_assets_summary_ad_accounts.py @@ -0,0 +1,273 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.permissions_response import PermissionsResponse + globals()['PermissionsResponse'] = PermissionsResponse + + +class BusinessMemberAssetsSummaryAdAccounts(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'permissions': (PermissionsResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BusinessMemberAssetsSummaryAdAccounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of a business ad account.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BusinessMemberAssetsSummaryAdAccounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of a business ad account.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/business_member_assets_summary_profiles.py b/openapi_generated/pinterest_client/model/business_member_assets_summary_profiles.py new file mode 100644 index 0000000..37dd57a --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_member_assets_summary_profiles.py @@ -0,0 +1,273 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.permissions_response import PermissionsResponse + globals()['PermissionsResponse'] = PermissionsResponse + + +class BusinessMemberAssetsSummaryProfiles(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'permissions': (PermissionsResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BusinessMemberAssetsSummaryProfiles - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of a business profile.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BusinessMemberAssetsSummaryProfiles - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of a business profile.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/business_role.py b/openapi_generated/pinterest_client/model/business_role.py new file mode 100644 index 0000000..a23e80e --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_role.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BusinessRole(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'EMPLOYEE': "EMPLOYEE", + 'BIZ_ADMIN': "BIZ_ADMIN", + 'PARTNER': "PARTNER", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """BusinessRole - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The access level a member/partner has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
- BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.
- PARTNER: Can only view and access assets you assign them to/or they assign to you.., must be one of ["EMPLOYEE", "BIZ_ADMIN", "PARTNER", ] # noqa: E501 + + Keyword Args: + value (str): The access level a member/partner has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
- BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.
- PARTNER: Can only view and access assets you assign them to/or they assign to you.., must be one of ["EMPLOYEE", "BIZ_ADMIN", "PARTNER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """BusinessRole - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The access level a member/partner has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
- BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.
- PARTNER: Can only view and access assets you assign them to/or they assign to you.., must be one of ["EMPLOYEE", "BIZ_ADMIN", "PARTNER", ] # noqa: E501 + + Keyword Args: + value (str): The access level a member/partner has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
- BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.
- PARTNER: Can only view and access assets you assign them to/or they assign to you.., must be one of ["EMPLOYEE", "BIZ_ADMIN", "PARTNER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/business_role_check_mode.py b/openapi_generated/pinterest_client/model/business_role_check_mode.py new file mode 100644 index 0000000..b792e08 --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_role_check_mode.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BusinessRoleCheckMode(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'INTERNAL': "INTERNAL", + 'EXTERNAL': "EXTERNAL", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """BusinessRoleCheckMode - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Specifies if the partner is internal or external.., must be one of ["INTERNAL", "EXTERNAL", ] # noqa: E501 + + Keyword Args: + value (str): Specifies if the partner is internal or external.., must be one of ["INTERNAL", "EXTERNAL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """BusinessRoleCheckMode - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Specifies if the partner is internal or external.., must be one of ["INTERNAL", "EXTERNAL", ] # noqa: E501 + + Keyword Args: + value (str): Specifies if the partner is internal or external.., must be one of ["INTERNAL", "EXTERNAL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/business_role_for_members.py b/openapi_generated/pinterest_client/model/business_role_for_members.py new file mode 100644 index 0000000..3d34933 --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_role_for_members.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BusinessRoleForMembers(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'EMPLOYEE': "EMPLOYEE", + 'BIZ_ADMIN': "BIZ_ADMIN", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """BusinessRoleForMembers - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The access level a member has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
- BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.., must be one of ["EMPLOYEE", "BIZ_ADMIN", ] # noqa: E501 + + Keyword Args: + value (str): The access level a member has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
- BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.., must be one of ["EMPLOYEE", "BIZ_ADMIN", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """BusinessRoleForMembers - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The access level a member has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
- BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.., must be one of ["EMPLOYEE", "BIZ_ADMIN", ] # noqa: E501 + + Keyword Args: + value (str): The access level a member has to the business. Values are case-sensitive.
- EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
- BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.., must be one of ["EMPLOYEE", "BIZ_ADMIN", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/business_shared_audience.py b/openapi_generated/pinterest_client/model/business_shared_audience.py new file mode 100644 index 0000000..b51a999 --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_shared_audience.py @@ -0,0 +1,329 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_shared_audience1 import BusinessSharedAudience1 + from openapi_generated.pinterest_client.model.operation_type import OperationType + from openapi_generated.pinterest_client.model.shared_audience_common import SharedAudienceCommon + globals()['BusinessSharedAudience1'] = BusinessSharedAudience1 + globals()['OperationType'] = OperationType + globals()['SharedAudienceCommon'] = SharedAudienceCommon + + +class BusinessSharedAudience(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('audience_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'audience_id': (str,), # noqa: E501 + 'operation_type': (OperationType,), # noqa: E501 + 'recipient_business_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audience_id': 'audience_id', # noqa: E501 + 'operation_type': 'operation_type', # noqa: E501 + 'recipient_business_ids': 'recipient_business_ids', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BusinessSharedAudience - a model defined in OpenAPI + + Keyword Args: + audience_id (str): Unique identifier of an audience + operation_type (OperationType): + recipient_business_ids ([str]): List of business IDs to share with or revoke from. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BusinessSharedAudience - a model defined in OpenAPI + + Keyword Args: + audience_id (str): Unique identifier of an audience + operation_type (OperationType): + recipient_business_ids ([str]): List of business IDs to share with or revoke from. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/business_shared_audience1.py b/openapi_generated/pinterest_client/model/business_shared_audience1.py new file mode 100644 index 0000000..6166edc --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_shared_audience1.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BusinessSharedAudience1(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'recipient_business_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'recipient_business_ids': 'recipient_business_ids', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, recipient_business_ids, *args, **kwargs): # noqa: E501 + """BusinessSharedAudience1 - a model defined in OpenAPI + + Args: + recipient_business_ids ([str]): List of business IDs to share with or revoke from. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.recipient_business_ids = recipient_business_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, recipient_business_ids, *args, **kwargs): # noqa: E501 + """BusinessSharedAudience1 - a model defined in OpenAPI + + Args: + recipient_business_ids ([str]): List of business IDs to share with or revoke from. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.recipient_business_ids = recipient_business_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/business_shared_audience_response.py b/openapi_generated/pinterest_client/model/business_shared_audience_response.py new file mode 100644 index 0000000..5cb5d32 --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_shared_audience_response.py @@ -0,0 +1,324 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_shared_audience_response1 import BusinessSharedAudienceResponse1 + from openapi_generated.pinterest_client.model.role import Role + from openapi_generated.pinterest_client.model.shared_audience_response_common import SharedAudienceResponseCommon + globals()['BusinessSharedAudienceResponse1'] = BusinessSharedAudienceResponse1 + globals()['Role'] = Role + globals()['SharedAudienceResponseCommon'] = SharedAudienceResponseCommon + + +class BusinessSharedAudienceResponse(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'audience_id': (str,), # noqa: E501 + 'permissions': ([Role],), # noqa: E501 + 'recipient_business_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audience_id': 'audience_id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + 'recipient_business_ids': 'recipient_business_ids', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BusinessSharedAudienceResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + audience_id (str): Audience ID that was shared. [optional] # noqa: E501 + permissions ([Role]): [optional] # noqa: E501 + recipient_business_ids ([str]): Business IDs that received the audience. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BusinessSharedAudienceResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + audience_id (str): Audience ID that was shared. [optional] # noqa: E501 + permissions ([Role]): [optional] # noqa: E501 + recipient_business_ids ([str]): Business IDs that received the audience. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/business_shared_audience_response1.py b/openapi_generated/pinterest_client/model/business_shared_audience_response1.py new file mode 100644 index 0000000..d38f867 --- /dev/null +++ b/openapi_generated/pinterest_client/model/business_shared_audience_response1.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BusinessSharedAudienceResponse1(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'recipient_business_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'recipient_business_ids': 'recipient_business_ids', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BusinessSharedAudienceResponse1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + recipient_business_ids ([str]): Business IDs that received the audience. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BusinessSharedAudienceResponse1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + recipient_business_ids ([str]): Business IDs that received the audience. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/businesses_business_id_members_assets_access_accesses.py b/openapi_generated/pinterest_client/model/businesses_business_id_members_assets_access_accesses.py new file mode 100644 index 0000000..1746599 --- /dev/null +++ b/openapi_generated/pinterest_client/model/businesses_business_id_members_assets_access_accesses.py @@ -0,0 +1,280 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class BusinessesBusinessIdMembersAssetsAccessAccesses(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_id',): { + 'max_length': 25, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('member_id',): { + 'max_length': 25, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'asset_id': (str,), # noqa: E501 + 'member_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_id': 'asset_id', # noqa: E501 + 'member_id': 'member_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, asset_id, member_id, *args, **kwargs): # noqa: E501 + """BusinessesBusinessIdMembersAssetsAccessAccesses - a model defined in OpenAPI + + Args: + asset_id (str): Id of the asset on which to remove member permissions. + member_id (str): Unique identifier of the member on which to perform the asset permission removal + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_id = asset_id + self.member_id = member_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, asset_id, member_id, *args, **kwargs): # noqa: E501 + """BusinessesBusinessIdMembersAssetsAccessAccesses - a model defined in OpenAPI + + Args: + asset_id (str): Id of the asset on which to remove member permissions. + member_id (str): Unique identifier of the member on which to perform the asset permission removal + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_id = asset_id + self.member_id = member_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/campaign_common.py b/openapi_generated/pinterest_client/model/campaign_common.py index 65e7ea9..0e63b21 100644 --- a/openapi_generated/pinterest_client/model/campaign_common.py +++ b/openapi_generated/pinterest_client/model/campaign_common.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -62,14 +62,6 @@ class CampaignCommon(ModelNormal): """ allowed_values = { - ('summary_status',): { - 'RUNNING': "RUNNING", - 'PAUSED': "PAUSED", - 'NOT_STARTED': "NOT_STARTED", - 'COMPLETED': "COMPLETED", - 'ADVERTISER_DISABLED': "ADVERTISER_DISABLED", - 'ARCHIVED': "ARCHIVED", - }, } validations = { @@ -117,7 +109,7 @@ def openapi_types(): 'tracking_urls': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'start_time': (int, none_type,), # noqa: E501 'end_time': (int, none_type,), # noqa: E501 - 'summary_status': (str,), # noqa: E501 + 'is_flexible_daily_budgets': (bool, none_type,), # noqa: E501 } @cached_property @@ -135,7 +127,7 @@ def discriminator(): 'tracking_urls': 'tracking_urls', # noqa: E501 'start_time': 'start_time', # noqa: E501 'end_time': 'end_time', # noqa: E501 - 'summary_status': 'summary_status', # noqa: E501 + 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 } read_only_vars = { @@ -179,16 +171,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - ad_account_id (str): Campaign's Advertiser ID.. [optional] # noqa: E501 + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema.. [optional] # noqa: E501 name (str): Campaign name.. [optional] # noqa: E501 status (str): [optional] # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 + is_flexible_daily_budgets (bool, none_type): Determine if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -270,16 +262,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - ad_account_id (str): Campaign's Advertiser ID.. [optional] # noqa: E501 + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema.. [optional] # noqa: E501 name (str): Campaign name.. [optional] # noqa: E501 status (str): [optional] # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 + is_flexible_daily_budgets (bool, none_type): Determine if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/campaign_create_common.py b/openapi_generated/pinterest_client/model/campaign_create_common.py index 072e913..3e848f4 100644 --- a/openapi_generated/pinterest_client/model/campaign_create_common.py +++ b/openapi_generated/pinterest_client/model/campaign_create_common.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -66,14 +66,6 @@ class CampaignCreateCommon(ModelComposed): """ allowed_values = { - ('summary_status',): { - 'RUNNING': "RUNNING", - 'PAUSED': "PAUSED", - 'NOT_STARTED': "NOT_STARTED", - 'COMPLETED': "COMPLETED", - 'ADVERTISER_DISABLED': "ADVERTISER_DISABLED", - 'ARCHIVED': "ARCHIVED", - }, } validations = { @@ -121,11 +113,9 @@ def openapi_types(): 'tracking_urls': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'start_time': (int, none_type,), # noqa: E501 'end_time': (int, none_type,), # noqa: E501 - 'summary_status': (str,), # noqa: E501 - 'is_campaign_budget_optimization': (bool,), # noqa: E501 - 'is_flexible_daily_budgets': (bool,), # noqa: E501 + 'is_flexible_daily_budgets': (bool, none_type,), # noqa: E501 'default_ad_group_budget_in_micro_currency': (int, none_type,), # noqa: E501 - 'is_automated_campaign': (bool,), # noqa: E501 + 'is_automated_campaign': (bool, none_type,), # noqa: E501 } @cached_property @@ -143,8 +133,6 @@ def discriminator(): 'tracking_urls': 'tracking_urls', # noqa: E501 'start_time': 'start_time', # noqa: E501 'end_time': 'end_time', # noqa: E501 - 'summary_status': 'summary_status', # noqa: E501 - 'is_campaign_budget_optimization': 'is_campaign_budget_optimization', # noqa: E501 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 'default_ad_group_budget_in_micro_currency': 'default_ad_group_budget_in_micro_currency', # noqa: E501 'is_automated_campaign': 'is_automated_campaign', # noqa: E501 @@ -189,20 +177,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - ad_account_id (str): Campaign's Advertiser ID.. [optional] # noqa: E501 + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema.. [optional] # noqa: E501 name (str): Campaign name.. [optional] # noqa: E501 - status (str): [optional] if omitted the server will use the default value of "ACTIVE" # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 - is_campaign_budget_optimization (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - is_flexible_daily_budgets (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + is_flexible_daily_budgets (bool, none_type): Determine if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 default_ad_group_budget_in_micro_currency (int, none_type): When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.. [optional] # noqa: E501 - is_automated_campaign (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + is_automated_campaign (bool, none_type): Specifies whether the campaign was created in the automated campaign flow. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -302,20 +288,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - ad_account_id (str): Campaign's Advertiser ID.. [optional] # noqa: E501 + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema.. [optional] # noqa: E501 name (str): Campaign name.. [optional] # noqa: E501 - status (str): [optional] if omitted the server will use the default value of "ACTIVE" # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 - is_campaign_budget_optimization (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - is_flexible_daily_budgets (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + is_flexible_daily_budgets (bool, none_type): Determine if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 default_ad_group_budget_in_micro_currency (int, none_type): When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.. [optional] # noqa: E501 - is_automated_campaign (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + is_automated_campaign (bool, none_type): Specifies whether the campaign was created in the automated campaign flow. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/campaign_create_common_all_of.py b/openapi_generated/pinterest_client/model/campaign_create_common_all_of.py index 9494ff7..ba8ff6d 100644 --- a/openapi_generated/pinterest_client/model/campaign_create_common_all_of.py +++ b/openapi_generated/pinterest_client/model/campaign_create_common_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -30,10 +30,6 @@ from openapi_generated.pinterest_client.exceptions import ApiAttributeError -def lazy_import(): - from openapi_generated.pinterest_client.model.entity_status import EntityStatus - globals()['EntityStatus'] = EntityStatus - class CampaignCreateCommonAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -71,7 +67,6 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - lazy_import() return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -86,13 +81,9 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { - 'status': (str,), # noqa: E501 - 'is_campaign_budget_optimization': (bool,), # noqa: E501 - 'is_flexible_daily_budgets': (bool,), # noqa: E501 'default_ad_group_budget_in_micro_currency': (int, none_type,), # noqa: E501 - 'is_automated_campaign': (bool,), # noqa: E501 + 'is_automated_campaign': (bool, none_type,), # noqa: E501 } @cached_property @@ -101,9 +92,6 @@ def discriminator(): attribute_map = { - 'status': 'status', # noqa: E501 - 'is_campaign_budget_optimization': 'is_campaign_budget_optimization', # noqa: E501 - 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 'default_ad_group_budget_in_micro_currency': 'default_ad_group_budget_in_micro_currency', # noqa: E501 'is_automated_campaign': 'is_automated_campaign', # noqa: E501 } @@ -149,11 +137,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - status (str): [optional] if omitted the server will use the default value of "ACTIVE" # noqa: E501 - is_campaign_budget_optimization (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - is_flexible_daily_budgets (bool): [optional] if omitted the server will use the default value of False # noqa: E501 default_ad_group_budget_in_micro_currency (int, none_type): When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.. [optional] # noqa: E501 - is_automated_campaign (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + is_automated_campaign (bool, none_type): Specifies whether the campaign was created in the automated campaign flow. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -235,11 +220,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - status (str): [optional] if omitted the server will use the default value of "ACTIVE" # noqa: E501 - is_campaign_budget_optimization (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - is_flexible_daily_budgets (bool): [optional] if omitted the server will use the default value of False # noqa: E501 default_ad_group_budget_in_micro_currency (int, none_type): When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.. [optional] # noqa: E501 - is_automated_campaign (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + is_automated_campaign (bool, none_type): Specifies whether the campaign was created in the automated campaign flow. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/campaign_create_request.py b/openapi_generated/pinterest_client/model/campaign_create_request.py index ff2af93..1e993d9 100644 --- a/openapi_generated/pinterest_client/model/campaign_create_request.py +++ b/openapi_generated/pinterest_client/model/campaign_create_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -41,6 +41,7 @@ def lazy_import(): globals()['EntityStatus'] = EntityStatus globals()['ObjectiveType'] = ObjectiveType globals()['TrackingUrls'] = TrackingUrls + globals()['bool, none_type'] = bool, none_type class CampaignCreateRequest(ModelComposed): @@ -68,14 +69,6 @@ class CampaignCreateRequest(ModelComposed): """ allowed_values = { - ('summary_status',): { - 'RUNNING': "RUNNING", - 'PAUSED': "PAUSED", - 'NOT_STARTED': "NOT_STARTED", - 'COMPLETED': "COMPLETED", - 'ADVERTISER_DISABLED': "ADVERTISER_DISABLED", - 'ARCHIVED': "ARCHIVED", - }, } validations = { @@ -124,8 +117,6 @@ def openapi_types(): 'tracking_urls': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'start_time': (int, none_type,), # noqa: E501 'end_time': (int, none_type,), # noqa: E501 - 'summary_status': (str,), # noqa: E501 - 'is_campaign_budget_optimization': (bool,), # noqa: E501 'is_flexible_daily_budgets': (bool,), # noqa: E501 'default_ad_group_budget_in_micro_currency': (int, none_type,), # noqa: E501 'is_automated_campaign': (bool,), # noqa: E501 @@ -147,8 +138,6 @@ def discriminator(): 'tracking_urls': 'tracking_urls', # noqa: E501 'start_time': 'start_time', # noqa: E501 'end_time': 'end_time', # noqa: E501 - 'summary_status': 'summary_status', # noqa: E501 - 'is_campaign_budget_optimization': 'is_campaign_budget_optimization', # noqa: E501 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 'default_ad_group_budget_in_micro_currency': 'default_ad_group_budget_in_micro_currency', # noqa: E501 'is_automated_campaign': 'is_automated_campaign', # noqa: E501 @@ -163,7 +152,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """CampaignCreateRequest - a model defined in OpenAPI Keyword Args: - ad_account_id (str): Campaign's Advertiser ID. + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema. name (str): Campaign name. objective_type (ObjectiveType): _check_type (bool): if True, values for parameters in openapi_types @@ -197,14 +186,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) status (str): [optional] if omitted the server will use the default value of "ACTIVE" # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 - is_campaign_budget_optimization (bool): [optional] if omitted the server will use the default value of False # noqa: E501 is_flexible_daily_budgets (bool): [optional] if omitted the server will use the default value of False # noqa: E501 default_ad_group_budget_in_micro_currency (int, none_type): When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.. [optional] # noqa: E501 is_automated_campaign (bool): [optional] if omitted the server will use the default value of False # noqa: E501 @@ -277,7 +264,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 """CampaignCreateRequest - a model defined in OpenAPI Keyword Args: - ad_account_id (str): Campaign's Advertiser ID. + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema. name (str): Campaign name. objective_type (ObjectiveType): _check_type (bool): if True, values for parameters in openapi_types @@ -311,14 +298,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) status (str): [optional] if omitted the server will use the default value of "ACTIVE" # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 - is_campaign_budget_optimization (bool): [optional] if omitted the server will use the default value of False # noqa: E501 is_flexible_daily_budgets (bool): [optional] if omitted the server will use the default value of False # noqa: E501 default_ad_group_budget_in_micro_currency (int, none_type): When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.. [optional] # noqa: E501 is_automated_campaign (bool): [optional] if omitted the server will use the default value of False # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/campaign_create_request_all_of.py b/openapi_generated/pinterest_client/model/campaign_create_request_all_of.py index 3b34a4c..21f7a69 100644 --- a/openapi_generated/pinterest_client/model/campaign_create_request_all_of.py +++ b/openapi_generated/pinterest_client/model/campaign_create_request_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,11 @@ def lazy_import(): + from openapi_generated.pinterest_client.model.entity_status import EntityStatus from openapi_generated.pinterest_client.model.objective_type import ObjectiveType + globals()['EntityStatus'] = EntityStatus globals()['ObjectiveType'] = ObjectiveType + globals()['bool, none_type'] = bool, none_type class CampaignCreateRequestAllOf(ModelNormal): @@ -89,6 +92,9 @@ def openapi_types(): lazy_import() return { 'objective_type': (ObjectiveType,), # noqa: E501 + 'is_flexible_daily_budgets': (bool,), # noqa: E501 + 'is_automated_campaign': (bool,), # noqa: E501 + 'status': (str,), # noqa: E501 } @cached_property @@ -98,6 +104,9 @@ def discriminator(): attribute_map = { 'objective_type': 'objective_type', # noqa: E501 + 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 + 'is_automated_campaign': 'is_automated_campaign', # noqa: E501 + 'status': 'status', # noqa: E501 } read_only_vars = { @@ -144,6 +153,9 @@ def _from_openapi_data(cls, objective_type, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + is_flexible_daily_budgets (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + is_automated_campaign (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + status (str): [optional] if omitted the server will use the default value of "ACTIVE" # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -229,6 +241,9 @@ def __init__(self, objective_type, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + is_flexible_daily_budgets (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + is_automated_campaign (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + status (str): [optional] if omitted the server will use the default value of "ACTIVE" # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/campaign_create_response.py b/openapi_generated/pinterest_client/model/campaign_create_response.py index 68c4cf9..b832fcb 100644 --- a/openapi_generated/pinterest_client/model/campaign_create_response.py +++ b/openapi_generated/pinterest_client/model/campaign_create_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/campaign_create_response_data.py b/openapi_generated/pinterest_client/model/campaign_create_response_data.py index e2a125d..d1d00b0 100644 --- a/openapi_generated/pinterest_client/model/campaign_create_response_data.py +++ b/openapi_generated/pinterest_client/model/campaign_create_response_data.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -34,12 +34,14 @@ def lazy_import(): from openapi_generated.pinterest_client.model.campaign_create_common import CampaignCreateCommon from openapi_generated.pinterest_client.model.campaign_create_response_data_all_of import CampaignCreateResponseDataAllOf from openapi_generated.pinterest_client.model.campaign_response import CampaignResponse + from openapi_generated.pinterest_client.model.campaign_summary_status import CampaignSummaryStatus from openapi_generated.pinterest_client.model.entity_status import EntityStatus from openapi_generated.pinterest_client.model.objective_type import ObjectiveType from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls globals()['CampaignCreateCommon'] = CampaignCreateCommon globals()['CampaignCreateResponseDataAllOf'] = CampaignCreateResponseDataAllOf globals()['CampaignResponse'] = CampaignResponse + globals()['CampaignSummaryStatus'] = CampaignSummaryStatus globals()['EntityStatus'] = EntityStatus globals()['ObjectiveType'] = ObjectiveType globals()['TrackingUrls'] = TrackingUrls @@ -70,14 +72,6 @@ class CampaignCreateResponseData(ModelComposed): """ allowed_values = { - ('summary_status',): { - 'RUNNING': "RUNNING", - 'PAUSED': "PAUSED", - 'NOT_STARTED': "NOT_STARTED", - 'COMPLETED': "COMPLETED", - 'ADVERTISER_DISABLED': "ADVERTISER_DISABLED", - 'ARCHIVED': "ARCHIVED", - }, } validations = { @@ -130,16 +124,16 @@ def openapi_types(): 'tracking_urls': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'start_time': (int, none_type,), # noqa: E501 'end_time': (int, none_type,), # noqa: E501 - 'summary_status': (str,), # noqa: E501 - 'is_campaign_budget_optimization': (bool, none_type,), # noqa: E501 'is_flexible_daily_budgets': (bool, none_type,), # noqa: E501 'default_ad_group_budget_in_micro_currency': (int, none_type,), # noqa: E501 - 'is_automated_campaign': (bool,), # noqa: E501 + 'is_automated_campaign': (bool, none_type,), # noqa: E501 'id': (str,), # noqa: E501 'objective_type': (ObjectiveType,), # noqa: E501 'created_time': (int,), # noqa: E501 'updated_time': (int,), # noqa: E501 'type': (str,), # noqa: E501 + 'is_campaign_budget_optimization': (bool, none_type,), # noqa: E501 + 'summary_status': (CampaignSummaryStatus,), # noqa: E501 } @cached_property @@ -157,8 +151,6 @@ def discriminator(): 'tracking_urls': 'tracking_urls', # noqa: E501 'start_time': 'start_time', # noqa: E501 'end_time': 'end_time', # noqa: E501 - 'summary_status': 'summary_status', # noqa: E501 - 'is_campaign_budget_optimization': 'is_campaign_budget_optimization', # noqa: E501 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 'default_ad_group_budget_in_micro_currency': 'default_ad_group_budget_in_micro_currency', # noqa: E501 'is_automated_campaign': 'is_automated_campaign', # noqa: E501 @@ -167,6 +159,8 @@ def discriminator(): 'created_time': 'created_time', # noqa: E501 'updated_time': 'updated_time', # noqa: E501 'type': 'type', # noqa: E501 + 'is_campaign_budget_optimization': 'is_campaign_budget_optimization', # noqa: E501 + 'summary_status': 'summary_status', # noqa: E501 } read_only_vars = { @@ -208,25 +202,25 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - ad_account_id (str): Campaign's Advertiser ID.. [optional] # noqa: E501 + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema.. [optional] # noqa: E501 name (str): Campaign name.. [optional] # noqa: E501 status (str): [optional] # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 - is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 - is_flexible_daily_budgets (bool, none_type): Determines if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 + is_flexible_daily_budgets (bool, none_type): Determine if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 default_ad_group_budget_in_micro_currency (int, none_type): When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.. [optional] # noqa: E501 - is_automated_campaign (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + is_automated_campaign (bool, none_type): Specifies whether the campaign was created in the automated campaign flow. [optional] # noqa: E501 id (str): Campaign ID.. [optional] # noqa: E501 objective_type (ObjectiveType): [optional] # noqa: E501 created_time (int): Campaign creation time. Unix timestamp in seconds.. [optional] # noqa: E501 updated_time (int): UTC timestamp. Last update time.. [optional] # noqa: E501 type (str): Always \"campaign\".. [optional] # noqa: E501 + is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 + summary_status (CampaignSummaryStatus): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -326,25 +320,25 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - ad_account_id (str): Campaign's Advertiser ID.. [optional] # noqa: E501 + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema.. [optional] # noqa: E501 name (str): Campaign name.. [optional] # noqa: E501 status (str): [optional] # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 - is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 - is_flexible_daily_budgets (bool, none_type): Determines if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 + is_flexible_daily_budgets (bool, none_type): Determine if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 default_ad_group_budget_in_micro_currency (int, none_type): When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.. [optional] # noqa: E501 - is_automated_campaign (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + is_automated_campaign (bool, none_type): Specifies whether the campaign was created in the automated campaign flow. [optional] # noqa: E501 id (str): Campaign ID.. [optional] # noqa: E501 objective_type (ObjectiveType): [optional] # noqa: E501 created_time (int): Campaign creation time. Unix timestamp in seconds.. [optional] # noqa: E501 updated_time (int): UTC timestamp. Last update time.. [optional] # noqa: E501 type (str): Always \"campaign\".. [optional] # noqa: E501 + is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 + summary_status (CampaignSummaryStatus): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/campaign_create_response_data_all_of.py b/openapi_generated/pinterest_client/model/campaign_create_response_data_all_of.py index 1d2f491..bbc61db 100644 --- a/openapi_generated/pinterest_client/model/campaign_create_response_data_all_of.py +++ b/openapi_generated/pinterest_client/model/campaign_create_response_data_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/campaign_create_response_item.py b/openapi_generated/pinterest_client/model/campaign_create_response_item.py index 0bc214c..c3866c8 100644 --- a/openapi_generated/pinterest_client/model/campaign_create_response_item.py +++ b/openapi_generated/pinterest_client/model/campaign_create_response_item.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/campaign_id.py b/openapi_generated/pinterest_client/model/campaign_id.py index 077676a..3bb5d03 100644 --- a/openapi_generated/pinterest_client/model/campaign_id.py +++ b/openapi_generated/pinterest_client/model/campaign_id.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/campaign_response.py b/openapi_generated/pinterest_client/model/campaign_response.py index 5576fa2..c64e083 100644 --- a/openapi_generated/pinterest_client/model/campaign_response.py +++ b/openapi_generated/pinterest_client/model/campaign_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -34,12 +34,14 @@ def lazy_import(): from openapi_generated.pinterest_client.model.campaign_common import CampaignCommon from openapi_generated.pinterest_client.model.campaign_id import CampaignId from openapi_generated.pinterest_client.model.campaign_response_all_of import CampaignResponseAllOf + from openapi_generated.pinterest_client.model.campaign_summary_status import CampaignSummaryStatus from openapi_generated.pinterest_client.model.entity_status import EntityStatus from openapi_generated.pinterest_client.model.objective_type import ObjectiveType from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls globals()['CampaignCommon'] = CampaignCommon globals()['CampaignId'] = CampaignId globals()['CampaignResponseAllOf'] = CampaignResponseAllOf + globals()['CampaignSummaryStatus'] = CampaignSummaryStatus globals()['EntityStatus'] = EntityStatus globals()['ObjectiveType'] = ObjectiveType globals()['TrackingUrls'] = TrackingUrls @@ -70,14 +72,6 @@ class CampaignResponse(ModelComposed): """ allowed_values = { - ('summary_status',): { - 'RUNNING': "RUNNING", - 'PAUSED': "PAUSED", - 'NOT_STARTED': "NOT_STARTED", - 'COMPLETED': "COMPLETED", - 'ADVERTISER_DISABLED': "ADVERTISER_DISABLED", - 'ARCHIVED': "ARCHIVED", - }, } validations = { @@ -131,13 +125,13 @@ def openapi_types(): 'tracking_urls': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'start_time': (int, none_type,), # noqa: E501 'end_time': (int, none_type,), # noqa: E501 - 'summary_status': (str,), # noqa: E501 + 'is_flexible_daily_budgets': (bool, none_type,), # noqa: E501 'objective_type': (ObjectiveType,), # noqa: E501 'created_time': (int,), # noqa: E501 'updated_time': (int,), # noqa: E501 'type': (str,), # noqa: E501 - 'is_flexible_daily_budgets': (bool, none_type,), # noqa: E501 'is_campaign_budget_optimization': (bool, none_type,), # noqa: E501 + 'summary_status': (CampaignSummaryStatus,), # noqa: E501 } @cached_property @@ -156,13 +150,13 @@ def discriminator(): 'tracking_urls': 'tracking_urls', # noqa: E501 'start_time': 'start_time', # noqa: E501 'end_time': 'end_time', # noqa: E501 - 'summary_status': 'summary_status', # noqa: E501 + 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 'objective_type': 'objective_type', # noqa: E501 'created_time': 'created_time', # noqa: E501 'updated_time': 'updated_time', # noqa: E501 'type': 'type', # noqa: E501 - 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 'is_campaign_budget_optimization': 'is_campaign_budget_optimization', # noqa: E501 + 'summary_status': 'summary_status', # noqa: E501 } read_only_vars = { @@ -205,22 +199,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) id (str): Campaign ID.. [optional] # noqa: E501 - ad_account_id (str): Campaign's Advertiser ID.. [optional] # noqa: E501 + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema.. [optional] # noqa: E501 name (str): Campaign name.. [optional] # noqa: E501 status (str): [optional] # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 + is_flexible_daily_budgets (bool, none_type): Determine if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 objective_type (ObjectiveType): [optional] # noqa: E501 created_time (int): Campaign creation time. Unix timestamp in seconds.. [optional] # noqa: E501 updated_time (int): UTC timestamp. Last update time.. [optional] # noqa: E501 type (str): Always \"campaign\".. [optional] # noqa: E501 - is_flexible_daily_budgets (bool, none_type): Determines if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 + summary_status (CampaignSummaryStatus): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -321,22 +315,22 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) id (str): Campaign ID.. [optional] # noqa: E501 - ad_account_id (str): Campaign's Advertiser ID.. [optional] # noqa: E501 + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema.. [optional] # noqa: E501 name (str): Campaign name.. [optional] # noqa: E501 status (str): [optional] # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 + is_flexible_daily_budgets (bool, none_type): Determine if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 objective_type (ObjectiveType): [optional] # noqa: E501 created_time (int): Campaign creation time. Unix timestamp in seconds.. [optional] # noqa: E501 updated_time (int): UTC timestamp. Last update time.. [optional] # noqa: E501 type (str): Always \"campaign\".. [optional] # noqa: E501 - is_flexible_daily_budgets (bool, none_type): Determines if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 + summary_status (CampaignSummaryStatus): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/campaign_response_all_of.py b/openapi_generated/pinterest_client/model/campaign_response_all_of.py index 3415e44..fe55a66 100644 --- a/openapi_generated/pinterest_client/model/campaign_response_all_of.py +++ b/openapi_generated/pinterest_client/model/campaign_response_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,7 +31,9 @@ def lazy_import(): + from openapi_generated.pinterest_client.model.campaign_summary_status import CampaignSummaryStatus from openapi_generated.pinterest_client.model.objective_type import ObjectiveType + globals()['CampaignSummaryStatus'] = CampaignSummaryStatus globals()['ObjectiveType'] = ObjectiveType @@ -92,8 +94,8 @@ def openapi_types(): 'created_time': (int,), # noqa: E501 'updated_time': (int,), # noqa: E501 'type': (str,), # noqa: E501 - 'is_flexible_daily_budgets': (bool, none_type,), # noqa: E501 'is_campaign_budget_optimization': (bool, none_type,), # noqa: E501 + 'summary_status': (CampaignSummaryStatus,), # noqa: E501 } @cached_property @@ -106,8 +108,8 @@ def discriminator(): 'created_time': 'created_time', # noqa: E501 'updated_time': 'updated_time', # noqa: E501 'type': 'type', # noqa: E501 - 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 'is_campaign_budget_optimization': 'is_campaign_budget_optimization', # noqa: E501 + 'summary_status': 'summary_status', # noqa: E501 } read_only_vars = { @@ -155,8 +157,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 created_time (int): Campaign creation time. Unix timestamp in seconds.. [optional] # noqa: E501 updated_time (int): UTC timestamp. Last update time.. [optional] # noqa: E501 type (str): Always \"campaign\".. [optional] # noqa: E501 - is_flexible_daily_budgets (bool, none_type): Determines if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 + summary_status (CampaignSummaryStatus): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -242,8 +244,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 created_time (int): Campaign creation time. Unix timestamp in seconds.. [optional] # noqa: E501 updated_time (int): UTC timestamp. Last update time.. [optional] # noqa: E501 type (str): Always \"campaign\".. [optional] # noqa: E501 - is_flexible_daily_budgets (bool, none_type): Determines if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 + summary_status (CampaignSummaryStatus): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/campaign_summary_status.py b/openapi_generated/pinterest_client/model/campaign_summary_status.py index cbe8169..678282d 100644 --- a/openapi_generated/pinterest_client/model/campaign_summary_status.py +++ b/openapi_generated/pinterest_client/model/campaign_summary_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -59,6 +59,8 @@ class CampaignSummaryStatus(ModelSimple): 'COMPLETED': "COMPLETED", 'ADVERTISER_DISABLED': "ADVERTISER_DISABLED", 'ARCHIVED': "ARCHIVED", + 'DRAFT': "DRAFT", + 'DELETED_DRAFT': "DELETED_DRAFT", }, } @@ -110,10 +112,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Summary status for campaign., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + args[0] (str): Summary status for campaign., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 Keyword Args: - value (str): Summary status for campaign., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + value (str): Summary status for campaign., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -200,10 +202,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Summary status for campaign., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + args[0] (str): Summary status for campaign., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 Keyword Args: - value (str): Summary status for campaign., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + value (str): Summary status for campaign., must be one of ["RUNNING", "PAUSED", "NOT_STARTED", "COMPLETED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/campaign_update_request.py b/openapi_generated/pinterest_client/model/campaign_update_request.py index edf4159..680a186 100644 --- a/openapi_generated/pinterest_client/model/campaign_update_request.py +++ b/openapi_generated/pinterest_client/model/campaign_update_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,17 +31,17 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.campaign_common import CampaignCommon from openapi_generated.pinterest_client.model.campaign_create_common import CampaignCreateCommon from openapi_generated.pinterest_client.model.campaign_id import CampaignId from openapi_generated.pinterest_client.model.campaign_update_request_all_of import CampaignUpdateRequestAllOf from openapi_generated.pinterest_client.model.entity_status import EntityStatus + from openapi_generated.pinterest_client.model.objective_type import ObjectiveType from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls - globals()['CampaignCommon'] = CampaignCommon globals()['CampaignCreateCommon'] = CampaignCreateCommon globals()['CampaignId'] = CampaignId globals()['CampaignUpdateRequestAllOf'] = CampaignUpdateRequestAllOf globals()['EntityStatus'] = EntityStatus + globals()['ObjectiveType'] = ObjectiveType globals()['TrackingUrls'] = TrackingUrls @@ -70,14 +70,6 @@ class CampaignUpdateRequest(ModelComposed): """ allowed_values = { - ('summary_status',): { - 'RUNNING': "RUNNING", - 'PAUSED': "PAUSED", - 'NOT_STARTED': "NOT_STARTED", - 'COMPLETED': "COMPLETED", - 'ADVERTISER_DISABLED': "ADVERTISER_DISABLED", - 'ARCHIVED': "ARCHIVED", - }, } validations = { @@ -124,18 +116,18 @@ def openapi_types(): 'id': (str,), # noqa: E501 'ad_account_id': (str,), # noqa: E501 'name': (str,), # noqa: E501 - 'status': (str, none_type,), # noqa: E501 + 'status': (str,), # noqa: E501 'lifetime_spend_cap': (int, none_type,), # noqa: E501 'daily_spend_cap': (int, none_type,), # noqa: E501 'order_line_id': (str, none_type,), # noqa: E501 'tracking_urls': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'start_time': (int, none_type,), # noqa: E501 'end_time': (int, none_type,), # noqa: E501 - 'summary_status': (str,), # noqa: E501 - 'is_campaign_budget_optimization': (bool, none_type,), # noqa: E501 'is_flexible_daily_budgets': (bool, none_type,), # noqa: E501 'default_ad_group_budget_in_micro_currency': (int, none_type,), # noqa: E501 'is_automated_campaign': (bool, none_type,), # noqa: E501 + 'is_campaign_budget_optimization': (bool, none_type,), # noqa: E501 + 'objective_type': (str, none_type,), # noqa: E501 } @cached_property @@ -154,11 +146,11 @@ def discriminator(): 'tracking_urls': 'tracking_urls', # noqa: E501 'start_time': 'start_time', # noqa: E501 'end_time': 'end_time', # noqa: E501 - 'summary_status': 'summary_status', # noqa: E501 - 'is_campaign_budget_optimization': 'is_campaign_budget_optimization', # noqa: E501 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 'default_ad_group_budget_in_micro_currency': 'default_ad_group_budget_in_micro_currency', # noqa: E501 'is_automated_campaign': 'is_automated_campaign', # noqa: E501 + 'is_campaign_budget_optimization': 'is_campaign_budget_optimization', # noqa: E501 + 'objective_type': 'objective_type', # noqa: E501 } read_only_vars = { @@ -171,7 +163,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Keyword Args: id (str): Campaign ID. - ad_account_id (str): Campaign's Advertiser ID. + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema. _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -203,18 +195,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) name (str): Campaign name.. [optional] # noqa: E501 - status (str, none_type): [optional] # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 - is_campaign_budget_optimization (bool, none_type): [optional] # noqa: E501 - is_flexible_daily_budgets (bool, none_type): [optional] # noqa: E501 + is_flexible_daily_budgets (bool, none_type): Determine if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 default_ad_group_budget_in_micro_currency (int, none_type): When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.. [optional] # noqa: E501 - is_automated_campaign (bool, none_type): [optional] # noqa: E501 + is_automated_campaign (bool, none_type): Specifies whether the campaign was created in the automated campaign flow. [optional] # noqa: E501 + is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 + objective_type (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -285,7 +277,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Keyword Args: id (str): Campaign ID. - ad_account_id (str): Campaign's Advertiser ID. + ad_account_id (str): Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema. _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -317,18 +309,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) name (str): Campaign name.. [optional] # noqa: E501 - status (str, none_type): [optional] # noqa: E501 - lifetime_spend_cap (int, none_type): Campaign total spending cap.. [optional] # noqa: E501 - daily_spend_cap (int, none_type): Campaign daily spending cap.. [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + lifetime_spend_cap (int, none_type): Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"daily_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 + daily_spend_cap (int, none_type): Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and \"lifetime_spend_cap\" cannot be set at the same time.. [optional] # noqa: E501 order_line_id (str, none_type): Order line ID that appears on the invoice.. [optional] # noqa: E501 tracking_urls ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 start_time (int, none_type): Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 end_time (int, none_type): Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.. [optional] # noqa: E501 - summary_status (str): Summary status for campaigns. [optional] # noqa: E501 - is_campaign_budget_optimization (bool, none_type): [optional] # noqa: E501 - is_flexible_daily_budgets (bool, none_type): [optional] # noqa: E501 + is_flexible_daily_budgets (bool, none_type): Determine if a campaign has flexible daily budgets setup.. [optional] # noqa: E501 default_ad_group_budget_in_micro_currency (int, none_type): When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.. [optional] # noqa: E501 - is_automated_campaign (bool, none_type): [optional] # noqa: E501 + is_automated_campaign (bool, none_type): Specifies whether the campaign was created in the automated campaign flow. [optional] # noqa: E501 + is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 + objective_type (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/campaign_update_request_all_of.py b/openapi_generated/pinterest_client/model/campaign_update_request_all_of.py index 1fe49e7..dc2c747 100644 --- a/openapi_generated/pinterest_client/model/campaign_update_request_all_of.py +++ b/openapi_generated/pinterest_client/model/campaign_update_request_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.entity_status import EntityStatus - globals()['EntityStatus'] = EntityStatus + from openapi_generated.pinterest_client.model.objective_type import ObjectiveType + globals()['ObjectiveType'] = ObjectiveType class CampaignUpdateRequestAllOf(ModelNormal): @@ -89,9 +89,7 @@ def openapi_types(): lazy_import() return { 'is_campaign_budget_optimization': (bool, none_type,), # noqa: E501 - 'is_flexible_daily_budgets': (bool, none_type,), # noqa: E501 - 'is_automated_campaign': (bool, none_type,), # noqa: E501 - 'status': (str, none_type,), # noqa: E501 + 'objective_type': (str, none_type,), # noqa: E501 } @cached_property @@ -101,9 +99,7 @@ def discriminator(): attribute_map = { 'is_campaign_budget_optimization': 'is_campaign_budget_optimization', # noqa: E501 - 'is_flexible_daily_budgets': 'is_flexible_daily_budgets', # noqa: E501 - 'is_automated_campaign': 'is_automated_campaign', # noqa: E501 - 'status': 'status', # noqa: E501 + 'objective_type': 'objective_type', # noqa: E501 } read_only_vars = { @@ -147,10 +143,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - is_campaign_budget_optimization (bool, none_type): [optional] # noqa: E501 - is_flexible_daily_budgets (bool, none_type): [optional] # noqa: E501 - is_automated_campaign (bool, none_type): [optional] # noqa: E501 - status (str, none_type): [optional] # noqa: E501 + is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 + objective_type (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -232,10 +226,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - is_campaign_budget_optimization (bool, none_type): [optional] # noqa: E501 - is_flexible_daily_budgets (bool, none_type): [optional] # noqa: E501 - is_automated_campaign (bool, none_type): [optional] # noqa: E501 - status (str, none_type): [optional] # noqa: E501 + is_campaign_budget_optimization (bool, none_type): Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.. [optional] # noqa: E501 + objective_type (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/campaign_update_response.py b/openapi_generated/pinterest_client/model/campaign_update_response.py index d472672..52207e2 100644 --- a/openapi_generated/pinterest_client/model/campaign_update_response.py +++ b/openapi_generated/pinterest_client/model/campaign_update_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/campaigns_analytics_response.py b/openapi_generated/pinterest_client/model/campaigns_analytics_response.py index 1dbaa5a..1c06f71 100644 --- a/openapi_generated/pinterest_client/model/campaigns_analytics_response.py +++ b/openapi_generated/pinterest_client/model/campaigns_analytics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/cancel_invites_body.py b/openapi_generated/pinterest_client/model/cancel_invites_body.py new file mode 100644 index 0000000..93c0a29 --- /dev/null +++ b/openapi_generated/pinterest_client/model/cancel_invites_body.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CancelInvitesBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('invite_ids',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'invite_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'invite_ids': 'invite_ids', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, invite_ids, *args, **kwargs): # noqa: E501 + """CancelInvitesBody - a model defined in OpenAPI + + Args: + invite_ids ([str]): List of invite/request ids to be cancelled + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.invite_ids = invite_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, invite_ids, *args, **kwargs): # noqa: E501 + """CancelInvitesBody - a model defined in OpenAPI + + Args: + invite_ids ([str]): List of invite/request ids to be cancelled + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.invite_ids = invite_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalog.py b/openapi_generated/pinterest_client/model/catalog.py new file mode 100644 index 0000000..27a1a4e --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalog.py @@ -0,0 +1,337 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalog_all_of import CatalogAllOf + from openapi_generated.pinterest_client.model.catalogs_db_item import CatalogsDbItem + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + globals()['CatalogAllOf'] = CatalogAllOf + globals()['CatalogsDbItem'] = CatalogsDbItem + globals()['CatalogsType'] = CatalogsType + + +class Catalog(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'created_at': (datetime,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'updated_at': (datetime,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'created_at': 'created_at', # noqa: E501 + 'id': 'id', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'name': 'name', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Catalog - a model defined in OpenAPI + + Keyword Args: + created_at (datetime): + id (str): ID of the catalog entity. + updated_at (datetime): + name (str, none_type): A human-friendly name associated to a catalog entity. + catalog_type (CatalogsType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Catalog - a model defined in OpenAPI + + Keyword Args: + created_at (datetime): + id (str): ID of the catalog entity. + updated_at (datetime): + name (str, none_type): A human-friendly name associated to a catalog entity. + catalog_type (CatalogsType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalog_all_of.py b/openapi_generated/pinterest_client/model/catalog_all_of.py new file mode 100644 index 0000000..b82869f --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalog_all_of.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + globals()['CatalogsType'] = CatalogsType + + +class CatalogAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, name, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogAllOf - a model defined in OpenAPI + + Args: + id (str): ID of the catalog entity. + name (str, none_type): A human-friendly name associated to a catalog entity. + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.name = name + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, name, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogAllOf - a model defined in OpenAPI + + Args: + id (str): ID of the catalog entity. + name (str, none_type): A human-friendly name associated to a catalog entity. + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.name = name + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalog_product_group.py b/openapi_generated/pinterest_client/model/catalog_product_group.py index b4ef1b5..54449b4 100644 --- a/openapi_generated/pinterest_client/model/catalog_product_group.py +++ b/openapi_generated/pinterest_client/model/catalog_product_group.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.13.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_create_creative_assets_item.py b/openapi_generated/pinterest_client/model/catalogs_create_creative_assets_item.py new file mode 100644 index 0000000..7e14b35 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_create_creative_assets_item.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_attributes import CatalogsCreativeAssetsAttributes + globals()['CatalogsCreativeAssetsAttributes'] = CatalogsCreativeAssetsAttributes + + +class CatalogsCreateCreativeAssetsItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'CREATE': "CREATE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'creative_assets_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + 'attributes': (CatalogsCreativeAssetsAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'creative_assets_id': 'creative_assets_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, creative_assets_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsCreateCreativeAssetsItem - a model defined in OpenAPI + + Args: + creative_assets_id (str): The catalog creative assets id in the merchant namespace + attributes (CatalogsCreativeAssetsAttributes): + + Keyword Args: + operation (str): defaults to "CREATE", must be one of ["CREATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "CREATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, creative_assets_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsCreateCreativeAssetsItem - a model defined in OpenAPI + + Args: + creative_assets_id (str): The catalog creative assets id in the merchant namespace + attributes (CatalogsCreativeAssetsAttributes): + + Keyword Args: + operation (str): defaults to "CREATE", must be one of ["CREATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "CREATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_create_hotel_item.py b/openapi_generated/pinterest_client/model/catalogs_create_hotel_item.py new file mode 100644 index 0000000..e1a18a8 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_create_hotel_item.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_attributes import CatalogsHotelAttributes + globals()['CatalogsHotelAttributes'] = CatalogsHotelAttributes + + +class CatalogsCreateHotelItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'CREATE': "CREATE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'hotel_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + 'attributes': (CatalogsHotelAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'hotel_id': 'hotel_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, hotel_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsCreateHotelItem - a model defined in OpenAPI + + Args: + hotel_id (str): The catalog hotel id in the merchant namespace + attributes (CatalogsHotelAttributes): + + Keyword Args: + operation (str): defaults to "CREATE", must be one of ["CREATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "CREATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, hotel_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsCreateHotelItem - a model defined in OpenAPI + + Args: + hotel_id (str): The catalog hotel id in the merchant namespace + attributes (CatalogsHotelAttributes): + + Keyword Args: + operation (str): defaults to "CREATE", must be one of ["CREATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "CREATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_create_report_response.py b/openapi_generated/pinterest_client/model/catalogs_create_report_response.py new file mode 100644 index 0000000..c3d8ab6 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_create_report_response.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsCreateReportResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'token': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'token': 'token', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsCreateReportResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + token (str): Token to be used to get the report. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsCreateReportResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + token (str): Token to be used to get the report. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_create_request.py b/openapi_generated/pinterest_client/model/catalogs_create_request.py new file mode 100644 index 0000000..a99734c --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_create_request.py @@ -0,0 +1,267 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsCreateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'catalog_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'name': 'name', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 + """CatalogsCreateRequest - a model defined in OpenAPI + + Args: + name (str): A human-friendly name associated to a given catalog. + + Keyword Args: + catalog_type (str): Type of the catalog entity.. defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.name = name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, *args, **kwargs): # noqa: E501 + """CatalogsCreateRequest - a model defined in OpenAPI + + Args: + name (str): A human-friendly name associated to a given catalog. + + Keyword Args: + catalog_type (str): Type of the catalog entity.. defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.name = name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_create_retail_item.py b/openapi_generated/pinterest_client/model/catalogs_create_retail_item.py new file mode 100644 index 0000000..7af24c0 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_create_retail_item.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.item_attributes_request import ItemAttributesRequest + globals()['ItemAttributesRequest'] = ItemAttributesRequest + + +class CatalogsCreateRetailItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'CREATE': "CREATE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + 'attributes': (ItemAttributesRequest,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, item_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsCreateRetailItem - a model defined in OpenAPI + + Args: + item_id (str): The catalog item id in the merchant namespace + attributes (ItemAttributesRequest): + + Keyword Args: + operation (str): defaults to "CREATE", must be one of ["CREATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "CREATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, item_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsCreateRetailItem - a model defined in OpenAPI + + Args: + item_id (str): The catalog item id in the merchant namespace + attributes (ItemAttributesRequest): + + Keyword Args: + operation (str): defaults to "CREATE", must be one of ["CREATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "CREATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_attributes.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_attributes.py new file mode 100644 index 0000000..2bfe2d5 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_attributes.py @@ -0,0 +1,366 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_attributes_all_of import CatalogsCreativeAssetsAttributesAllOf + from openapi_generated.pinterest_client.model.catalogs_updatable_creative_assets_attributes import CatalogsUpdatableCreativeAssetsAttributes + globals()['CatalogsCreativeAssetsAttributesAllOf'] = CatalogsCreativeAssetsAttributesAllOf + globals()['CatalogsUpdatableCreativeAssetsAttributes'] = CatalogsUpdatableCreativeAssetsAttributes + + +class CatalogsCreativeAssetsAttributes(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'image_link': (str,), # noqa: E501 + 'video_link': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'link': (str,), # noqa: E501 + 'ios_deep_link': (str, none_type,), # noqa: E501 + 'android_deep_link': (str, none_type,), # noqa: E501 + 'google_product_category': (str, none_type,), # noqa: E501 + 'custom_label_0': (str, none_type,), # noqa: E501 + 'custom_label_1': (str, none_type,), # noqa: E501 + 'custom_label_2': (str, none_type,), # noqa: E501 + 'custom_label_3': (str, none_type,), # noqa: E501 + 'custom_label_4': (str, none_type,), # noqa: E501 + 'visibility': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'image_link': 'image_link', # noqa: E501 + 'video_link': 'video_link', # noqa: E501 + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'link': 'link', # noqa: E501 + 'ios_deep_link': 'ios_deep_link', # noqa: E501 + 'android_deep_link': 'android_deep_link', # noqa: E501 + 'google_product_category': 'google_product_category', # noqa: E501 + 'custom_label_0': 'custom_label_0', # noqa: E501 + 'custom_label_1': 'custom_label_1', # noqa: E501 + 'custom_label_2': 'custom_label_2', # noqa: E501 + 'custom_label_3': 'custom_label_3', # noqa: E501 + 'custom_label_4': 'custom_label_4', # noqa: E501 + 'visibility': 'visibility', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + image_link (str): The creative assets image.. [optional] # noqa: E501 + video_link (str): The creative assets video.. [optional] # noqa: E501 + title (str): The name of the creative assets.. [optional] # noqa: E501 + description (str): Brief description of the creative assets.. [optional] # noqa: E501 + link (str): Link to the creative assets page.. [optional] # noqa: E501 + ios_deep_link (str, none_type): IOS deep link to the creative assets page.. [optional] # noqa: E501 + android_deep_link (str, none_type): Link to the creative assets page.. [optional] # noqa: E501 + google_product_category (str, none_type): The categorization of the product based on the standardized Google Product Taxonomy. This is a set taxonomy. Both the text values and numeric codes are accepted.. [optional] # noqa: E501 + custom_label_0 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_1 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_2 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_3 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_4 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + visibility (str, none_type): Visibility of the creative assets. Must be one of the following values (upper or lowercase): ‘visible’, ‘hidden’.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + image_link (str): The creative assets image.. [optional] # noqa: E501 + video_link (str): The creative assets video.. [optional] # noqa: E501 + title (str): The name of the creative assets.. [optional] # noqa: E501 + description (str): Brief description of the creative assets.. [optional] # noqa: E501 + link (str): Link to the creative assets page.. [optional] # noqa: E501 + ios_deep_link (str, none_type): IOS deep link to the creative assets page.. [optional] # noqa: E501 + android_deep_link (str, none_type): Link to the creative assets page.. [optional] # noqa: E501 + google_product_category (str, none_type): The categorization of the product based on the standardized Google Product Taxonomy. This is a set taxonomy. Both the text values and numeric codes are accepted.. [optional] # noqa: E501 + custom_label_0 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_1 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_2 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_3 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_4 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + visibility (str, none_type): Visibility of the creative assets. Must be one of the following values (upper or lowercase): ‘visible’, ‘hidden’.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_attributes_all_of.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_attributes_all_of.py new file mode 100644 index 0000000..11197c8 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_attributes_all_of.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsCreativeAssetsAttributesAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'image_link': (str,), # noqa: E501 + 'video_link': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'image_link': 'image_link', # noqa: E501 + 'video_link': 'video_link', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsAttributesAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + image_link (str): The creative assets image.. [optional] # noqa: E501 + video_link (str): The creative assets video.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsAttributesAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + image_link (str): The creative assets image.. [optional] # noqa: E501 + video_link (str): The creative assets video.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_batch_item.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_batch_item.py new file mode 100644 index 0000000..2d3d7d4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_batch_item.py @@ -0,0 +1,349 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_create_creative_assets_item import CatalogsCreateCreativeAssetsItem + from openapi_generated.pinterest_client.model.catalogs_delete_creative_assets_item import CatalogsDeleteCreativeAssetsItem + from openapi_generated.pinterest_client.model.catalogs_updatable_creative_assets_attributes import CatalogsUpdatableCreativeAssetsAttributes + from openapi_generated.pinterest_client.model.catalogs_update_creative_assets_item import CatalogsUpdateCreativeAssetsItem + from openapi_generated.pinterest_client.model.catalogs_upsert_creative_assets_item import CatalogsUpsertCreativeAssetsItem + globals()['CatalogsCreateCreativeAssetsItem'] = CatalogsCreateCreativeAssetsItem + globals()['CatalogsDeleteCreativeAssetsItem'] = CatalogsDeleteCreativeAssetsItem + globals()['CatalogsUpdatableCreativeAssetsAttributes'] = CatalogsUpdatableCreativeAssetsAttributes + globals()['CatalogsUpdateCreativeAssetsItem'] = CatalogsUpdateCreativeAssetsItem + globals()['CatalogsUpsertCreativeAssetsItem'] = CatalogsUpsertCreativeAssetsItem + + +class CatalogsCreativeAssetsBatchItem(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'DELETE': "DELETE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'operation': (str,), # noqa: E501 + 'creative_assets_id': (str,), # noqa: E501 + 'attributes': (CatalogsUpdatableCreativeAssetsAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATE': CatalogsCreateCreativeAssetsItem, + 'CatalogsCreateCreativeAssetsItem': CatalogsCreateCreativeAssetsItem, + 'CatalogsDeleteCreativeAssetsItem': CatalogsDeleteCreativeAssetsItem, + 'CatalogsUpdateCreativeAssetsItem': CatalogsUpdateCreativeAssetsItem, + 'CatalogsUpsertCreativeAssetsItem': CatalogsUpsertCreativeAssetsItem, + 'DELETE': CatalogsDeleteCreativeAssetsItem, + 'UPDATE': CatalogsUpdateCreativeAssetsItem, + 'UPSERT': CatalogsUpsertCreativeAssetsItem, + } + if not val: + return None + return {'operation': val} + + attribute_map = { + 'operation': 'operation', # noqa: E501 + 'creative_assets_id': 'creative_assets_id', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsBatchItem - a model defined in OpenAPI + + Keyword Args: + operation (str): defaults to "DELETE", must be one of ["DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_assets_id (str): The catalog creative assets id in the merchant namespace. [optional] # noqa: E501 + attributes (CatalogsUpdatableCreativeAssetsAttributes): [optional] # noqa: E501 + """ + + operation = kwargs.get('operation', "DELETE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsBatchItem - a model defined in OpenAPI + + Keyword Args: + operation (str): defaults to "DELETE", must be one of ["DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_assets_id (str): The catalog creative assets id in the merchant namespace. [optional] # noqa: E501 + attributes (CatalogsUpdatableCreativeAssetsAttributes): [optional] # noqa: E501 + """ + + operation = kwargs.get('operation', "DELETE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + CatalogsCreateCreativeAssetsItem, + CatalogsDeleteCreativeAssetsItem, + CatalogsUpdateCreativeAssetsItem, + CatalogsUpsertCreativeAssetsItem, + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_batch_request.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_batch_request.py new file mode 100644 index 0000000..0d6926d --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_batch_request.py @@ -0,0 +1,299 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_batch_item import CatalogsCreativeAssetsBatchItem + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsCreativeAssetsBatchItem'] = CatalogsCreativeAssetsBatchItem + globals()['Country'] = Country + + +class CatalogsCreativeAssetsBatchRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('items',): { + 'max_items': 1000, + 'min_items': 1, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'items': ([CatalogsCreativeAssetsBatchItem],), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + 'items': 'items', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, country, language, items, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsBatchRequest - a model defined in OpenAPI + + Args: + country (Country): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. + items ([CatalogsCreativeAssetsBatchItem]): Array with creative assets item operations + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.country = country + self.language = language + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, country, language, items, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsBatchRequest - a model defined in OpenAPI + + Args: + country (Country): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. + items ([CatalogsCreativeAssetsBatchItem]): Array with creative assets item operations + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.country = country + self.language = language + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_feed.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_feed.py new file mode 100644 index 0000000..235441e --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_feed.py @@ -0,0 +1,385 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_db_item import CatalogsDbItem + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.feed_fields import FeedFields + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + globals()['CatalogsDbItem'] = CatalogsDbItem + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['Country'] = Country + globals()['FeedFields'] = FeedFields + globals()['NullableCurrency'] = NullableCurrency + + +class CatalogsCreativeAssetsFeed(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'created_at': (datetime,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'updated_at': (datetime,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'status': (CatalogsStatus,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'default_locale': (str,), # noqa: E501 + 'default_country': (Country,), # noqa: E501 + 'catalog_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'created_at': 'created_at', # noqa: E501 + 'id': 'id', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'location': 'location', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'status': 'status', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'default_country': 'default_country', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsFeed - a model defined in OpenAPI + + Keyword Args: + created_at (datetime): + id (str): + updated_at (datetime): + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. + format (CatalogsFormat): + catalog_type (CatalogsType): + credentials (CatalogsFeedCredentials): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + preferred_processing_schedule (CatalogsFeedProcessingSchedule): + status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + default_country (Country): + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsFeed - a model defined in OpenAPI + + Keyword Args: + created_at (datetime): + id (str): + updated_at (datetime): + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. + format (CatalogsFormat): + catalog_type (CatalogsType): + credentials (CatalogsFeedCredentials): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + preferred_processing_schedule (CatalogsFeedProcessingSchedule): + status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + default_country (Country): + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_feeds_create_request.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_feeds_create_request.py new file mode 100644 index 0000000..07fef89 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_feeds_create_request.py @@ -0,0 +1,333 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['Country'] = Country + globals()['NullableCurrency'] = NullableCurrency + + +class CatalogsCreativeAssetsFeedsCreateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('location',): { + 'regex': { + 'pattern': r'^(http|https|ftp|sftp):\/\/', # noqa: E501 + }, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'default_locale': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'default_country': (Country,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'catalog_id': (str, none_type,), # noqa: E501 + 'status': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'default_country': 'default_country', # noqa: E501 + 'location': 'location', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, format, default_locale, default_country, location, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsFeedsCreateRequest - a model defined in OpenAPI + + Args: + name (str): A human-friendly name associated to a given feed. + format (CatalogsFormat): + default_locale (bool, date, datetime, dict, float, int, list, str, none_type): The locale used within a feed for product descriptions. + default_country (Country): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. At the moment a catalog can not have multiple creative assets feeds but this will change in the future.. [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.format = format + self.default_locale = default_locale + self.default_country = default_country + self.location = location + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, format, default_locale, default_country, location, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsFeedsCreateRequest - a model defined in OpenAPI + + Args: + name (str): A human-friendly name associated to a given feed. + format (CatalogsFormat): + default_locale (bool, date, datetime, dict, float, int, list, str, none_type): The locale used within a feed for product descriptions. + default_country (Country): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. At the moment a catalog can not have multiple creative assets feeds but this will change in the future.. [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.format = format + self.default_locale = default_locale + self.default_country = default_country + self.location = location + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_feeds_update_request.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_feeds_update_request.py new file mode 100644 index 0000000..009e815 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_feeds_update_request.py @@ -0,0 +1,304 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['NullableCurrency'] = NullableCurrency + + +class CatalogsCreativeAssetsFeedsUpdateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('location',): { + 'regex': { + 'pattern': r'^(http|https|ftp|sftp):\/\/', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'status': (CatalogsStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'location': 'location', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsFeedsUpdateRequest - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + name (str): A human-friendly name associated to a given feed.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + status (CatalogsStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsFeedsUpdateRequest - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + name (str): A human-friendly name associated to a given feed.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + status (CatalogsStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_item_error_response.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_item_error_response.py new file mode 100644 index 0000000..cfa46f9 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_item_error_response.py @@ -0,0 +1,278 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.item_validation_event import ItemValidationEvent + globals()['CatalogsType'] = CatalogsType + globals()['ItemValidationEvent'] = ItemValidationEvent + + +class CatalogsCreativeAssetsItemErrorResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'creative_assets_id': (str,), # noqa: E501 + 'errors': ([ItemValidationEvent],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'creative_assets_id': 'creative_assets_id', # noqa: E501 + 'errors': 'errors', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsItemErrorResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_assets_id (str): The catalog creative assets id in the merchant namespace. [optional] # noqa: E501 + errors ([ItemValidationEvent]): Array with the errors for the item id requested. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsItemErrorResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_assets_id (str): The catalog creative assets id in the merchant namespace. [optional] # noqa: E501 + errors ([ItemValidationEvent]): Array with the errors for the item id requested. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_item_response.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_item_response.py new file mode 100644 index 0000000..4c171ef --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_item_response.py @@ -0,0 +1,287 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_attributes import CatalogsCreativeAssetsAttributes + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.pin import Pin + globals()['CatalogsCreativeAssetsAttributes'] = CatalogsCreativeAssetsAttributes + globals()['CatalogsType'] = CatalogsType + globals()['Pin'] = Pin + + +class CatalogsCreativeAssetsItemResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('pins',): { + 'max_items': 11, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'creative_assets_id': (str,), # noqa: E501 + 'pins': ([Pin], none_type,), # noqa: E501 + 'attributes': (CatalogsCreativeAssetsAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'creative_assets_id': 'creative_assets_id', # noqa: E501 + 'pins': 'pins', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsItemResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_assets_id (str): The catalog creative assets id in the merchant namespace. [optional] # noqa: E501 + pins ([Pin], none_type): The pins mapped to the item. [optional] # noqa: E501 + attributes (CatalogsCreativeAssetsAttributes): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsItemResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_assets_id (str): The catalog creative assets id in the merchant namespace. [optional] # noqa: E501 + pins ([Pin], none_type): The pins mapped to the item. [optional] # noqa: E501 + attributes (CatalogsCreativeAssetsAttributes): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_items_batch.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_items_batch.py new file mode 100644 index 0000000..e504284 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_items_batch.py @@ -0,0 +1,294 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.batch_operation_status import BatchOperationStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.creative_assets_processing_record import CreativeAssetsProcessingRecord + globals()['BatchOperationStatus'] = BatchOperationStatus + globals()['CatalogsType'] = CatalogsType + globals()['CreativeAssetsProcessingRecord'] = CreativeAssetsProcessingRecord + + +class CatalogsCreativeAssetsItemsBatch(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'batch_id': (str,), # noqa: E501 + 'created_time': (datetime,), # noqa: E501 + 'completed_time': (datetime, none_type,), # noqa: E501 + 'status': (BatchOperationStatus,), # noqa: E501 + 'items': ([CreativeAssetsProcessingRecord],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'batch_id': 'batch_id', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + 'completed_time': 'completed_time', # noqa: E501 + 'status': 'status', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + 'created_time', # noqa: E501 + 'completed_time', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsItemsBatch - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + batch_id (str): Id of the catalogs items batch. [optional] # noqa: E501 + created_time (datetime): Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + completed_time (datetime, none_type): Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + status (BatchOperationStatus): [optional] # noqa: E501 + items ([CreativeAssetsProcessingRecord]): Array with the catalogs items processing records part of the catalogs items batch. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsItemsBatch - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + batch_id (str): Id of the catalogs items batch. [optional] # noqa: E501 + created_time (datetime): Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + completed_time (datetime, none_type): Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + status (BatchOperationStatus): [optional] # noqa: E501 + items ([CreativeAssetsProcessingRecord]): Array with the catalogs items processing records part of the catalogs items batch. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_items_filter.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_items_filter.py new file mode 100644 index 0000000..42f4a65 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_items_filter.py @@ -0,0 +1,286 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsCreativeAssetsItemsFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('creative_assets_ids',): { + 'max_items': 100, + 'min_items': 1, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'catalog_type': (str,), # noqa: E501 + 'creative_assets_ids': ([str],), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'creative_assets_ids': 'creative_assets_ids', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, creative_assets_ids, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsItemsFilter - a model defined in OpenAPI + + Args: + creative_assets_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.creative_assets_ids = creative_assets_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, creative_assets_ids, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsItemsFilter - a model defined in OpenAPI + + Args: + creative_assets_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.creative_assets_ids = creative_assets_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_items_post_filter.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_items_post_filter.py new file mode 100644 index 0000000..36353bc --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_items_post_filter.py @@ -0,0 +1,286 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsCreativeAssetsItemsPostFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('creative_assets_ids',): { + 'max_items': 1000, + 'min_items': 1, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'catalog_type': (str,), # noqa: E501 + 'creative_assets_ids': ([str],), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'creative_assets_ids': 'creative_assets_ids', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, creative_assets_ids, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsItemsPostFilter - a model defined in OpenAPI + + Args: + creative_assets_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.creative_assets_ids = creative_assets_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, creative_assets_ids, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsItemsPostFilter - a model defined in OpenAPI + + Args: + creative_assets_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.creative_assets_ids = creative_assets_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_list_products_by_catalog_based_filter_request.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_list_products_by_catalog_based_filter_request.py new file mode 100644 index 0000000..5cb05c9 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_list_products_by_catalog_based_filter_request.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters import CatalogsCreativeAssetsProductGroupFilters + globals()['CatalogsCreativeAssetsProductGroupFilters'] = CatalogsCreativeAssetsProductGroupFilters + + +class CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'filters': (CatalogsCreativeAssetsProductGroupFilters,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_id, filters, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest - a model defined in OpenAPI + + Args: + catalog_id (str): Catalog id pertaining to the creative assets product group. + filters (CatalogsCreativeAssetsProductGroupFilters): + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.catalog_id = catalog_id + self.filters = filters + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_id, filters, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest - a model defined in OpenAPI + + Args: + catalog_id (str): Catalog id pertaining to the creative assets product group. + filters (CatalogsCreativeAssetsProductGroupFilters): + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.catalog_id = catalog_id + self.filters = filters + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_product.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product.py new file mode 100644 index 0000000..316c8a2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product.py @@ -0,0 +1,287 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_metadata import CatalogsCreativeAssetsProductMetadata + from openapi_generated.pinterest_client.model.pin import Pin + globals()['CatalogsCreativeAssetsProductMetadata'] = CatalogsCreativeAssetsProductMetadata + globals()['Pin'] = Pin + + +class CatalogsCreativeAssetsProduct(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'metadata': (CatalogsCreativeAssetsProductMetadata,), # noqa: E501 + 'pin': (Pin,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'pin': 'pin', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, metadata, pin, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProduct - a model defined in OpenAPI + + Args: + metadata (CatalogsCreativeAssetsProductMetadata): + pin (Pin): + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.metadata = metadata + self.pin = pin + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, metadata, pin, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProduct - a model defined in OpenAPI + + Args: + metadata (CatalogsCreativeAssetsProductMetadata): + pin (Pin): + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.metadata = metadata + self.pin = pin + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group.py new file mode 100644 index 0000000..0d7ca85 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group.py @@ -0,0 +1,317 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters import CatalogsCreativeAssetsProductGroupFilters + globals()['CatalogsCreativeAssetsProductGroupFilters'] = CatalogsCreativeAssetsProductGroupFilters + + +class CatalogsCreativeAssetsProductGroup(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'filters': (CatalogsCreativeAssetsProductGroupFilters,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'created_at': (int,), # noqa: E501 + 'updated_at': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'id': 'id', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, filters, catalog_id, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroup - a model defined in OpenAPI + + Args: + id (str): ID of the creative assets product group. + filters (CatalogsCreativeAssetsProductGroupFilters): + catalog_id (str): Catalog id pertaining to the creative assets product group. + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Name of creative assets product group. [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + created_at (int): Unix timestamp in seconds of when catalog product group was created.. [optional] # noqa: E501 + updated_at (int): Unix timestamp in seconds of last time catalog product group was updated.. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.id = id + self.filters = filters + self.catalog_id = catalog_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, filters, catalog_id, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroup - a model defined in OpenAPI + + Args: + id (str): ID of the creative assets product group. + filters (CatalogsCreativeAssetsProductGroupFilters): + catalog_id (str): Catalog id pertaining to the creative assets product group. + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Name of creative assets product group. [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + created_at (int): Unix timestamp in seconds of when catalog product group was created.. [optional] # noqa: E501 + updated_at (int): Unix timestamp in seconds of last time catalog product group was updated.. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.id = id + self.filters = filters + self.catalog_id = catalog_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_create_request.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_create_request.py new file mode 100644 index 0000000..2f1d3d6 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_create_request.py @@ -0,0 +1,293 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters import CatalogsCreativeAssetsProductGroupFilters + globals()['CatalogsCreativeAssetsProductGroupFilters'] = CatalogsCreativeAssetsProductGroupFilters + + +class CatalogsCreativeAssetsProductGroupCreateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'filters': (CatalogsCreativeAssetsProductGroupFilters,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'name': 'name', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'description': 'description', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, filters, catalog_id, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupCreateRequest - a model defined in OpenAPI + + Args: + name (str): + filters (CatalogsCreativeAssetsProductGroupFilters): + catalog_id (str): Catalog id pertaining to the creative assets product group. + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str, none_type): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.name = name + self.filters = filters + self.catalog_id = catalog_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, filters, catalog_id, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupCreateRequest - a model defined in OpenAPI + + Args: + name (str): + filters (CatalogsCreativeAssetsProductGroupFilters): + catalog_id (str): Catalog id pertaining to the creative assets product group. + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str, none_type): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.name = name + self.filters = filters + self.catalog_id = catalog_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filter_keys.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filter_keys.py new file mode 100644 index 0000000..22248b4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filter_keys.py @@ -0,0 +1,410 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_media_types_criteria import CatalogsProductGroupMultipleMediaTypesCriteria + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_string_criteria import CatalogsProductGroupMultipleStringCriteria + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_string_list_criteria import CatalogsProductGroupMultipleStringListCriteria + from openapi_generated.pinterest_client.model.creative_assets_id_filter import CreativeAssetsIdFilter + from openapi_generated.pinterest_client.model.custom_label0_filter import CustomLabel0Filter + from openapi_generated.pinterest_client.model.custom_label1_filter import CustomLabel1Filter + from openapi_generated.pinterest_client.model.custom_label2_filter import CustomLabel2Filter + from openapi_generated.pinterest_client.model.custom_label3_filter import CustomLabel3Filter + from openapi_generated.pinterest_client.model.custom_label4_filter import CustomLabel4Filter + from openapi_generated.pinterest_client.model.google_product_category0_filter import GoogleProductCategory0Filter + from openapi_generated.pinterest_client.model.google_product_category1_filter import GoogleProductCategory1Filter + from openapi_generated.pinterest_client.model.google_product_category2_filter import GoogleProductCategory2Filter + from openapi_generated.pinterest_client.model.google_product_category3_filter import GoogleProductCategory3Filter + from openapi_generated.pinterest_client.model.google_product_category4_filter import GoogleProductCategory4Filter + from openapi_generated.pinterest_client.model.google_product_category5_filter import GoogleProductCategory5Filter + from openapi_generated.pinterest_client.model.google_product_category6_filter import GoogleProductCategory6Filter + from openapi_generated.pinterest_client.model.media_type_filter import MediaTypeFilter + globals()['CatalogsProductGroupMultipleMediaTypesCriteria'] = CatalogsProductGroupMultipleMediaTypesCriteria + globals()['CatalogsProductGroupMultipleStringCriteria'] = CatalogsProductGroupMultipleStringCriteria + globals()['CatalogsProductGroupMultipleStringListCriteria'] = CatalogsProductGroupMultipleStringListCriteria + globals()['CreativeAssetsIdFilter'] = CreativeAssetsIdFilter + globals()['CustomLabel0Filter'] = CustomLabel0Filter + globals()['CustomLabel1Filter'] = CustomLabel1Filter + globals()['CustomLabel2Filter'] = CustomLabel2Filter + globals()['CustomLabel3Filter'] = CustomLabel3Filter + globals()['CustomLabel4Filter'] = CustomLabel4Filter + globals()['GoogleProductCategory0Filter'] = GoogleProductCategory0Filter + globals()['GoogleProductCategory1Filter'] = GoogleProductCategory1Filter + globals()['GoogleProductCategory2Filter'] = GoogleProductCategory2Filter + globals()['GoogleProductCategory3Filter'] = GoogleProductCategory3Filter + globals()['GoogleProductCategory4Filter'] = GoogleProductCategory4Filter + globals()['GoogleProductCategory5Filter'] = GoogleProductCategory5Filter + globals()['GoogleProductCategory6Filter'] = GoogleProductCategory6Filter + globals()['MediaTypeFilter'] = MediaTypeFilter + + +class CatalogsCreativeAssetsProductGroupFilterKeys(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'creative_assets_id': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'custom_label_0': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'custom_label_1': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'custom_label_2': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'custom_label_3': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'custom_label_4': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'google_product_category_6': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 + 'google_product_category_5': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 + 'google_product_category_4': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 + 'google_product_category_3': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 + 'google_product_category_2': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 + 'google_product_category_1': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 + 'google_product_category_0': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 + 'media_type': (CatalogsProductGroupMultipleMediaTypesCriteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'creative_assets_id': 'CREATIVE_ASSETS_ID', # noqa: E501 + 'custom_label_0': 'CUSTOM_LABEL_0', # noqa: E501 + 'custom_label_1': 'CUSTOM_LABEL_1', # noqa: E501 + 'custom_label_2': 'CUSTOM_LABEL_2', # noqa: E501 + 'custom_label_3': 'CUSTOM_LABEL_3', # noqa: E501 + 'custom_label_4': 'CUSTOM_LABEL_4', # noqa: E501 + 'google_product_category_6': 'GOOGLE_PRODUCT_CATEGORY_6', # noqa: E501 + 'google_product_category_5': 'GOOGLE_PRODUCT_CATEGORY_5', # noqa: E501 + 'google_product_category_4': 'GOOGLE_PRODUCT_CATEGORY_4', # noqa: E501 + 'google_product_category_3': 'GOOGLE_PRODUCT_CATEGORY_3', # noqa: E501 + 'google_product_category_2': 'GOOGLE_PRODUCT_CATEGORY_2', # noqa: E501 + 'google_product_category_1': 'GOOGLE_PRODUCT_CATEGORY_1', # noqa: E501 + 'google_product_category_0': 'GOOGLE_PRODUCT_CATEGORY_0', # noqa: E501 + 'media_type': 'MEDIA_TYPE', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupFilterKeys - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_assets_id (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_0 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_1 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_2 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_3 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_4 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + google_product_category_6 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_5 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_4 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_3 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_2 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_1 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_0 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + media_type (CatalogsProductGroupMultipleMediaTypesCriteria): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupFilterKeys - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_assets_id (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_0 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_1 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_2 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_3 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_4 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + google_product_category_6 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_5 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_4 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_3 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_2 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_1 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + google_product_category_0 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + media_type (CatalogsProductGroupMultipleMediaTypesCriteria): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + CreativeAssetsIdFilter, + CustomLabel0Filter, + CustomLabel1Filter, + CustomLabel2Filter, + CustomLabel3Filter, + CustomLabel4Filter, + GoogleProductCategory0Filter, + GoogleProductCategory1Filter, + GoogleProductCategory2Filter, + GoogleProductCategory3Filter, + GoogleProductCategory4Filter, + GoogleProductCategory5Filter, + GoogleProductCategory6Filter, + MediaTypeFilter, + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters.py new file mode 100644 index 0000000..f265043 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters.py @@ -0,0 +1,322 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filter_keys import CatalogsCreativeAssetsProductGroupFilterKeys + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters_all_of import CatalogsCreativeAssetsProductGroupFiltersAllOf + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters_any_of import CatalogsCreativeAssetsProductGroupFiltersAnyOf + globals()['CatalogsCreativeAssetsProductGroupFilterKeys'] = CatalogsCreativeAssetsProductGroupFilterKeys + globals()['CatalogsCreativeAssetsProductGroupFiltersAllOf'] = CatalogsCreativeAssetsProductGroupFiltersAllOf + globals()['CatalogsCreativeAssetsProductGroupFiltersAnyOf'] = CatalogsCreativeAssetsProductGroupFiltersAnyOf + + +class CatalogsCreativeAssetsProductGroupFilters(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'any_of': ([CatalogsCreativeAssetsProductGroupFilterKeys],), # noqa: E501 + 'all_of': ([CatalogsCreativeAssetsProductGroupFilterKeys],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'any_of': 'any_of', # noqa: E501 + 'all_of': 'all_of', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupFilters - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + any_of ([CatalogsCreativeAssetsProductGroupFilterKeys]): [optional] # noqa: E501 + all_of ([CatalogsCreativeAssetsProductGroupFilterKeys]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupFilters - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + any_of ([CatalogsCreativeAssetsProductGroupFilterKeys]): [optional] # noqa: E501 + all_of ([CatalogsCreativeAssetsProductGroupFilterKeys]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + CatalogsCreativeAssetsProductGroupFiltersAllOf, + CatalogsCreativeAssetsProductGroupFiltersAnyOf, + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters_all_of.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters_all_of.py new file mode 100644 index 0000000..beeb3b5 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters_all_of.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filter_keys import CatalogsCreativeAssetsProductGroupFilterKeys + globals()['CatalogsCreativeAssetsProductGroupFilterKeys'] = CatalogsCreativeAssetsProductGroupFilterKeys + + +class CatalogsCreativeAssetsProductGroupFiltersAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'all_of': ([CatalogsCreativeAssetsProductGroupFilterKeys],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'all_of': 'all_of', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, all_of, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupFiltersAllOf - a model defined in OpenAPI + + Args: + all_of ([CatalogsCreativeAssetsProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.all_of = all_of + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, all_of, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupFiltersAllOf - a model defined in OpenAPI + + Args: + all_of ([CatalogsCreativeAssetsProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.all_of = all_of + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters_any_of.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters_any_of.py new file mode 100644 index 0000000..12e6a01 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_filters_any_of.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filter_keys import CatalogsCreativeAssetsProductGroupFilterKeys + globals()['CatalogsCreativeAssetsProductGroupFilterKeys'] = CatalogsCreativeAssetsProductGroupFilterKeys + + +class CatalogsCreativeAssetsProductGroupFiltersAnyOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'any_of': ([CatalogsCreativeAssetsProductGroupFilterKeys],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'any_of': 'any_of', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, any_of, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupFiltersAnyOf - a model defined in OpenAPI + + Args: + any_of ([CatalogsCreativeAssetsProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.any_of = any_of + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, any_of, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupFiltersAnyOf - a model defined in OpenAPI + + Args: + any_of ([CatalogsCreativeAssetsProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.any_of = any_of + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_product_counts.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_product_counts.py new file mode 100644 index 0000000..a267d9f --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_product_counts.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsCreativeAssetsProductGroupProductCounts(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('total',): { + 'inclusive_minimum': 0, + }, + ('videos',): { + 'inclusive_minimum': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'catalog_type': (str,), # noqa: E501 + 'total': (float,), # noqa: E501 + 'videos': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'total': 'total', # noqa: E501 + 'videos': 'videos', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, total, videos, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupProductCounts - a model defined in OpenAPI + + Args: + total (float): + videos (float): + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.total = total + self.videos = videos + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, total, videos, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupProductCounts - a model defined in OpenAPI + + Args: + total (float): + videos (float): + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.total = total + self.videos = videos + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_update_request.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_update_request.py new file mode 100644 index 0000000..58524c4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_group_update_request.py @@ -0,0 +1,270 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters import CatalogsCreativeAssetsProductGroupFilters + globals()['CatalogsCreativeAssetsProductGroupFilters'] = CatalogsCreativeAssetsProductGroupFilters + + +class CatalogsCreativeAssetsProductGroupUpdateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'filters': (CatalogsCreativeAssetsProductGroupFilters,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupUpdateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_type (str): [optional] if omitted the server will use the default value of "CREATIVE_ASSETS" # noqa: E501 + name (str): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + filters (CatalogsCreativeAssetsProductGroupFilters): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductGroupUpdateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_type (str): [optional] if omitted the server will use the default value of "CREATIVE_ASSETS" # noqa: E501 + name (str): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + filters (CatalogsCreativeAssetsProductGroupFilters): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_metadata.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_metadata.py new file mode 100644 index 0000000..457f54e --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_product_metadata.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.creative_assets_visibility_type import CreativeAssetsVisibilityType + globals()['CreativeAssetsVisibilityType'] = CreativeAssetsVisibilityType + + +class CatalogsCreativeAssetsProductMetadata(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'creative_assets_id': (str,), # noqa: E501 + 'visibility': (CreativeAssetsVisibilityType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'creative_assets_id': 'creative_assets_id', # noqa: E501 + 'visibility': 'visibility', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, creative_assets_id, visibility, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductMetadata - a model defined in OpenAPI + + Args: + creative_assets_id (str): The user-created unique ID that represents the creative assets item. + visibility (CreativeAssetsVisibilityType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + self.visibility = visibility + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, creative_assets_id, visibility, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsProductMetadata - a model defined in OpenAPI + + Args: + creative_assets_id (str): The user-created unique ID that represents the creative assets item. + visibility (CreativeAssetsVisibilityType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + self.visibility = visibility + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_db_item.py b/openapi_generated/pinterest_client/model/catalogs_db_item.py index 307ccd5..ddc18c9 100644 --- a/openapi_generated/pinterest_client/model/catalogs_db_item.py +++ b/openapi_generated/pinterest_client/model/catalogs_db_item.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -105,9 +105,14 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, created_at, id, updated_at, *args, **kwargs): # noqa: E501 """CatalogsDbItem - a model defined in OpenAPI + Args: + created_at (datetime): + id (str): + updated_at (datetime): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -139,9 +144,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - created_at (datetime): [optional] # noqa: E501 - id (str): [optional] # noqa: E501 - updated_at (datetime): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -169,6 +171,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.created_at = created_at + self.id = id + self.updated_at = updated_at for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -189,9 +194,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, created_at, id, updated_at, *args, **kwargs): # noqa: E501 """CatalogsDbItem - a model defined in OpenAPI + Args: + created_at (datetime): + id (str): + updated_at (datetime): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -223,9 +233,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - created_at (datetime): [optional] # noqa: E501 - id (str): [optional] # noqa: E501 - updated_at (datetime): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -251,6 +258,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.created_at = created_at + self.id = id + self.updated_at = updated_at for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/openapi_generated/pinterest_client/model/catalogs_delete_creative_assets_item.py b/openapi_generated/pinterest_client/model/catalogs_delete_creative_assets_item.py new file mode 100644 index 0000000..07c97c3 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_delete_creative_assets_item.py @@ -0,0 +1,273 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsDeleteCreativeAssetsItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'DELETE': "DELETE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'creative_assets_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'creative_assets_id': 'creative_assets_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, creative_assets_id, *args, **kwargs): # noqa: E501 + """CatalogsDeleteCreativeAssetsItem - a model defined in OpenAPI + + Args: + creative_assets_id (str): The catalog creative assets id in the merchant namespace + + Keyword Args: + operation (str): defaults to "DELETE", must be one of ["DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "DELETE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + self.operation = operation + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, creative_assets_id, *args, **kwargs): # noqa: E501 + """CatalogsDeleteCreativeAssetsItem - a model defined in OpenAPI + + Args: + creative_assets_id (str): The catalog creative assets id in the merchant namespace + + Keyword Args: + operation (str): defaults to "DELETE", must be one of ["DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "DELETE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + self.operation = operation + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_delete_hotel_item.py b/openapi_generated/pinterest_client/model/catalogs_delete_hotel_item.py new file mode 100644 index 0000000..3f7826d --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_delete_hotel_item.py @@ -0,0 +1,273 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsDeleteHotelItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'DELETE': "DELETE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'hotel_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'hotel_id': 'hotel_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, hotel_id, *args, **kwargs): # noqa: E501 + """CatalogsDeleteHotelItem - a model defined in OpenAPI + + Args: + hotel_id (str): The catalog hotel id in the merchant namespace + + Keyword Args: + operation (str): defaults to "DELETE", must be one of ["DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "DELETE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + self.operation = operation + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, hotel_id, *args, **kwargs): # noqa: E501 + """CatalogsDeleteHotelItem - a model defined in OpenAPI + + Args: + hotel_id (str): The catalog hotel id in the merchant namespace + + Keyword Args: + operation (str): defaults to "DELETE", must be one of ["DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "DELETE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + self.operation = operation + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_delete_retail_item.py b/openapi_generated/pinterest_client/model/catalogs_delete_retail_item.py new file mode 100644 index 0000000..a29e1b0 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_delete_retail_item.py @@ -0,0 +1,273 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsDeleteRetailItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'DELETE': "DELETE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'item_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, item_id, *args, **kwargs): # noqa: E501 + """CatalogsDeleteRetailItem - a model defined in OpenAPI + + Args: + item_id (str): The catalog item id in the merchant namespace + + Keyword Args: + operation (str): defaults to "DELETE", must be one of ["DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "DELETE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.operation = operation + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, item_id, *args, **kwargs): # noqa: E501 + """CatalogsDeleteRetailItem - a model defined in OpenAPI + + Args: + item_id (str): The catalog item id in the merchant namespace + + Keyword Args: + operation (str): defaults to "DELETE", must be one of ["DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "DELETE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.operation = operation + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_feed.py b/openapi_generated/pinterest_client/model/catalogs_feed.py index 6b05a59..75471f1 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,22 +31,26 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.catalogs_db_item import CatalogsDbItem + from openapi_generated.pinterest_client.model.catalogs_creative_assets_feed import CatalogsCreativeAssetsFeed from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_hotel_feed import CatalogsHotelFeed + from openapi_generated.pinterest_client.model.catalogs_retail_feed import CatalogsRetailFeed from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType from openapi_generated.pinterest_client.model.country import Country - from openapi_generated.pinterest_client.model.feed_fields import FeedFields from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency from openapi_generated.pinterest_client.model.product_availability_type import ProductAvailabilityType - globals()['CatalogsDbItem'] = CatalogsDbItem + globals()['CatalogsCreativeAssetsFeed'] = CatalogsCreativeAssetsFeed globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsHotelFeed'] = CatalogsHotelFeed + globals()['CatalogsRetailFeed'] = CatalogsRetailFeed globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType globals()['Country'] = Country - globals()['FeedFields'] = FeedFields globals()['NullableCurrency'] = NullableCurrency globals()['ProductAvailabilityType'] = ProductAvailabilityType @@ -79,6 +83,11 @@ class CatalogsFeed(ModelComposed): } validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, } @cached_property @@ -104,40 +113,54 @@ def openapi_types(): """ lazy_import() return { - 'default_country': (Country,), # noqa: E501 - 'default_availability': (ProductAvailabilityType,), # noqa: E501 - 'default_currency': (NullableCurrency,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'updated_at': (datetime,), # noqa: E501 'name': (str, none_type,), # noqa: E501 'format': (CatalogsFormat,), # noqa: E501 - 'default_locale': (str,), # noqa: E501 'credentials': (CatalogsFeedCredentials,), # noqa: E501 'location': (str,), # noqa: E501 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 'status': (CatalogsStatus,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'id': (str,), # noqa: E501 - 'updated_at': (datetime,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'default_locale': (str,), # noqa: E501 + 'default_country': (Country,), # noqa: E501 + 'default_availability': (ProductAvailabilityType,), # noqa: E501 + 'catalog_id': (str, none_type,), # noqa: E501 } @cached_property def discriminator(): - return None - + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsFeed, + 'CatalogsCreativeAssetsFeed': CatalogsCreativeAssetsFeed, + 'CatalogsHotelFeed': CatalogsHotelFeed, + 'CatalogsRetailFeed': CatalogsRetailFeed, + 'HOTEL': CatalogsHotelFeed, + 'RETAIL': CatalogsRetailFeed, + } + if not val: + return None + return {'catalog_type': val} attribute_map = { - 'default_country': 'default_country', # noqa: E501 - 'default_availability': 'default_availability', # noqa: E501 - 'default_currency': 'default_currency', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'id': 'id', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 'name': 'name', # noqa: E501 'format': 'format', # noqa: E501 - 'default_locale': 'default_locale', # noqa: E501 'credentials': 'credentials', # noqa: E501 'location': 'location', # noqa: E501 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 'status': 'status', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'id': 'id', # noqa: E501 - 'updated_at': 'updated_at', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'default_country': 'default_country', # noqa: E501 + 'default_availability': 'default_availability', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 } read_only_vars = { @@ -149,16 +172,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """CatalogsFeed - a model defined in OpenAPI Keyword Args: - default_country (Country): - default_availability (ProductAvailabilityType): - default_currency (NullableCurrency): - name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. - format (CatalogsFormat): - default_locale (str): The locale used within a feed for product descriptions. - credentials (CatalogsFeedCredentials): - location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. - preferred_processing_schedule (CatalogsFeedProcessingSchedule): - status (CatalogsStatus): + catalog_type (CatalogsType): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -192,6 +206,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 created_at (datetime): [optional] # noqa: E501 id (str): [optional] # noqa: E501 updated_at (datetime): [optional] # noqa: E501 + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + status (CatalogsStatus): [optional] # noqa: E501 + default_currency (NullableCurrency): [optional] # noqa: E501 + default_locale (str): The locale used within a feed for product descriptions.. [optional] # noqa: E501 + default_country (Country): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -261,16 +286,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 """CatalogsFeed - a model defined in OpenAPI Keyword Args: - default_country (Country): - default_availability (ProductAvailabilityType): - default_currency (NullableCurrency): - name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. - format (CatalogsFormat): - default_locale (str): The locale used within a feed for product descriptions. - credentials (CatalogsFeedCredentials): - location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. - preferred_processing_schedule (CatalogsFeedProcessingSchedule): - status (CatalogsStatus): + catalog_type (CatalogsType): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -304,6 +320,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 created_at (datetime): [optional] # noqa: E501 id (str): [optional] # noqa: E501 updated_at (datetime): [optional] # noqa: E501 + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + status (CatalogsStatus): [optional] # noqa: E501 + default_currency (NullableCurrency): [optional] # noqa: E501 + default_locale (str): The locale used within a feed for product descriptions.. [optional] # noqa: E501 + default_country (Country): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -372,5 +399,8 @@ def _composed_schemas(): ], 'oneOf': [ + CatalogsCreativeAssetsFeed, + CatalogsHotelFeed, + CatalogsRetailFeed, ], } diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_credentials.py b/openapi_generated/pinterest_client/model/catalogs_feed_credentials.py index 8c3eb17..b2c9752 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_credentials.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_credentials.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_ingestion.py b/openapi_generated/pinterest_client/model/catalogs_feed_ingestion.py new file mode 100644 index 0000000..0a6fbdf --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_feed_ingestion.py @@ -0,0 +1,286 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_feed_processing_status import CatalogsFeedProcessingStatus + globals()['CatalogsFeedProcessingStatus'] = CatalogsFeedProcessingStatus + + +class CatalogsFeedIngestion(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'feed_id': (str,), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'status': (CatalogsFeedProcessingStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'feed_id': 'feed_id', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, feed_id, created_at, status, *args, **kwargs): # noqa: E501 + """CatalogsFeedIngestion - a model defined in OpenAPI + + Args: + id (str): + feed_id (str): + created_at (datetime): + status (CatalogsFeedProcessingStatus): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.feed_id = feed_id + self.created_at = created_at + self.status = status + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, feed_id, created_at, status, *args, **kwargs): # noqa: E501 + """CatalogsFeedIngestion - a model defined in OpenAPI + + Args: + id (str): + feed_id (str): + created_at (datetime): + status (CatalogsFeedProcessingStatus): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.feed_id = feed_id + self.created_at = created_at + self.status = status + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_details.py b/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_details.py index f58d052..3823984 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_details.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_details.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -33,8 +33,10 @@ def lazy_import(): from openapi_generated.pinterest_client.model.catalogs_feed_ingestion_errors import CatalogsFeedIngestionErrors from openapi_generated.pinterest_client.model.catalogs_feed_ingestion_info import CatalogsFeedIngestionInfo + from openapi_generated.pinterest_client.model.catalogs_feed_ingestion_warnings import CatalogsFeedIngestionWarnings globals()['CatalogsFeedIngestionErrors'] = CatalogsFeedIngestionErrors globals()['CatalogsFeedIngestionInfo'] = CatalogsFeedIngestionInfo + globals()['CatalogsFeedIngestionWarnings'] = CatalogsFeedIngestionWarnings class CatalogsFeedIngestionDetails(ModelNormal): @@ -92,6 +94,7 @@ def openapi_types(): return { 'errors': (CatalogsFeedIngestionErrors,), # noqa: E501 'info': (CatalogsFeedIngestionInfo,), # noqa: E501 + 'warnings': (CatalogsFeedIngestionWarnings,), # noqa: E501 } @cached_property @@ -102,6 +105,7 @@ def discriminator(): attribute_map = { 'errors': 'errors', # noqa: E501 'info': 'info', # noqa: E501 + 'warnings': 'warnings', # noqa: E501 } read_only_vars = { @@ -111,12 +115,13 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, errors, info, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, errors, info, warnings, *args, **kwargs): # noqa: E501 """CatalogsFeedIngestionDetails - a model defined in OpenAPI Args: errors (CatalogsFeedIngestionErrors): info (CatalogsFeedIngestionInfo): + warnings (CatalogsFeedIngestionWarnings): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -178,6 +183,7 @@ def _from_openapi_data(cls, errors, info, *args, **kwargs): # noqa: E501 self.errors = errors self.info = info + self.warnings = warnings for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -198,12 +204,13 @@ def _from_openapi_data(cls, errors, info, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, errors, info, *args, **kwargs): # noqa: E501 + def __init__(self, errors, info, warnings, *args, **kwargs): # noqa: E501 """CatalogsFeedIngestionDetails - a model defined in OpenAPI Args: errors (CatalogsFeedIngestionErrors): info (CatalogsFeedIngestionInfo): + warnings (CatalogsFeedIngestionWarnings): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -263,6 +270,7 @@ def __init__(self, errors, info, *args, **kwargs): # noqa: E501 self.errors = errors self.info = info + self.warnings = warnings for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_errors.py b/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_errors.py index 6490880..ffca3db 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_errors.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_errors.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -85,10 +85,14 @@ def openapi_types(): and the value is attribute type. """ return { - 'image_download_error': (int,), # noqa: E501 'line_level_internal_error': (int,), # noqa: E501 'large_product_count_decrease': (int,), # noqa: E501 'account_flagged': (int,), # noqa: E501 + 'image_level_internal_error': (int,), # noqa: E501 + 'image_file_not_accessible': (int,), # noqa: E501 + 'image_malformed_url': (int,), # noqa: E501 + 'image_file_not_found': (int,), # noqa: E501 + 'image_invalid_file': (int,), # noqa: E501 } @cached_property @@ -97,10 +101,14 @@ def discriminator(): attribute_map = { - 'image_download_error': 'IMAGE_DOWNLOAD_ERROR', # noqa: E501 'line_level_internal_error': 'LINE_LEVEL_INTERNAL_ERROR', # noqa: E501 'large_product_count_decrease': 'LARGE_PRODUCT_COUNT_DECREASE', # noqa: E501 'account_flagged': 'ACCOUNT_FLAGGED', # noqa: E501 + 'image_level_internal_error': 'IMAGE_LEVEL_INTERNAL_ERROR', # noqa: E501 + 'image_file_not_accessible': 'IMAGE_FILE_NOT_ACCESSIBLE', # noqa: E501 + 'image_malformed_url': 'IMAGE_MALFORMED_URL', # noqa: E501 + 'image_file_not_found': 'IMAGE_FILE_NOT_FOUND', # noqa: E501 + 'image_invalid_file': 'IMAGE_INVALID_FILE', # noqa: E501 } read_only_vars = { @@ -144,10 +152,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - image_download_error (int): Some items include images that can't be found.. [optional] # noqa: E501 line_level_internal_error (int): We experienced a technical difficulty and were unable to ingest this some items. The next ingestion will happen in 24 hours.. [optional] # noqa: E501 large_product_count_decrease (int): The product count has decreased by more than 99% compared to the last successful ingestion.. [optional] if omitted the server will use the default value of 1 # noqa: E501 account_flagged (int): We detected an issue with your account and are not currently ingesting your items. Please review our policies at policy.pinterest.com/community-guidelines#section-spam or contact us at help.pinterest.com/contact for more information.. [optional] # noqa: E501 + image_level_internal_error (int): We experienced a technical difficulty and were unable to download some images. The next download attempt will happen in 24 hours.. [optional] # noqa: E501 + image_file_not_accessible (int): Image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 + image_malformed_url (int): Image files are unreadable. Please check your link and upload new files to continue.. [optional] # noqa: E501 + image_file_not_found (int): Image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 + image_invalid_file (int): Image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -229,10 +241,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - image_download_error (int): Some items include images that can't be found.. [optional] # noqa: E501 line_level_internal_error (int): We experienced a technical difficulty and were unable to ingest this some items. The next ingestion will happen in 24 hours.. [optional] # noqa: E501 large_product_count_decrease (int): The product count has decreased by more than 99% compared to the last successful ingestion.. [optional] if omitted the server will use the default value of 1 # noqa: E501 account_flagged (int): We detected an issue with your account and are not currently ingesting your items. Please review our policies at policy.pinterest.com/community-guidelines#section-spam or contact us at help.pinterest.com/contact for more information.. [optional] # noqa: E501 + image_level_internal_error (int): We experienced a technical difficulty and were unable to download some images. The next download attempt will happen in 24 hours.. [optional] # noqa: E501 + image_file_not_accessible (int): Image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 + image_malformed_url (int): Image files are unreadable. Please check your link and upload new files to continue.. [optional] # noqa: E501 + image_file_not_found (int): Image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 + image_invalid_file (int): Image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_info.py b/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_info.py index 8d742fb..ac0647d 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_info.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_info.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_warnings.py b/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_warnings.py new file mode 100644 index 0000000..88df01c --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_feed_ingestion_warnings.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsFeedIngestionWarnings(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'additional_image_level_internal_error': (int,), # noqa: E501 + 'additional_image_file_not_accessible': (int,), # noqa: E501 + 'additional_image_malformed_url': (int,), # noqa: E501 + 'additional_image_file_not_found': (int,), # noqa: E501 + 'additional_image_invalid_file': (int,), # noqa: E501 + 'hotel_price_header_is_present': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'additional_image_level_internal_error': 'ADDITIONAL_IMAGE_LEVEL_INTERNAL_ERROR', # noqa: E501 + 'additional_image_file_not_accessible': 'ADDITIONAL_IMAGE_FILE_NOT_ACCESSIBLE', # noqa: E501 + 'additional_image_malformed_url': 'ADDITIONAL_IMAGE_MALFORMED_URL', # noqa: E501 + 'additional_image_file_not_found': 'ADDITIONAL_IMAGE_FILE_NOT_FOUND', # noqa: E501 + 'additional_image_invalid_file': 'ADDITIONAL_IMAGE_INVALID_FILE', # noqa: E501 + 'hotel_price_header_is_present': 'HOTEL_PRICE_HEADER_IS_PRESENT', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsFeedIngestionWarnings - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + additional_image_level_internal_error (int): We experienced a technical difficulty and were unable to download some additional images. The next download attempt will happen in 24 hours.. [optional] # noqa: E501 + additional_image_file_not_accessible (int): Additional image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 + additional_image_malformed_url (int): Additional image files are unreadable. Please check your link and upload new files to continue.. [optional] # noqa: E501 + additional_image_file_not_found (int): Additional image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 + additional_image_invalid_file (int): Additional image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 + hotel_price_header_is_present (int): price is not a supported column. Use base_price and sale_price instead.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsFeedIngestionWarnings - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + additional_image_level_internal_error (int): We experienced a technical difficulty and were unable to download some additional images. The next download attempt will happen in 24 hours.. [optional] # noqa: E501 + additional_image_file_not_accessible (int): Additional image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 + additional_image_malformed_url (int): Additional image files are unreadable. Please check your link and upload new files to continue.. [optional] # noqa: E501 + additional_image_file_not_found (int): Additional image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 + additional_image_invalid_file (int): Additional image files are unreadable. Please upload new files to continue.. [optional] # noqa: E501 + hotel_price_header_is_present (int): price is not a supported column. Use base_price and sale_price instead.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_processing_result.py b/openapi_generated/pinterest_client/model/catalogs_feed_processing_result.py index f528f34..801af96 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_processing_result.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_processing_result.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -98,13 +98,13 @@ def openapi_types(): """ lazy_import() return { + 'created_at': (datetime,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'updated_at': (datetime,), # noqa: E501 'ingestion_details': (CatalogsFeedIngestionDetails,), # noqa: E501 'status': (CatalogsFeedProcessingStatus,), # noqa: E501 'product_counts': (CatalogsFeedProductCounts,), # noqa: E501 'validation_details': (CatalogsFeedValidationDetails,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'id': (str,), # noqa: E501 - 'updated_at': (datetime,), # noqa: E501 } @cached_property @@ -113,13 +113,13 @@ def discriminator(): attribute_map = { + 'created_at': 'created_at', # noqa: E501 + 'id': 'id', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 'ingestion_details': 'ingestion_details', # noqa: E501 'status': 'status', # noqa: E501 'product_counts': 'product_counts', # noqa: E501 'validation_details': 'validation_details', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'id': 'id', # noqa: E501 - 'updated_at': 'updated_at', # noqa: E501 } read_only_vars = { @@ -131,6 +131,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """CatalogsFeedProcessingResult - a model defined in OpenAPI Keyword Args: + created_at (datetime): + id (str): + updated_at (datetime): ingestion_details (CatalogsFeedIngestionDetails): status (CatalogsFeedProcessingStatus): product_counts (CatalogsFeedProductCounts): @@ -165,9 +168,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - created_at (datetime): [optional] # noqa: E501 - id (str): [optional] # noqa: E501 - updated_at (datetime): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -237,6 +237,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 """CatalogsFeedProcessingResult - a model defined in OpenAPI Keyword Args: + created_at (datetime): + id (str): + updated_at (datetime): ingestion_details (CatalogsFeedIngestionDetails): status (CatalogsFeedProcessingStatus): product_counts (CatalogsFeedProductCounts): @@ -271,9 +274,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - created_at (datetime): [optional] # noqa: E501 - id (str): [optional] # noqa: E501 - updated_at (datetime): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_processing_result_fields.py b/openapi_generated/pinterest_client/model/catalogs_feed_processing_result_fields.py index 095a963..2f49625 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_processing_result_fields.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_processing_result_fields.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_processing_schedule.py b/openapi_generated/pinterest_client/model/catalogs_feed_processing_schedule.py index 7b2513f..bda85b0 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_processing_schedule.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_processing_schedule.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_processing_status.py b/openapi_generated/pinterest_client/model/catalogs_feed_processing_status.py index 1921bdd..4fedd7d 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_processing_status.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_processing_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -54,13 +54,8 @@ class CatalogsFeedProcessingStatus(ModelSimple): allowed_values = { ('value',): { 'COMPLETED': "COMPLETED", - 'COMPLETED_EARLY': "COMPLETED_EARLY", - 'DISAPPROVED': "DISAPPROVED", 'FAILED': "FAILED", 'PROCESSING': "PROCESSING", - 'QUEUED_FOR_PROCESSING': "QUEUED_FOR_PROCESSING", - 'UNDER_APPEAL': "UNDER_APPEAL", - 'UNDER_REVIEW': "UNDER_REVIEW", }, } @@ -112,10 +107,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["COMPLETED", "COMPLETED_EARLY", "DISAPPROVED", "FAILED", "PROCESSING", "QUEUED_FOR_PROCESSING", "UNDER_APPEAL", "UNDER_REVIEW", ] # noqa: E501 + args[0] (str):, must be one of ["COMPLETED", "FAILED", "PROCESSING", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["COMPLETED", "COMPLETED_EARLY", "DISAPPROVED", "FAILED", "PROCESSING", "QUEUED_FOR_PROCESSING", "UNDER_APPEAL", "UNDER_REVIEW", ] # noqa: E501 + value (str):, must be one of ["COMPLETED", "FAILED", "PROCESSING", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -202,10 +197,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["COMPLETED", "COMPLETED_EARLY", "DISAPPROVED", "FAILED", "PROCESSING", "QUEUED_FOR_PROCESSING", "UNDER_APPEAL", "UNDER_REVIEW", ] # noqa: E501 + args[0] (str):, must be one of ["COMPLETED", "FAILED", "PROCESSING", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["COMPLETED", "COMPLETED_EARLY", "DISAPPROVED", "FAILED", "PROCESSING", "QUEUED_FOR_PROCESSING", "UNDER_APPEAL", "UNDER_REVIEW", ] # noqa: E501 + value (str):, must be one of ["COMPLETED", "FAILED", "PROCESSING", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_product_counts.py b/openapi_generated/pinterest_client/model/catalogs_feed_product_counts.py index a9bdbc4..854c22a 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_product_counts.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_product_counts.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_validation_details.py b/openapi_generated/pinterest_client/model/catalogs_feed_validation_details.py index 3654c34..42f0d32 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_validation_details.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_validation_details.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_validation_errors.py b/openapi_generated/pinterest_client/model/catalogs_feed_validation_errors.py index 3ac61d7..1018d53 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_validation_errors.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_validation_errors.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_feed_validation_warnings.py b/openapi_generated/pinterest_client/model/catalogs_feed_validation_warnings.py index 77cd645..c7eae4d 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feed_validation_warnings.py +++ b/openapi_generated/pinterest_client/model/catalogs_feed_validation_warnings.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -124,11 +124,6 @@ def openapi_types(): 'optional_condition_invalid': (int,), # noqa: E501 'ios_deep_link_invalid': (int,), # noqa: E501 'android_deep_link_invalid': (int,), # noqa: E501 - 'availability_normalized': (int,), # noqa: E501 - 'condition_normalized': (int,), # noqa: E501 - 'gender_normalized': (int,), # noqa: E501 - 'size_type_normalized': (int,), # noqa: E501 - 'age_group_normalized': (int,), # noqa: E501 'utm_source_auto_corrected': (int,), # noqa: E501 'country_does_not_map_to_currency': (int,), # noqa: E501 'min_ad_price_invalid': (int,), # noqa: E501 @@ -186,11 +181,6 @@ def discriminator(): 'optional_condition_invalid': 'OPTIONAL_CONDITION_INVALID', # noqa: E501 'ios_deep_link_invalid': 'IOS_DEEP_LINK_INVALID', # noqa: E501 'android_deep_link_invalid': 'ANDROID_DEEP_LINK_INVALID', # noqa: E501 - 'availability_normalized': 'AVAILABILITY_NORMALIZED', # noqa: E501 - 'condition_normalized': 'CONDITION_NORMALIZED', # noqa: E501 - 'gender_normalized': 'GENDER_NORMALIZED', # noqa: E501 - 'size_type_normalized': 'SIZE_TYPE_NORMALIZED', # noqa: E501 - 'age_group_normalized': 'AGE_GROUP_NORMALIZED', # noqa: E501 'utm_source_auto_corrected': 'UTM_SOURCE_AUTO_CORRECTED', # noqa: E501 'country_does_not_map_to_currency': 'COUNTRY_DOES_NOT_MAP_TO_CURRENCY', # noqa: E501 'min_ad_price_invalid': 'MIN_AD_PRICE_INVALID', # noqa: E501 @@ -283,11 +273,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 optional_condition_invalid (int): Some items include condition values that are formatted incorrectly, which may limit visibility in recommendations, search results and shopping experiences.. [optional] # noqa: E501 ios_deep_link_invalid (int): Some items include invalid ios_deep_link values.. [optional] # noqa: E501 android_deep_link_invalid (int): Some items include invalid android_deep_link.. [optional] # noqa: E501 - availability_normalized (int): Some items include availability values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 - condition_normalized (int): Some items include condition values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 - gender_normalized (int): Some items include gender values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 - size_type_normalized (int): Some items include size_type values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 - age_group_normalized (int): Some items include age_group values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 utm_source_auto_corrected (int): Some items include utm_source values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 country_does_not_map_to_currency (int): Some items include a currency that doesn't match the usual currency for the location where that product is sold or shipped.. [optional] # noqa: E501 min_ad_price_invalid (int): Some items include min_ad_price values that are formatted incorrectly.. [optional] # noqa: E501 @@ -418,11 +403,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 optional_condition_invalid (int): Some items include condition values that are formatted incorrectly, which may limit visibility in recommendations, search results and shopping experiences.. [optional] # noqa: E501 ios_deep_link_invalid (int): Some items include invalid ios_deep_link values.. [optional] # noqa: E501 android_deep_link_invalid (int): Some items include invalid android_deep_link.. [optional] # noqa: E501 - availability_normalized (int): Some items include availability values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 - condition_normalized (int): Some items include condition values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 - gender_normalized (int): Some items include gender values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 - size_type_normalized (int): Some items include size_type values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 - age_group_normalized (int): Some items include age_group values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 utm_source_auto_corrected (int): Some items include utm_source values that are formatted incorrectly and have been automatically corrected.. [optional] # noqa: E501 country_does_not_map_to_currency (int): Some items include a currency that doesn't match the usual currency for the location where that product is sold or shipped.. [optional] # noqa: E501 min_ad_price_invalid (int): Some items include min_ad_price values that are formatted incorrectly.. [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/catalogs_feeds_create_request.py b/openapi_generated/pinterest_client/model/catalogs_feeds_create_request.py index 665184b..3d1eb98 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feeds_create_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_feeds_create_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -34,12 +34,14 @@ def lazy_import(): from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus from openapi_generated.pinterest_client.model.country import Country from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency from openapi_generated.pinterest_client.model.product_availability_type import ProductAvailabilityType globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus globals()['Country'] = Country globals()['NullableCurrency'] = NullableCurrency globals()['ProductAvailabilityType'] = ProductAvailabilityType @@ -80,14 +82,7 @@ class CatalogsFeedsCreateRequest(ModelNormal): }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -106,12 +101,13 @@ def openapi_types(): 'name': (str,), # noqa: E501 'format': (CatalogsFormat,), # noqa: E501 'location': (str,), # noqa: E501 - 'default_country': (Country,), # noqa: E501 - 'default_availability': (ProductAvailabilityType,), # noqa: E501 'default_currency': (NullableCurrency,), # noqa: E501 'default_locale': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'credentials': (CatalogsFeedCredentials,), # noqa: E501 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'default_country': (Country,), # noqa: E501 + 'default_availability': (ProductAvailabilityType,), # noqa: E501 + 'status': (str,), # noqa: E501 } @cached_property @@ -123,12 +119,13 @@ def discriminator(): 'name': 'name', # noqa: E501 'format': 'format', # noqa: E501 'location': 'location', # noqa: E501 - 'default_country': 'default_country', # noqa: E501 - 'default_availability': 'default_availability', # noqa: E501 'default_currency': 'default_currency', # noqa: E501 'default_locale': 'default_locale', # noqa: E501 'credentials': 'credentials', # noqa: E501 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'default_country': 'default_country', # noqa: E501 + 'default_availability': 'default_availability', # noqa: E501 + 'status': 'status', # noqa: E501 } read_only_vars = { @@ -177,12 +174,13 @@ def _from_openapi_data(cls, name, format, location, *args, **kwargs): # noqa: E Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - default_country (Country): [optional] # noqa: E501 - default_availability (ProductAvailabilityType): [optional] # noqa: E501 default_currency (NullableCurrency): [optional] # noqa: E501 default_locale (bool, date, datetime, dict, float, int, list, str, none_type): The locale used within a feed for product descriptions.. [optional] # noqa: E501 credentials (CatalogsFeedCredentials): [optional] # noqa: E501 preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + default_country (Country): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + status (str): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -272,12 +270,13 @@ def __init__(self, name, format, location, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - default_country (Country): [optional] # noqa: E501 - default_availability (ProductAvailabilityType): [optional] # noqa: E501 default_currency (NullableCurrency): [optional] # noqa: E501 default_locale (bool, date, datetime, dict, float, int, list, str, none_type): The locale used within a feed for product descriptions.. [optional] # noqa: E501 credentials (CatalogsFeedCredentials): [optional] # noqa: E501 preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + default_country (Country): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + status (str): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/catalogs_feeds_update_request.py b/openapi_generated/pinterest_client/model/catalogs_feeds_update_request.py index bf3cf51..b20ac1c 100644 --- a/openapi_generated/pinterest_client/model/catalogs_feeds_update_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_feeds_update_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -80,14 +80,7 @@ class CatalogsFeedsUpdateRequest(ModelNormal): }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/openapi_generated/pinterest_client/model/catalogs_format.py b/openapi_generated/pinterest_client/model/catalogs_format.py index bd45680..1a89701 100644 --- a/openapi_generated/pinterest_client/model/catalogs_format.py +++ b/openapi_generated/pinterest_client/model/catalogs_format.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_address.py b/openapi_generated/pinterest_client/model/catalogs_hotel_address.py new file mode 100644 index 0000000..9ace899 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_address.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsHotelAddress(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'addr1': (str,), # noqa: E501 + 'city': (str,), # noqa: E501 + 'region': (str,), # noqa: E501 + 'country': (str,), # noqa: E501 + 'postal_code': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'addr1': 'addr1', # noqa: E501 + 'city': 'city', # noqa: E501 + 'region': 'region', # noqa: E501 + 'country': 'country', # noqa: E501 + 'postal_code': 'postal_code', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelAddress - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + addr1 (str): Primary street address of hotel.. [optional] # noqa: E501 + city (str): City where the hotel is located.. [optional] # noqa: E501 + region (str): State, county, province, where the hotel is located.. [optional] # noqa: E501 + country (str): Country where the hotel is located.. [optional] # noqa: E501 + postal_code (str): Required for countries with a postal code system. Postal or zip code of the hotel.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsHotelAddress - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + addr1 (str): Primary street address of hotel.. [optional] # noqa: E501 + city (str): City where the hotel is located.. [optional] # noqa: E501 + region (str): State, county, province, where the hotel is located.. [optional] # noqa: E501 + country (str): Country where the hotel is located.. [optional] # noqa: E501 + postal_code (str): Required for countries with a postal code system. Postal or zip code of the hotel.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_attributes.py b/openapi_generated/pinterest_client/model/catalogs_hotel_attributes.py new file mode 100644 index 0000000..2fc64db --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_attributes.py @@ -0,0 +1,392 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_address import CatalogsHotelAddress + from openapi_generated.pinterest_client.model.catalogs_hotel_attributes_all_of import CatalogsHotelAttributesAllOf + from openapi_generated.pinterest_client.model.catalogs_hotel_attributes_all_of_main_image import CatalogsHotelAttributesAllOfMainImage + from openapi_generated.pinterest_client.model.catalogs_hotel_guest_ratings import CatalogsHotelGuestRatings + from openapi_generated.pinterest_client.model.catalogs_updatable_hotel_attributes import CatalogsUpdatableHotelAttributes + globals()['CatalogsHotelAddress'] = CatalogsHotelAddress + globals()['CatalogsHotelAttributesAllOf'] = CatalogsHotelAttributesAllOf + globals()['CatalogsHotelAttributesAllOfMainImage'] = CatalogsHotelAttributesAllOfMainImage + globals()['CatalogsHotelGuestRatings'] = CatalogsHotelGuestRatings + globals()['CatalogsUpdatableHotelAttributes'] = CatalogsUpdatableHotelAttributes + + +class CatalogsHotelAttributes(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'main_image': (CatalogsHotelAttributesAllOfMainImage,), # noqa: E501 + 'additional_image_link': ([str], none_type,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 + 'link': (str, none_type,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'brand': (str, none_type,), # noqa: E501 + 'latitude': (float,), # noqa: E501 + 'longitude': (float, none_type,), # noqa: E501 + 'neighborhood': ([str], none_type,), # noqa: E501 + 'address': (CatalogsHotelAddress,), # noqa: E501 + 'custom_label_0': (str, none_type,), # noqa: E501 + 'custom_label_1': (str, none_type,), # noqa: E501 + 'custom_label_2': (str, none_type,), # noqa: E501 + 'custom_label_3': (str, none_type,), # noqa: E501 + 'custom_label_4': (str, none_type,), # noqa: E501 + 'category': (str, none_type,), # noqa: E501 + 'base_price': (str, none_type,), # noqa: E501 + 'sale_price': (str, none_type,), # noqa: E501 + 'guest_ratings': (CatalogsHotelGuestRatings,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'main_image': 'main_image', # noqa: E501 + 'additional_image_link': 'additional_image_link', # noqa: E501 + 'name': 'name', # noqa: E501 + 'link': 'link', # noqa: E501 + 'description': 'description', # noqa: E501 + 'brand': 'brand', # noqa: E501 + 'latitude': 'latitude', # noqa: E501 + 'longitude': 'longitude', # noqa: E501 + 'neighborhood': 'neighborhood', # noqa: E501 + 'address': 'address', # noqa: E501 + 'custom_label_0': 'custom_label_0', # noqa: E501 + 'custom_label_1': 'custom_label_1', # noqa: E501 + 'custom_label_2': 'custom_label_2', # noqa: E501 + 'custom_label_3': 'custom_label_3', # noqa: E501 + 'custom_label_4': 'custom_label_4', # noqa: E501 + 'category': 'category', # noqa: E501 + 'base_price': 'base_price', # noqa: E501 + 'sale_price': 'sale_price', # noqa: E501 + 'guest_ratings': 'guest_ratings', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + main_image (CatalogsHotelAttributesAllOfMainImage): [optional] # noqa: E501 + additional_image_link ([str], none_type):

<= 2000 characters

The links to additional images for your hotel. Up to ten additional images can be used to show a hotel from different angles. Must begin with http:// or https://.

. [optional] # noqa: E501 + name (str, none_type): The hotel's name.. [optional] # noqa: E501 + link (str, none_type): Link to the product page. [optional] # noqa: E501 + description (str, none_type): Brief description of the hotel.. [optional] # noqa: E501 + brand (str, none_type): The brand to which this hotel belongs to.. [optional] # noqa: E501 + latitude (float): Latitude of the hotel.. [optional] # noqa: E501 + longitude (float, none_type): Longitude of the hotel.. [optional] # noqa: E501 + neighborhood ([str], none_type): A list of neighborhoods where the hotel is located. [optional] # noqa: E501 + address (CatalogsHotelAddress): [optional] # noqa: E501 + custom_label_0 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_1 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_2 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_3 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_4 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + category (str, none_type): The type of property. The category can be any type of internal description desired.. [optional] # noqa: E501 + base_price (str, none_type): Base price of the hotel room per night followed by the ISO currency code. [optional] # noqa: E501 + sale_price (str, none_type): Sale price of a hotel room per night. Used to advertise discounts off the regular price of the hotel.. [optional] # noqa: E501 + guest_ratings (CatalogsHotelGuestRatings): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsHotelAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + main_image (CatalogsHotelAttributesAllOfMainImage): [optional] # noqa: E501 + additional_image_link ([str], none_type):

<= 2000 characters

The links to additional images for your hotel. Up to ten additional images can be used to show a hotel from different angles. Must begin with http:// or https://.

. [optional] # noqa: E501 + name (str, none_type): The hotel's name.. [optional] # noqa: E501 + link (str, none_type): Link to the product page. [optional] # noqa: E501 + description (str, none_type): Brief description of the hotel.. [optional] # noqa: E501 + brand (str, none_type): The brand to which this hotel belongs to.. [optional] # noqa: E501 + latitude (float): Latitude of the hotel.. [optional] # noqa: E501 + longitude (float, none_type): Longitude of the hotel.. [optional] # noqa: E501 + neighborhood ([str], none_type): A list of neighborhoods where the hotel is located. [optional] # noqa: E501 + address (CatalogsHotelAddress): [optional] # noqa: E501 + custom_label_0 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_1 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_2 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_3 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_4 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + category (str, none_type): The type of property. The category can be any type of internal description desired.. [optional] # noqa: E501 + base_price (str, none_type): Base price of the hotel room per night followed by the ISO currency code. [optional] # noqa: E501 + sale_price (str, none_type): Sale price of a hotel room per night. Used to advertise discounts off the regular price of the hotel.. [optional] # noqa: E501 + guest_ratings (CatalogsHotelGuestRatings): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_attributes_all_of.py b/openapi_generated/pinterest_client/model/catalogs_hotel_attributes_all_of.py new file mode 100644 index 0000000..e4c4db4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_attributes_all_of.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_attributes_all_of_main_image import CatalogsHotelAttributesAllOfMainImage + globals()['CatalogsHotelAttributesAllOfMainImage'] = CatalogsHotelAttributesAllOfMainImage + + +class CatalogsHotelAttributesAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'main_image': (CatalogsHotelAttributesAllOfMainImage,), # noqa: E501 + 'additional_image_link': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'main_image': 'main_image', # noqa: E501 + 'additional_image_link': 'additional_image_link', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelAttributesAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + main_image (CatalogsHotelAttributesAllOfMainImage): [optional] # noqa: E501 + additional_image_link ([str], none_type):

<= 2000 characters

The links to additional images for your hotel. Up to ten additional images can be used to show a hotel from different angles. Must begin with http:// or https://.

. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsHotelAttributesAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + main_image (CatalogsHotelAttributesAllOfMainImage): [optional] # noqa: E501 + additional_image_link ([str], none_type):

<= 2000 characters

The links to additional images for your hotel. Up to ten additional images can be used to show a hotel from different angles. Must begin with http:// or https://.

. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_attributes_all_of_main_image.py b/openapi_generated/pinterest_client/model/catalogs_hotel_attributes_all_of_main_image.py new file mode 100644 index 0000000..2ed3e9b --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_attributes_all_of_main_image.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsHotelAttributesAllOfMainImage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'link': (str,), # noqa: E501 + 'tag': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'link': 'link', # noqa: E501 + 'tag': 'tag', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelAttributesAllOfMainImage - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + link (str):

<= 2000 characters

The link to the main hotel image. Image should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your hotel. The URL of your main_image.link must be accessible by the Pinterest user-agent, and send the accurate image. Please make sure there is no template or placeholder image at the link. Must start with http:// or https://.

. [optional] # noqa: E501 + tag ([str], none_type): Tag appended to the image that identifies image category or details. There can be multiple tags associated with an image. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsHotelAttributesAllOfMainImage - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + link (str):

<= 2000 characters

The link to the main hotel image. Image should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your hotel. The URL of your main_image.link must be accessible by the Pinterest user-agent, and send the accurate image. Please make sure there is no template or placeholder image at the link. Must start with http:// or https://.

. [optional] # noqa: E501 + tag ([str], none_type): Tag appended to the image that identifies image category or details. There can be multiple tags associated with an image. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_batch_item.py b/openapi_generated/pinterest_client/model/catalogs_hotel_batch_item.py new file mode 100644 index 0000000..08c4c6b --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_batch_item.py @@ -0,0 +1,349 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_create_hotel_item import CatalogsCreateHotelItem + from openapi_generated.pinterest_client.model.catalogs_delete_hotel_item import CatalogsDeleteHotelItem + from openapi_generated.pinterest_client.model.catalogs_updatable_hotel_attributes import CatalogsUpdatableHotelAttributes + from openapi_generated.pinterest_client.model.catalogs_update_hotel_item import CatalogsUpdateHotelItem + from openapi_generated.pinterest_client.model.catalogs_upsert_hotel_item import CatalogsUpsertHotelItem + globals()['CatalogsCreateHotelItem'] = CatalogsCreateHotelItem + globals()['CatalogsDeleteHotelItem'] = CatalogsDeleteHotelItem + globals()['CatalogsUpdatableHotelAttributes'] = CatalogsUpdatableHotelAttributes + globals()['CatalogsUpdateHotelItem'] = CatalogsUpdateHotelItem + globals()['CatalogsUpsertHotelItem'] = CatalogsUpsertHotelItem + + +class CatalogsHotelBatchItem(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'DELETE': "DELETE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'operation': (str,), # noqa: E501 + 'hotel_id': (str,), # noqa: E501 + 'attributes': (CatalogsUpdatableHotelAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATE': CatalogsCreateHotelItem, + 'CatalogsCreateHotelItem': CatalogsCreateHotelItem, + 'CatalogsDeleteHotelItem': CatalogsDeleteHotelItem, + 'CatalogsUpdateHotelItem': CatalogsUpdateHotelItem, + 'CatalogsUpsertHotelItem': CatalogsUpsertHotelItem, + 'DELETE': CatalogsDeleteHotelItem, + 'UPDATE': CatalogsUpdateHotelItem, + 'UPSERT': CatalogsUpsertHotelItem, + } + if not val: + return None + return {'operation': val} + + attribute_map = { + 'operation': 'operation', # noqa: E501 + 'hotel_id': 'hotel_id', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelBatchItem - a model defined in OpenAPI + + Keyword Args: + operation (str): defaults to "DELETE", must be one of ["DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + hotel_id (str): The catalog hotel id in the merchant namespace. [optional] # noqa: E501 + attributes (CatalogsUpdatableHotelAttributes): [optional] # noqa: E501 + """ + + operation = kwargs.get('operation', "DELETE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsHotelBatchItem - a model defined in OpenAPI + + Keyword Args: + operation (str): defaults to "DELETE", must be one of ["DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + hotel_id (str): The catalog hotel id in the merchant namespace. [optional] # noqa: E501 + attributes (CatalogsUpdatableHotelAttributes): [optional] # noqa: E501 + """ + + operation = kwargs.get('operation', "DELETE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + CatalogsCreateHotelItem, + CatalogsDeleteHotelItem, + CatalogsUpdateHotelItem, + CatalogsUpsertHotelItem, + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_batch_request.py b/openapi_generated/pinterest_client/model/catalogs_hotel_batch_request.py new file mode 100644 index 0000000..b390fdd --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_batch_request.py @@ -0,0 +1,299 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_batch_item import CatalogsHotelBatchItem + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsHotelBatchItem'] = CatalogsHotelBatchItem + globals()['Country'] = Country + + +class CatalogsHotelBatchRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + ('items',): { + 'max_items': 1000, + 'min_items': 1, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'items': ([CatalogsHotelBatchItem],), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + 'items': 'items', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, country, language, items, *args, **kwargs): # noqa: E501 + """CatalogsHotelBatchRequest - a model defined in OpenAPI + + Args: + country (Country): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. + items ([CatalogsHotelBatchItem]): Array with catalogs item operations + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the hotel item. If not provided, default to oldest hotel catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.country = country + self.language = language + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, country, language, items, *args, **kwargs): # noqa: E501 + """CatalogsHotelBatchRequest - a model defined in OpenAPI + + Args: + country (Country): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. + items ([CatalogsHotelBatchItem]): Array with catalogs item operations + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the hotel item. If not provided, default to oldest hotel catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.country = country + self.language = language + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_feed.py b/openapi_generated/pinterest_client/model/catalogs_hotel_feed.py new file mode 100644 index 0000000..3a2f0ee --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_feed.py @@ -0,0 +1,379 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_db_item import CatalogsDbItem + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.feed_fields1 import FeedFields1 + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + globals()['CatalogsDbItem'] = CatalogsDbItem + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['FeedFields1'] = FeedFields1 + globals()['NullableCurrency'] = NullableCurrency + + +class CatalogsHotelFeed(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'created_at': (datetime,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'updated_at': (datetime,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'status': (CatalogsStatus,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'default_locale': (str,), # noqa: E501 + 'catalog_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'created_at': 'created_at', # noqa: E501 + 'id': 'id', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'location': 'location', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'status': 'status', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelFeed - a model defined in OpenAPI + + Keyword Args: + created_at (datetime): + id (str): + updated_at (datetime): + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. + format (CatalogsFormat): + catalog_type (CatalogsType): + credentials (CatalogsFeedCredentials): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + preferred_processing_schedule (CatalogsFeedProcessingSchedule): + status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsHotelFeed - a model defined in OpenAPI + + Keyword Args: + created_at (datetime): + id (str): + updated_at (datetime): + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. + format (CatalogsFormat): + catalog_type (CatalogsType): + credentials (CatalogsFeedCredentials): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + preferred_processing_schedule (CatalogsFeedProcessingSchedule): + status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_feeds_create_request.py b/openapi_generated/pinterest_client/model/catalogs_hotel_feeds_create_request.py new file mode 100644 index 0000000..5230310 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_feeds_create_request.py @@ -0,0 +1,325 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['NullableCurrency'] = NullableCurrency + + +class CatalogsHotelFeedsCreateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('location',): { + 'regex': { + 'pattern': r'^(http|https|ftp|sftp):\/\/', # noqa: E501 + }, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'default_locale': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'catalog_id': (str, none_type,), # noqa: E501 + 'status': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'location': 'location', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, format, default_locale, location, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsHotelFeedsCreateRequest - a model defined in OpenAPI + + Args: + name (str): A human-friendly name associated to a given feed. + format (CatalogsFormat): + default_locale (bool, date, datetime, dict, float, int, list, str, none_type): The locale used within a feed for product descriptions. + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. At the moment a catalog can not have multiple hotel feeds but this will change in the future.. [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.format = format + self.default_locale = default_locale + self.location = location + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, format, default_locale, location, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsHotelFeedsCreateRequest - a model defined in OpenAPI + + Args: + name (str): A human-friendly name associated to a given feed. + format (CatalogsFormat): + default_locale (bool, date, datetime, dict, float, int, list, str, none_type): The locale used within a feed for product descriptions. + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. At the moment a catalog can not have multiple hotel feeds but this will change in the future.. [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.format = format + self.default_locale = default_locale + self.location = location + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_feeds_update_request.py b/openapi_generated/pinterest_client/model/catalogs_hotel_feeds_update_request.py new file mode 100644 index 0000000..cf731a2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_feeds_update_request.py @@ -0,0 +1,304 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['NullableCurrency'] = NullableCurrency + + +class CatalogsHotelFeedsUpdateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('location',): { + 'regex': { + 'pattern': r'^(http|https|ftp|sftp):\/\/', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'status': (CatalogsStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'location': 'location', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsHotelFeedsUpdateRequest - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + name (str): A human-friendly name associated to a given feed.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + status (CatalogsStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsHotelFeedsUpdateRequest - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + name (str): A human-friendly name associated to a given feed.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + status (CatalogsStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_guest_ratings.py b/openapi_generated/pinterest_client/model/catalogs_hotel_guest_ratings.py new file mode 100644 index 0000000..b1ebbb8 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_guest_ratings.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsHotelGuestRatings(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'score': (float,), # noqa: E501 + 'number_of_reviewers': (int,), # noqa: E501 + 'max_score': (float,), # noqa: E501 + 'rating_system': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'score': 'score', # noqa: E501 + 'number_of_reviewers': 'number_of_reviewers', # noqa: E501 + 'max_score': 'max_score', # noqa: E501 + 'rating_system': 'rating_system', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelGuestRatings - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + score (float): Your hotel's rating.. [optional] # noqa: E501 + number_of_reviewers (int): Total number of people who have rated this hotel.. [optional] # noqa: E501 + max_score (float): Max value for the hotel rating score.. [optional] # noqa: E501 + rating_system (str): System you use for guest reviews.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsHotelGuestRatings - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + score (float): Your hotel's rating.. [optional] # noqa: E501 + number_of_reviewers (int): Total number of people who have rated this hotel.. [optional] # noqa: E501 + max_score (float): Max value for the hotel rating score.. [optional] # noqa: E501 + rating_system (str): System you use for guest reviews.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_item_error_response.py b/openapi_generated/pinterest_client/model/catalogs_hotel_item_error_response.py new file mode 100644 index 0000000..e217fcf --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_item_error_response.py @@ -0,0 +1,278 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.item_validation_event import ItemValidationEvent + globals()['CatalogsType'] = CatalogsType + globals()['ItemValidationEvent'] = ItemValidationEvent + + +class CatalogsHotelItemErrorResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'hotel_id': (str,), # noqa: E501 + 'errors': ([ItemValidationEvent],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'hotel_id': 'hotel_id', # noqa: E501 + 'errors': 'errors', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsHotelItemErrorResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + hotel_id (str): The catalog hotel id in the merchant namespace. [optional] # noqa: E501 + errors ([ItemValidationEvent]): Array with the errors for the item id requested. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsHotelItemErrorResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + hotel_id (str): The catalog hotel id in the merchant namespace. [optional] # noqa: E501 + errors ([ItemValidationEvent]): Array with the errors for the item id requested. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_item_response.py b/openapi_generated/pinterest_client/model/catalogs_hotel_item_response.py new file mode 100644 index 0000000..d37ec15 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_item_response.py @@ -0,0 +1,287 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_attributes import CatalogsHotelAttributes + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.pin import Pin + globals()['CatalogsHotelAttributes'] = CatalogsHotelAttributes + globals()['CatalogsType'] = CatalogsType + globals()['Pin'] = Pin + + +class CatalogsHotelItemResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('pins',): { + 'max_items': 11, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'hotel_id': (str,), # noqa: E501 + 'pins': ([Pin], none_type,), # noqa: E501 + 'attributes': (CatalogsHotelAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'hotel_id': 'hotel_id', # noqa: E501 + 'pins': 'pins', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsHotelItemResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + hotel_id (str): The catalog hotel id in the merchant namespace. [optional] # noqa: E501 + pins ([Pin], none_type): The pins mapped to the item. [optional] # noqa: E501 + attributes (CatalogsHotelAttributes): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsHotelItemResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + hotel_id (str): The catalog hotel id in the merchant namespace. [optional] # noqa: E501 + pins ([Pin], none_type): The pins mapped to the item. [optional] # noqa: E501 + attributes (CatalogsHotelAttributes): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_items_batch.py b/openapi_generated/pinterest_client/model/catalogs_hotel_items_batch.py new file mode 100644 index 0000000..97c38ca --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_items_batch.py @@ -0,0 +1,294 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.batch_operation_status import BatchOperationStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.hotel_processing_record import HotelProcessingRecord + globals()['BatchOperationStatus'] = BatchOperationStatus + globals()['CatalogsType'] = CatalogsType + globals()['HotelProcessingRecord'] = HotelProcessingRecord + + +class CatalogsHotelItemsBatch(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'batch_id': (str,), # noqa: E501 + 'created_time': (datetime,), # noqa: E501 + 'completed_time': (datetime, none_type,), # noqa: E501 + 'status': (BatchOperationStatus,), # noqa: E501 + 'items': ([HotelProcessingRecord],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'batch_id': 'batch_id', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + 'completed_time': 'completed_time', # noqa: E501 + 'status': 'status', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + 'created_time', # noqa: E501 + 'completed_time', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsHotelItemsBatch - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + batch_id (str): Id of the catalogs items batch. [optional] # noqa: E501 + created_time (datetime): Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + completed_time (datetime, none_type): Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + status (BatchOperationStatus): [optional] # noqa: E501 + items ([HotelProcessingRecord]): Array with the catalogs items processing records part of the catalogs items batch. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsHotelItemsBatch - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + batch_id (str): Id of the catalogs items batch. [optional] # noqa: E501 + created_time (datetime): Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + completed_time (datetime, none_type): Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + status (BatchOperationStatus): [optional] # noqa: E501 + items ([HotelProcessingRecord]): Array with the catalogs items processing records part of the catalogs items batch. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_items_filter.py b/openapi_generated/pinterest_client/model/catalogs_hotel_items_filter.py new file mode 100644 index 0000000..6123df2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_items_filter.py @@ -0,0 +1,286 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsHotelItemsFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + ('hotel_ids',): { + 'max_items': 100, + 'min_items': 1, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'catalog_type': (str,), # noqa: E501 + 'hotel_ids': ([str],), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'hotel_ids': 'hotel_ids', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, hotel_ids, *args, **kwargs): # noqa: E501 + """CatalogsHotelItemsFilter - a model defined in OpenAPI + + Args: + hotel_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the hotel item. If not provided, default to oldest hotel catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.hotel_ids = hotel_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, hotel_ids, *args, **kwargs): # noqa: E501 + """CatalogsHotelItemsFilter - a model defined in OpenAPI + + Args: + hotel_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the hotel item. If not provided, default to oldest hotel catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.hotel_ids = hotel_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_items_post_filter.py b/openapi_generated/pinterest_client/model/catalogs_hotel_items_post_filter.py new file mode 100644 index 0000000..ff35af3 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_items_post_filter.py @@ -0,0 +1,286 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsHotelItemsPostFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + ('hotel_ids',): { + 'max_items': 1000, + 'min_items': 1, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'catalog_type': (str,), # noqa: E501 + 'hotel_ids': ([str],), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'hotel_ids': 'hotel_ids', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, hotel_ids, *args, **kwargs): # noqa: E501 + """CatalogsHotelItemsPostFilter - a model defined in OpenAPI + + Args: + hotel_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the hotel item. If not provided, default to oldest hotel catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.hotel_ids = hotel_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, hotel_ids, *args, **kwargs): # noqa: E501 + """CatalogsHotelItemsPostFilter - a model defined in OpenAPI + + Args: + hotel_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the hotel item. If not provided, default to oldest hotel catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.hotel_ids = hotel_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_list_products_by_catalog_based_filter_request.py b/openapi_generated/pinterest_client/model/catalogs_hotel_list_products_by_catalog_based_filter_request.py new file mode 100644 index 0000000..5124a2e --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_list_products_by_catalog_based_filter_request.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filters import CatalogsHotelProductGroupFilters + globals()['CatalogsHotelProductGroupFilters'] = CatalogsHotelProductGroupFilters + + +class CatalogsHotelListProductsByCatalogBasedFilterRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'filters': (CatalogsHotelProductGroupFilters,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_id, filters, *args, **kwargs): # noqa: E501 + """CatalogsHotelListProductsByCatalogBasedFilterRequest - a model defined in OpenAPI + + Args: + catalog_id (str): Catalog id pertaining to the hotel product group. + filters (CatalogsHotelProductGroupFilters): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.catalog_id = catalog_id + self.filters = filters + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_id, filters, *args, **kwargs): # noqa: E501 + """CatalogsHotelListProductsByCatalogBasedFilterRequest - a model defined in OpenAPI + + Args: + catalog_id (str): Catalog id pertaining to the hotel product group. + filters (CatalogsHotelProductGroupFilters): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.catalog_id = catalog_id + self.filters = filters + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_product.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product.py new file mode 100644 index 0000000..1a8b473 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product.py @@ -0,0 +1,287 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_product_metadata import CatalogsHotelProductMetadata + from openapi_generated.pinterest_client.model.pin import Pin + globals()['CatalogsHotelProductMetadata'] = CatalogsHotelProductMetadata + globals()['Pin'] = Pin + + +class CatalogsHotelProduct(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'metadata': (CatalogsHotelProductMetadata,), # noqa: E501 + 'pin': (Pin,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'pin': 'pin', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, metadata, pin, *args, **kwargs): # noqa: E501 + """CatalogsHotelProduct - a model defined in OpenAPI + + Args: + metadata (CatalogsHotelProductMetadata): + pin (Pin): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.metadata = metadata + self.pin = pin + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, metadata, pin, *args, **kwargs): # noqa: E501 + """CatalogsHotelProduct - a model defined in OpenAPI + + Args: + metadata (CatalogsHotelProductMetadata): + pin (Pin): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.metadata = metadata + self.pin = pin + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_product_group.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group.py new file mode 100644 index 0000000..f2f4c6a --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group.py @@ -0,0 +1,317 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filters import CatalogsHotelProductGroupFilters + globals()['CatalogsHotelProductGroupFilters'] = CatalogsHotelProductGroupFilters + + +class CatalogsHotelProductGroup(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'filters': (CatalogsHotelProductGroupFilters,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'created_at': (int,), # noqa: E501 + 'updated_at': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'id': 'id', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, filters, catalog_id, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroup - a model defined in OpenAPI + + Args: + id (str): ID of the hotel product group. + filters (CatalogsHotelProductGroupFilters): + catalog_id (str): Catalog id pertaining to the hotel product group. + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Name of hotel product group. [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + created_at (int): Unix timestamp in seconds of when catalog product group was created.. [optional] # noqa: E501 + updated_at (int): Unix timestamp in seconds of last time catalog product group was updated.. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.id = id + self.filters = filters + self.catalog_id = catalog_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, filters, catalog_id, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroup - a model defined in OpenAPI + + Args: + id (str): ID of the hotel product group. + filters (CatalogsHotelProductGroupFilters): + catalog_id (str): Catalog id pertaining to the hotel product group. + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Name of hotel product group. [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + created_at (int): Unix timestamp in seconds of when catalog product group was created.. [optional] # noqa: E501 + updated_at (int): Unix timestamp in seconds of last time catalog product group was updated.. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.id = id + self.filters = filters + self.catalog_id = catalog_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_create_request.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_create_request.py new file mode 100644 index 0000000..6bf46bd --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_create_request.py @@ -0,0 +1,293 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filters import CatalogsHotelProductGroupFilters + globals()['CatalogsHotelProductGroupFilters'] = CatalogsHotelProductGroupFilters + + +class CatalogsHotelProductGroupCreateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'filters': (CatalogsHotelProductGroupFilters,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'name': 'name', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'description': 'description', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, filters, catalog_id, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupCreateRequest - a model defined in OpenAPI + + Args: + name (str): + filters (CatalogsHotelProductGroupFilters): + catalog_id (str): Catalog id pertaining to the hotel product group. + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str, none_type): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.name = name + self.filters = filters + self.catalog_id = catalog_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, filters, catalog_id, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupCreateRequest - a model defined in OpenAPI + + Args: + name (str): + filters (CatalogsHotelProductGroupFilters): + catalog_id (str): Catalog id pertaining to the hotel product group. + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str, none_type): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.name = name + self.filters = filters + self.catalog_id = catalog_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filter_keys.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filter_keys.py new file mode 100644 index 0000000..3c7338e --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filter_keys.py @@ -0,0 +1,375 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.brand_filter import BrandFilter + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_countries_criteria import CatalogsProductGroupMultipleCountriesCriteria + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_string_criteria import CatalogsProductGroupMultipleStringCriteria + from openapi_generated.pinterest_client.model.catalogs_product_group_pricing_currency_criteria import CatalogsProductGroupPricingCurrencyCriteria + from openapi_generated.pinterest_client.model.country_filter import CountryFilter + from openapi_generated.pinterest_client.model.custom_label0_filter import CustomLabel0Filter + from openapi_generated.pinterest_client.model.custom_label1_filter import CustomLabel1Filter + from openapi_generated.pinterest_client.model.custom_label2_filter import CustomLabel2Filter + from openapi_generated.pinterest_client.model.custom_label3_filter import CustomLabel3Filter + from openapi_generated.pinterest_client.model.custom_label4_filter import CustomLabel4Filter + from openapi_generated.pinterest_client.model.hotel_id_filter import HotelIdFilter + from openapi_generated.pinterest_client.model.price_filter import PriceFilter + globals()['BrandFilter'] = BrandFilter + globals()['CatalogsProductGroupMultipleCountriesCriteria'] = CatalogsProductGroupMultipleCountriesCriteria + globals()['CatalogsProductGroupMultipleStringCriteria'] = CatalogsProductGroupMultipleStringCriteria + globals()['CatalogsProductGroupPricingCurrencyCriteria'] = CatalogsProductGroupPricingCurrencyCriteria + globals()['CountryFilter'] = CountryFilter + globals()['CustomLabel0Filter'] = CustomLabel0Filter + globals()['CustomLabel1Filter'] = CustomLabel1Filter + globals()['CustomLabel2Filter'] = CustomLabel2Filter + globals()['CustomLabel3Filter'] = CustomLabel3Filter + globals()['CustomLabel4Filter'] = CustomLabel4Filter + globals()['HotelIdFilter'] = HotelIdFilter + globals()['PriceFilter'] = PriceFilter + + +class CatalogsHotelProductGroupFilterKeys(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'price': (CatalogsProductGroupPricingCurrencyCriteria,), # noqa: E501 + 'hotel_id': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'brand': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'custom_label_0': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'custom_label_1': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'custom_label_2': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'custom_label_3': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'custom_label_4': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + 'country': (CatalogsProductGroupMultipleCountriesCriteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'price': 'PRICE', # noqa: E501 + 'hotel_id': 'HOTEL_ID', # noqa: E501 + 'brand': 'BRAND', # noqa: E501 + 'custom_label_0': 'CUSTOM_LABEL_0', # noqa: E501 + 'custom_label_1': 'CUSTOM_LABEL_1', # noqa: E501 + 'custom_label_2': 'CUSTOM_LABEL_2', # noqa: E501 + 'custom_label_3': 'CUSTOM_LABEL_3', # noqa: E501 + 'custom_label_4': 'CUSTOM_LABEL_4', # noqa: E501 + 'country': 'COUNTRY', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupFilterKeys - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + price (CatalogsProductGroupPricingCurrencyCriteria): [optional] # noqa: E501 + hotel_id (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + brand (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_0 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_1 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_2 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_3 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_4 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + country (CatalogsProductGroupMultipleCountriesCriteria): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupFilterKeys - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + price (CatalogsProductGroupPricingCurrencyCriteria): [optional] # noqa: E501 + hotel_id (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + brand (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_0 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_1 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_2 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_3 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + custom_label_4 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 + country (CatalogsProductGroupMultipleCountriesCriteria): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + BrandFilter, + CountryFilter, + CustomLabel0Filter, + CustomLabel1Filter, + CustomLabel2Filter, + CustomLabel3Filter, + CustomLabel4Filter, + HotelIdFilter, + PriceFilter, + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters.py new file mode 100644 index 0000000..be33cfb --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters.py @@ -0,0 +1,322 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filter_keys import CatalogsHotelProductGroupFilterKeys + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filters_all_of import CatalogsHotelProductGroupFiltersAllOf + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filters_any_of import CatalogsHotelProductGroupFiltersAnyOf + globals()['CatalogsHotelProductGroupFilterKeys'] = CatalogsHotelProductGroupFilterKeys + globals()['CatalogsHotelProductGroupFiltersAllOf'] = CatalogsHotelProductGroupFiltersAllOf + globals()['CatalogsHotelProductGroupFiltersAnyOf'] = CatalogsHotelProductGroupFiltersAnyOf + + +class CatalogsHotelProductGroupFilters(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'any_of': ([CatalogsHotelProductGroupFilterKeys],), # noqa: E501 + 'all_of': ([CatalogsHotelProductGroupFilterKeys],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'any_of': 'any_of', # noqa: E501 + 'all_of': 'all_of', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupFilters - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + any_of ([CatalogsHotelProductGroupFilterKeys]): [optional] # noqa: E501 + all_of ([CatalogsHotelProductGroupFilterKeys]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupFilters - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + any_of ([CatalogsHotelProductGroupFilterKeys]): [optional] # noqa: E501 + all_of ([CatalogsHotelProductGroupFilterKeys]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + CatalogsHotelProductGroupFiltersAllOf, + CatalogsHotelProductGroupFiltersAnyOf, + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters_all_of.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters_all_of.py new file mode 100644 index 0000000..447c2ea --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters_all_of.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filter_keys import CatalogsHotelProductGroupFilterKeys + globals()['CatalogsHotelProductGroupFilterKeys'] = CatalogsHotelProductGroupFilterKeys + + +class CatalogsHotelProductGroupFiltersAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'all_of': ([CatalogsHotelProductGroupFilterKeys],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'all_of': 'all_of', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, all_of, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupFiltersAllOf - a model defined in OpenAPI + + Args: + all_of ([CatalogsHotelProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.all_of = all_of + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, all_of, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupFiltersAllOf - a model defined in OpenAPI + + Args: + all_of ([CatalogsHotelProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.all_of = all_of + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters_any_of.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters_any_of.py new file mode 100644 index 0000000..237f037 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_filters_any_of.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filter_keys import CatalogsHotelProductGroupFilterKeys + globals()['CatalogsHotelProductGroupFilterKeys'] = CatalogsHotelProductGroupFilterKeys + + +class CatalogsHotelProductGroupFiltersAnyOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'any_of': ([CatalogsHotelProductGroupFilterKeys],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'any_of': 'any_of', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, any_of, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupFiltersAnyOf - a model defined in OpenAPI + + Args: + any_of ([CatalogsHotelProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.any_of = any_of + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, any_of, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupFiltersAnyOf - a model defined in OpenAPI + + Args: + any_of ([CatalogsHotelProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.any_of = any_of + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_product_counts.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_product_counts.py new file mode 100644 index 0000000..6b5bd59 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_product_counts.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsHotelProductGroupProductCounts(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + ('total',): { + 'inclusive_minimum': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'catalog_type': (str,), # noqa: E501 + 'total': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'total': 'total', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, total, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupProductCounts - a model defined in OpenAPI + + Args: + total (float): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.total = total + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, total, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupProductCounts - a model defined in OpenAPI + + Args: + total (float): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.total = total + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_update_request.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_update_request.py new file mode 100644 index 0000000..819c81c --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_update_request.py @@ -0,0 +1,270 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filters import CatalogsHotelProductGroupFilters + globals()['CatalogsHotelProductGroupFilters'] = CatalogsHotelProductGroupFilters + + +class CatalogsHotelProductGroupUpdateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'filters': (CatalogsHotelProductGroupFilters,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupUpdateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_type (str): [optional] if omitted the server will use the default value of "HOTEL" # noqa: E501 + name (str): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + filters (CatalogsHotelProductGroupFilters): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductGroupUpdateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_type (str): [optional] if omitted the server will use the default value of "HOTEL" # noqa: E501 + name (str): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + filters (CatalogsHotelProductGroupFilters): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_product_metadata.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product_metadata.py new file mode 100644 index 0000000..863e5d4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product_metadata.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsHotelProductMetadata(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'hotel_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'hotel_id': 'hotel_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, hotel_id, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductMetadata - a model defined in OpenAPI + + Args: + hotel_id (str): The user-created unique ID that represents the hotel item. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, hotel_id, *args, **kwargs): # noqa: E501 + """CatalogsHotelProductMetadata - a model defined in OpenAPI + + Args: + hotel_id (str): The user-created unique ID that represents the hotel item. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_hotel_report_parameters.py b/openapi_generated/pinterest_client/model/catalogs_hotel_report_parameters.py new file mode 100644 index 0000000..b4a2f29 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_report_parameters.py @@ -0,0 +1,281 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_report_distribution_issue_filter import CatalogsReportDistributionIssueFilter + from openapi_generated.pinterest_client.model.catalogs_report_feed_ingestion_filter import CatalogsReportFeedIngestionFilter + globals()['CatalogsReportDistributionIssueFilter'] = CatalogsReportDistributionIssueFilter + globals()['CatalogsReportFeedIngestionFilter'] = CatalogsReportFeedIngestionFilter + + +class CatalogsHotelReportParameters(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'HOTEL': "HOTEL", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'report': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'report': 'report', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, report, *args, **kwargs): # noqa: E501 + """CatalogsHotelReportParameters - a model defined in OpenAPI + + Args: + report ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.report = report + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, report, *args, **kwargs): # noqa: E501 + """CatalogsHotelReportParameters - a model defined in OpenAPI + + Args: + report ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + + Keyword Args: + catalog_type (str): defaults to "HOTEL", must be one of ["HOTEL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "HOTEL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.report = report + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_item_validation_details.py b/openapi_generated/pinterest_client/model/catalogs_item_validation_details.py index 22f67f0..618e03b 100644 --- a/openapi_generated/pinterest_client/model/catalogs_item_validation_details.py +++ b/openapi_generated/pinterest_client/model/catalogs_item_validation_details.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_item_validation_errors.py b/openapi_generated/pinterest_client/model/catalogs_item_validation_errors.py index 7669a28..eba2230 100644 --- a/openapi_generated/pinterest_client/model/catalogs_item_validation_errors.py +++ b/openapi_generated/pinterest_client/model/catalogs_item_validation_errors.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_item_validation_issue.py b/openapi_generated/pinterest_client/model/catalogs_item_validation_issue.py index 99192e6..3460010 100644 --- a/openapi_generated/pinterest_client/model/catalogs_item_validation_issue.py +++ b/openapi_generated/pinterest_client/model/catalogs_item_validation_issue.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -62,13 +62,10 @@ class CatalogsItemValidationIssue(ModelSimple): 'ADWORDS_FORMAT_WARNING': "ADWORDS_FORMAT_WARNING", 'ADWORDS_SAME_AS_LINK': "ADWORDS_SAME_AS_LINK", 'AGE_GROUP_INVALID': "AGE_GROUP_INVALID", - 'AGE_GROUP_NORMALIZED': "AGE_GROUP_NORMALIZED", 'ANDROID_DEEP_LINK_INVALID': "ANDROID_DEEP_LINK_INVALID", 'AVAILABILITY_DATE_INVALID': "AVAILABILITY_DATE_INVALID", 'AVAILABILITY_INVALID': "AVAILABILITY_INVALID", - 'AVAILABILITY_NORMALIZED': "AVAILABILITY_NORMALIZED", 'BLOCKLISTED_IMAGE_SIGNATURE': "BLOCKLISTED_IMAGE_SIGNATURE", - 'CONDITION_NORMALIZED': "CONDITION_NORMALIZED", 'COUNTRY_DOES_NOT_MAP_TO_CURRENCY': "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", 'CUSTOM_LABEL_LENGTH_TOO_LONG': "CUSTOM_LABEL_LENGTH_TOO_LONG", 'DESCRIPTION_LENGTH_TOO_LONG': "DESCRIPTION_LENGTH_TOO_LONG", @@ -76,7 +73,6 @@ class CatalogsItemValidationIssue(ModelSimple): 'DUPLICATE_PRODUCTS': "DUPLICATE_PRODUCTS", 'EXPIRATION_DATE_INVALID': "EXPIRATION_DATE_INVALID", 'GENDER_INVALID': "GENDER_INVALID", - 'GENDER_NORMALIZED': "GENDER_NORMALIZED", 'GTIN_INVALID': "GTIN_INVALID", 'IMAGE_LINK_INVALID': "IMAGE_LINK_INVALID", 'IMAGE_LINK_LENGTH_TOO_LONG': "IMAGE_LINK_LENGTH_TOO_LONG", @@ -118,7 +114,6 @@ class CatalogsItemValidationIssue(ModelSimple): 'SHIPPING_WIDTH_INVALID': "SHIPPING_WIDTH_INVALID", 'SIZE_SYSTEM_INVALID': "SIZE_SYSTEM_INVALID", 'SIZE_TYPE_INVALID': "SIZE_TYPE_INVALID", - 'SIZE_TYPE_NORMALIZED': "SIZE_TYPE_NORMALIZED", 'TAX_INVALID': "TAX_INVALID", 'TITLE_LENGTH_TOO_LONG': "TITLE_LENGTH_TOO_LONG", 'TITLE_MISSING': "TITLE_MISSING", @@ -176,10 +171,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["AD_LINK_FORMAT_WARNING", "AD_LINK_SAME_AS_LINK", "ADDITIONAL_IMAGE_LINK_LENGTH_TOO_LONG", "ADDITIONAL_IMAGE_LINK_WARNING", "ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "ADWORDS_FORMAT_WARNING", "ADWORDS_SAME_AS_LINK", "AGE_GROUP_INVALID", "AGE_GROUP_NORMALIZED", "ANDROID_DEEP_LINK_INVALID", "AVAILABILITY_DATE_INVALID", "AVAILABILITY_INVALID", "AVAILABILITY_NORMALIZED", "BLOCKLISTED_IMAGE_SIGNATURE", "CONDITION_NORMALIZED", "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", "CUSTOM_LABEL_LENGTH_TOO_LONG", "DESCRIPTION_LENGTH_TOO_LONG", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "EXPIRATION_DATE_INVALID", "GENDER_INVALID", "GENDER_NORMALIZED", "GTIN_INVALID", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "IMAGE_LINK_WARNING", "INVALID_DOMAIN", "IOS_DEEP_LINK_INVALID", "IS_BUNDLE_INVALID", "ITEM_ADDITIONAL_IMAGE_DOWNLOAD_FAILURE", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_FORMAT_WARNING", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "MIN_AD_PRICE_INVALID", "MPN_INVALID", "MULTIPACK_INVALID", "OPTIONAL_CONDITION_INVALID", "OPTIONAL_CONDITION_MISSING", "OPTIONAL_PRODUCT_CATEGORY_INVALID", "OPTIONAL_PRODUCT_CATEGORY_MISSING", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_CATEGORY_DEPTH_WARNING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "PRODUCT_TYPE_LENGTH_TOO_LONG", "SALE_DATE_INVALID", "SALES_PRICE_INVALID", "SALES_PRICE_TOO_HIGH", "SALES_PRICE_TOO_LOW", "SHIPPING_INVALID", "SHIPPING_HEIGHT_INVALID", "SHIPPING_WEIGHT_INVALID", "SHIPPING_WIDTH_INVALID", "SIZE_SYSTEM_INVALID", "SIZE_TYPE_INVALID", "SIZE_TYPE_NORMALIZED", "TAX_INVALID", "TITLE_LENGTH_TOO_LONG", "TITLE_MISSING", "TOO_MANY_ADDITIONAL_IMAGE_LINKS", "UTM_SOURCE_AUTO_CORRECTED", "WEIGHT_UNIT_INVALID", ] # noqa: E501 + args[0] (str):, must be one of ["AD_LINK_FORMAT_WARNING", "AD_LINK_SAME_AS_LINK", "ADDITIONAL_IMAGE_LINK_LENGTH_TOO_LONG", "ADDITIONAL_IMAGE_LINK_WARNING", "ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "ADWORDS_FORMAT_WARNING", "ADWORDS_SAME_AS_LINK", "AGE_GROUP_INVALID", "ANDROID_DEEP_LINK_INVALID", "AVAILABILITY_DATE_INVALID", "AVAILABILITY_INVALID", "BLOCKLISTED_IMAGE_SIGNATURE", "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", "CUSTOM_LABEL_LENGTH_TOO_LONG", "DESCRIPTION_LENGTH_TOO_LONG", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "EXPIRATION_DATE_INVALID", "GENDER_INVALID", "GTIN_INVALID", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "IMAGE_LINK_WARNING", "INVALID_DOMAIN", "IOS_DEEP_LINK_INVALID", "IS_BUNDLE_INVALID", "ITEM_ADDITIONAL_IMAGE_DOWNLOAD_FAILURE", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_FORMAT_WARNING", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "MIN_AD_PRICE_INVALID", "MPN_INVALID", "MULTIPACK_INVALID", "OPTIONAL_CONDITION_INVALID", "OPTIONAL_CONDITION_MISSING", "OPTIONAL_PRODUCT_CATEGORY_INVALID", "OPTIONAL_PRODUCT_CATEGORY_MISSING", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_CATEGORY_DEPTH_WARNING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "PRODUCT_TYPE_LENGTH_TOO_LONG", "SALE_DATE_INVALID", "SALES_PRICE_INVALID", "SALES_PRICE_TOO_HIGH", "SALES_PRICE_TOO_LOW", "SHIPPING_INVALID", "SHIPPING_HEIGHT_INVALID", "SHIPPING_WEIGHT_INVALID", "SHIPPING_WIDTH_INVALID", "SIZE_SYSTEM_INVALID", "SIZE_TYPE_INVALID", "TAX_INVALID", "TITLE_LENGTH_TOO_LONG", "TITLE_MISSING", "TOO_MANY_ADDITIONAL_IMAGE_LINKS", "UTM_SOURCE_AUTO_CORRECTED", "WEIGHT_UNIT_INVALID", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["AD_LINK_FORMAT_WARNING", "AD_LINK_SAME_AS_LINK", "ADDITIONAL_IMAGE_LINK_LENGTH_TOO_LONG", "ADDITIONAL_IMAGE_LINK_WARNING", "ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "ADWORDS_FORMAT_WARNING", "ADWORDS_SAME_AS_LINK", "AGE_GROUP_INVALID", "AGE_GROUP_NORMALIZED", "ANDROID_DEEP_LINK_INVALID", "AVAILABILITY_DATE_INVALID", "AVAILABILITY_INVALID", "AVAILABILITY_NORMALIZED", "BLOCKLISTED_IMAGE_SIGNATURE", "CONDITION_NORMALIZED", "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", "CUSTOM_LABEL_LENGTH_TOO_LONG", "DESCRIPTION_LENGTH_TOO_LONG", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "EXPIRATION_DATE_INVALID", "GENDER_INVALID", "GENDER_NORMALIZED", "GTIN_INVALID", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "IMAGE_LINK_WARNING", "INVALID_DOMAIN", "IOS_DEEP_LINK_INVALID", "IS_BUNDLE_INVALID", "ITEM_ADDITIONAL_IMAGE_DOWNLOAD_FAILURE", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_FORMAT_WARNING", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "MIN_AD_PRICE_INVALID", "MPN_INVALID", "MULTIPACK_INVALID", "OPTIONAL_CONDITION_INVALID", "OPTIONAL_CONDITION_MISSING", "OPTIONAL_PRODUCT_CATEGORY_INVALID", "OPTIONAL_PRODUCT_CATEGORY_MISSING", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_CATEGORY_DEPTH_WARNING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "PRODUCT_TYPE_LENGTH_TOO_LONG", "SALE_DATE_INVALID", "SALES_PRICE_INVALID", "SALES_PRICE_TOO_HIGH", "SALES_PRICE_TOO_LOW", "SHIPPING_INVALID", "SHIPPING_HEIGHT_INVALID", "SHIPPING_WEIGHT_INVALID", "SHIPPING_WIDTH_INVALID", "SIZE_SYSTEM_INVALID", "SIZE_TYPE_INVALID", "SIZE_TYPE_NORMALIZED", "TAX_INVALID", "TITLE_LENGTH_TOO_LONG", "TITLE_MISSING", "TOO_MANY_ADDITIONAL_IMAGE_LINKS", "UTM_SOURCE_AUTO_CORRECTED", "WEIGHT_UNIT_INVALID", ] # noqa: E501 + value (str):, must be one of ["AD_LINK_FORMAT_WARNING", "AD_LINK_SAME_AS_LINK", "ADDITIONAL_IMAGE_LINK_LENGTH_TOO_LONG", "ADDITIONAL_IMAGE_LINK_WARNING", "ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "ADWORDS_FORMAT_WARNING", "ADWORDS_SAME_AS_LINK", "AGE_GROUP_INVALID", "ANDROID_DEEP_LINK_INVALID", "AVAILABILITY_DATE_INVALID", "AVAILABILITY_INVALID", "BLOCKLISTED_IMAGE_SIGNATURE", "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", "CUSTOM_LABEL_LENGTH_TOO_LONG", "DESCRIPTION_LENGTH_TOO_LONG", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "EXPIRATION_DATE_INVALID", "GENDER_INVALID", "GTIN_INVALID", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "IMAGE_LINK_WARNING", "INVALID_DOMAIN", "IOS_DEEP_LINK_INVALID", "IS_BUNDLE_INVALID", "ITEM_ADDITIONAL_IMAGE_DOWNLOAD_FAILURE", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_FORMAT_WARNING", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "MIN_AD_PRICE_INVALID", "MPN_INVALID", "MULTIPACK_INVALID", "OPTIONAL_CONDITION_INVALID", "OPTIONAL_CONDITION_MISSING", "OPTIONAL_PRODUCT_CATEGORY_INVALID", "OPTIONAL_PRODUCT_CATEGORY_MISSING", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_CATEGORY_DEPTH_WARNING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "PRODUCT_TYPE_LENGTH_TOO_LONG", "SALE_DATE_INVALID", "SALES_PRICE_INVALID", "SALES_PRICE_TOO_HIGH", "SALES_PRICE_TOO_LOW", "SHIPPING_INVALID", "SHIPPING_HEIGHT_INVALID", "SHIPPING_WEIGHT_INVALID", "SHIPPING_WIDTH_INVALID", "SIZE_SYSTEM_INVALID", "SIZE_TYPE_INVALID", "TAX_INVALID", "TITLE_LENGTH_TOO_LONG", "TITLE_MISSING", "TOO_MANY_ADDITIONAL_IMAGE_LINKS", "UTM_SOURCE_AUTO_CORRECTED", "WEIGHT_UNIT_INVALID", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -266,10 +261,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["AD_LINK_FORMAT_WARNING", "AD_LINK_SAME_AS_LINK", "ADDITIONAL_IMAGE_LINK_LENGTH_TOO_LONG", "ADDITIONAL_IMAGE_LINK_WARNING", "ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "ADWORDS_FORMAT_WARNING", "ADWORDS_SAME_AS_LINK", "AGE_GROUP_INVALID", "AGE_GROUP_NORMALIZED", "ANDROID_DEEP_LINK_INVALID", "AVAILABILITY_DATE_INVALID", "AVAILABILITY_INVALID", "AVAILABILITY_NORMALIZED", "BLOCKLISTED_IMAGE_SIGNATURE", "CONDITION_NORMALIZED", "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", "CUSTOM_LABEL_LENGTH_TOO_LONG", "DESCRIPTION_LENGTH_TOO_LONG", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "EXPIRATION_DATE_INVALID", "GENDER_INVALID", "GENDER_NORMALIZED", "GTIN_INVALID", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "IMAGE_LINK_WARNING", "INVALID_DOMAIN", "IOS_DEEP_LINK_INVALID", "IS_BUNDLE_INVALID", "ITEM_ADDITIONAL_IMAGE_DOWNLOAD_FAILURE", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_FORMAT_WARNING", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "MIN_AD_PRICE_INVALID", "MPN_INVALID", "MULTIPACK_INVALID", "OPTIONAL_CONDITION_INVALID", "OPTIONAL_CONDITION_MISSING", "OPTIONAL_PRODUCT_CATEGORY_INVALID", "OPTIONAL_PRODUCT_CATEGORY_MISSING", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_CATEGORY_DEPTH_WARNING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "PRODUCT_TYPE_LENGTH_TOO_LONG", "SALE_DATE_INVALID", "SALES_PRICE_INVALID", "SALES_PRICE_TOO_HIGH", "SALES_PRICE_TOO_LOW", "SHIPPING_INVALID", "SHIPPING_HEIGHT_INVALID", "SHIPPING_WEIGHT_INVALID", "SHIPPING_WIDTH_INVALID", "SIZE_SYSTEM_INVALID", "SIZE_TYPE_INVALID", "SIZE_TYPE_NORMALIZED", "TAX_INVALID", "TITLE_LENGTH_TOO_LONG", "TITLE_MISSING", "TOO_MANY_ADDITIONAL_IMAGE_LINKS", "UTM_SOURCE_AUTO_CORRECTED", "WEIGHT_UNIT_INVALID", ] # noqa: E501 + args[0] (str):, must be one of ["AD_LINK_FORMAT_WARNING", "AD_LINK_SAME_AS_LINK", "ADDITIONAL_IMAGE_LINK_LENGTH_TOO_LONG", "ADDITIONAL_IMAGE_LINK_WARNING", "ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "ADWORDS_FORMAT_WARNING", "ADWORDS_SAME_AS_LINK", "AGE_GROUP_INVALID", "ANDROID_DEEP_LINK_INVALID", "AVAILABILITY_DATE_INVALID", "AVAILABILITY_INVALID", "BLOCKLISTED_IMAGE_SIGNATURE", "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", "CUSTOM_LABEL_LENGTH_TOO_LONG", "DESCRIPTION_LENGTH_TOO_LONG", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "EXPIRATION_DATE_INVALID", "GENDER_INVALID", "GTIN_INVALID", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "IMAGE_LINK_WARNING", "INVALID_DOMAIN", "IOS_DEEP_LINK_INVALID", "IS_BUNDLE_INVALID", "ITEM_ADDITIONAL_IMAGE_DOWNLOAD_FAILURE", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_FORMAT_WARNING", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "MIN_AD_PRICE_INVALID", "MPN_INVALID", "MULTIPACK_INVALID", "OPTIONAL_CONDITION_INVALID", "OPTIONAL_CONDITION_MISSING", "OPTIONAL_PRODUCT_CATEGORY_INVALID", "OPTIONAL_PRODUCT_CATEGORY_MISSING", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_CATEGORY_DEPTH_WARNING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "PRODUCT_TYPE_LENGTH_TOO_LONG", "SALE_DATE_INVALID", "SALES_PRICE_INVALID", "SALES_PRICE_TOO_HIGH", "SALES_PRICE_TOO_LOW", "SHIPPING_INVALID", "SHIPPING_HEIGHT_INVALID", "SHIPPING_WEIGHT_INVALID", "SHIPPING_WIDTH_INVALID", "SIZE_SYSTEM_INVALID", "SIZE_TYPE_INVALID", "TAX_INVALID", "TITLE_LENGTH_TOO_LONG", "TITLE_MISSING", "TOO_MANY_ADDITIONAL_IMAGE_LINKS", "UTM_SOURCE_AUTO_CORRECTED", "WEIGHT_UNIT_INVALID", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["AD_LINK_FORMAT_WARNING", "AD_LINK_SAME_AS_LINK", "ADDITIONAL_IMAGE_LINK_LENGTH_TOO_LONG", "ADDITIONAL_IMAGE_LINK_WARNING", "ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "ADWORDS_FORMAT_WARNING", "ADWORDS_SAME_AS_LINK", "AGE_GROUP_INVALID", "AGE_GROUP_NORMALIZED", "ANDROID_DEEP_LINK_INVALID", "AVAILABILITY_DATE_INVALID", "AVAILABILITY_INVALID", "AVAILABILITY_NORMALIZED", "BLOCKLISTED_IMAGE_SIGNATURE", "CONDITION_NORMALIZED", "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", "CUSTOM_LABEL_LENGTH_TOO_LONG", "DESCRIPTION_LENGTH_TOO_LONG", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "EXPIRATION_DATE_INVALID", "GENDER_INVALID", "GENDER_NORMALIZED", "GTIN_INVALID", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "IMAGE_LINK_WARNING", "INVALID_DOMAIN", "IOS_DEEP_LINK_INVALID", "IS_BUNDLE_INVALID", "ITEM_ADDITIONAL_IMAGE_DOWNLOAD_FAILURE", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_FORMAT_WARNING", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "MIN_AD_PRICE_INVALID", "MPN_INVALID", "MULTIPACK_INVALID", "OPTIONAL_CONDITION_INVALID", "OPTIONAL_CONDITION_MISSING", "OPTIONAL_PRODUCT_CATEGORY_INVALID", "OPTIONAL_PRODUCT_CATEGORY_MISSING", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_CATEGORY_DEPTH_WARNING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "PRODUCT_TYPE_LENGTH_TOO_LONG", "SALE_DATE_INVALID", "SALES_PRICE_INVALID", "SALES_PRICE_TOO_HIGH", "SALES_PRICE_TOO_LOW", "SHIPPING_INVALID", "SHIPPING_HEIGHT_INVALID", "SHIPPING_WEIGHT_INVALID", "SHIPPING_WIDTH_INVALID", "SIZE_SYSTEM_INVALID", "SIZE_TYPE_INVALID", "SIZE_TYPE_NORMALIZED", "TAX_INVALID", "TITLE_LENGTH_TOO_LONG", "TITLE_MISSING", "TOO_MANY_ADDITIONAL_IMAGE_LINKS", "UTM_SOURCE_AUTO_CORRECTED", "WEIGHT_UNIT_INVALID", ] # noqa: E501 + value (str):, must be one of ["AD_LINK_FORMAT_WARNING", "AD_LINK_SAME_AS_LINK", "ADDITIONAL_IMAGE_LINK_LENGTH_TOO_LONG", "ADDITIONAL_IMAGE_LINK_WARNING", "ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "ADWORDS_FORMAT_WARNING", "ADWORDS_SAME_AS_LINK", "AGE_GROUP_INVALID", "ANDROID_DEEP_LINK_INVALID", "AVAILABILITY_DATE_INVALID", "AVAILABILITY_INVALID", "BLOCKLISTED_IMAGE_SIGNATURE", "COUNTRY_DOES_NOT_MAP_TO_CURRENCY", "CUSTOM_LABEL_LENGTH_TOO_LONG", "DESCRIPTION_LENGTH_TOO_LONG", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "EXPIRATION_DATE_INVALID", "GENDER_INVALID", "GTIN_INVALID", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "IMAGE_LINK_WARNING", "INVALID_DOMAIN", "IOS_DEEP_LINK_INVALID", "IS_BUNDLE_INVALID", "ITEM_ADDITIONAL_IMAGE_DOWNLOAD_FAILURE", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_FORMAT_WARNING", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "MIN_AD_PRICE_INVALID", "MPN_INVALID", "MULTIPACK_INVALID", "OPTIONAL_CONDITION_INVALID", "OPTIONAL_CONDITION_MISSING", "OPTIONAL_PRODUCT_CATEGORY_INVALID", "OPTIONAL_PRODUCT_CATEGORY_MISSING", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_CATEGORY_DEPTH_WARNING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "PRODUCT_TYPE_LENGTH_TOO_LONG", "SALE_DATE_INVALID", "SALES_PRICE_INVALID", "SALES_PRICE_TOO_HIGH", "SALES_PRICE_TOO_LOW", "SHIPPING_INVALID", "SHIPPING_HEIGHT_INVALID", "SHIPPING_WEIGHT_INVALID", "SHIPPING_WIDTH_INVALID", "SIZE_SYSTEM_INVALID", "SIZE_TYPE_INVALID", "TAX_INVALID", "TITLE_LENGTH_TOO_LONG", "TITLE_MISSING", "TOO_MANY_ADDITIONAL_IMAGE_LINKS", "UTM_SOURCE_AUTO_CORRECTED", "WEIGHT_UNIT_INVALID", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/catalogs_item_validation_issues.py b/openapi_generated/pinterest_client/model/catalogs_item_validation_issues.py index 6e54f61..6ec4c49 100644 --- a/openapi_generated/pinterest_client/model/catalogs_item_validation_issues.py +++ b/openapi_generated/pinterest_client/model/catalogs_item_validation_issues.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_item_validation_warnings.py b/openapi_generated/pinterest_client/model/catalogs_item_validation_warnings.py index 61f1ddd..a7c7630 100644 --- a/openapi_generated/pinterest_client/model/catalogs_item_validation_warnings.py +++ b/openapi_generated/pinterest_client/model/catalogs_item_validation_warnings.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -96,17 +96,13 @@ def openapi_types(): 'adwords_same_as_link': (CatalogsItemValidationDetails,), # noqa: E501 'age_group_invalid': (CatalogsItemValidationDetails,), # noqa: E501 'size_system_invalid': (CatalogsItemValidationDetails,), # noqa: E501 - 'age_group_normalized': (CatalogsItemValidationDetails,), # noqa: E501 'android_deep_link_invalid': (CatalogsItemValidationDetails,), # noqa: E501 'availability_date_invalid': (CatalogsItemValidationDetails,), # noqa: E501 - 'availability_normalized': (CatalogsItemValidationDetails,), # noqa: E501 - 'condition_normalized': (CatalogsItemValidationDetails,), # noqa: E501 'country_does_not_map_to_currency': (CatalogsItemValidationDetails,), # noqa: E501 'custom_label_length_too_long': (CatalogsItemValidationDetails,), # noqa: E501 'description_length_too_long': (CatalogsItemValidationDetails,), # noqa: E501 'expiration_date_invalid': (CatalogsItemValidationDetails,), # noqa: E501 'gender_invalid': (CatalogsItemValidationDetails,), # noqa: E501 - 'gender_normalized': (CatalogsItemValidationDetails,), # noqa: E501 'gtin_invalid': (CatalogsItemValidationDetails,), # noqa: E501 'image_link_warning': (CatalogsItemValidationDetails,), # noqa: E501 'ios_deep_link_invalid': (CatalogsItemValidationDetails,), # noqa: E501 @@ -131,7 +127,6 @@ def openapi_types(): 'shipping_weight_invalid': (CatalogsItemValidationDetails,), # noqa: E501 'shipping_width_invalid': (CatalogsItemValidationDetails,), # noqa: E501 'size_type_invalid': (CatalogsItemValidationDetails,), # noqa: E501 - 'size_type_normalized': (CatalogsItemValidationDetails,), # noqa: E501 'tax_invalid': (CatalogsItemValidationDetails,), # noqa: E501 'title_length_too_long': (CatalogsItemValidationDetails,), # noqa: E501 'too_many_additional_image_links': (CatalogsItemValidationDetails,), # noqa: E501 @@ -153,17 +148,13 @@ def discriminator(): 'adwords_same_as_link': 'ADWORDS_SAME_AS_LINK', # noqa: E501 'age_group_invalid': 'AGE_GROUP_INVALID', # noqa: E501 'size_system_invalid': 'SIZE_SYSTEM_INVALID', # noqa: E501 - 'age_group_normalized': 'AGE_GROUP_NORMALIZED', # noqa: E501 'android_deep_link_invalid': 'ANDROID_DEEP_LINK_INVALID', # noqa: E501 'availability_date_invalid': 'AVAILABILITY_DATE_INVALID', # noqa: E501 - 'availability_normalized': 'AVAILABILITY_NORMALIZED', # noqa: E501 - 'condition_normalized': 'CONDITION_NORMALIZED', # noqa: E501 'country_does_not_map_to_currency': 'COUNTRY_DOES_NOT_MAP_TO_CURRENCY', # noqa: E501 'custom_label_length_too_long': 'CUSTOM_LABEL_LENGTH_TOO_LONG', # noqa: E501 'description_length_too_long': 'DESCRIPTION_LENGTH_TOO_LONG', # noqa: E501 'expiration_date_invalid': 'EXPIRATION_DATE_INVALID', # noqa: E501 'gender_invalid': 'GENDER_INVALID', # noqa: E501 - 'gender_normalized': 'GENDER_NORMALIZED', # noqa: E501 'gtin_invalid': 'GTIN_INVALID', # noqa: E501 'image_link_warning': 'IMAGE_LINK_WARNING', # noqa: E501 'ios_deep_link_invalid': 'IOS_DEEP_LINK_INVALID', # noqa: E501 @@ -188,7 +179,6 @@ def discriminator(): 'shipping_weight_invalid': 'SHIPPING_WEIGHT_INVALID', # noqa: E501 'shipping_width_invalid': 'SHIPPING_WIDTH_INVALID', # noqa: E501 'size_type_invalid': 'SIZE_TYPE_INVALID', # noqa: E501 - 'size_type_normalized': 'SIZE_TYPE_NORMALIZED', # noqa: E501 'tax_invalid': 'TAX_INVALID', # noqa: E501 'title_length_too_long': 'TITLE_LENGTH_TOO_LONG', # noqa: E501 'too_many_additional_image_links': 'TOO_MANY_ADDITIONAL_IMAGE_LINKS', # noqa: E501 @@ -245,17 +235,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 adwords_same_as_link (CatalogsItemValidationDetails): [optional] # noqa: E501 age_group_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 size_system_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 - age_group_normalized (CatalogsItemValidationDetails): [optional] # noqa: E501 android_deep_link_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 availability_date_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 - availability_normalized (CatalogsItemValidationDetails): [optional] # noqa: E501 - condition_normalized (CatalogsItemValidationDetails): [optional] # noqa: E501 country_does_not_map_to_currency (CatalogsItemValidationDetails): [optional] # noqa: E501 custom_label_length_too_long (CatalogsItemValidationDetails): [optional] # noqa: E501 description_length_too_long (CatalogsItemValidationDetails): [optional] # noqa: E501 expiration_date_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 gender_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 - gender_normalized (CatalogsItemValidationDetails): [optional] # noqa: E501 gtin_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 image_link_warning (CatalogsItemValidationDetails): [optional] # noqa: E501 ios_deep_link_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 @@ -280,7 +266,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 shipping_weight_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 shipping_width_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 size_type_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 - size_type_normalized (CatalogsItemValidationDetails): [optional] # noqa: E501 tax_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 title_length_too_long (CatalogsItemValidationDetails): [optional] # noqa: E501 too_many_additional_image_links (CatalogsItemValidationDetails): [optional] # noqa: E501 @@ -375,17 +360,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 adwords_same_as_link (CatalogsItemValidationDetails): [optional] # noqa: E501 age_group_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 size_system_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 - age_group_normalized (CatalogsItemValidationDetails): [optional] # noqa: E501 android_deep_link_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 availability_date_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 - availability_normalized (CatalogsItemValidationDetails): [optional] # noqa: E501 - condition_normalized (CatalogsItemValidationDetails): [optional] # noqa: E501 country_does_not_map_to_currency (CatalogsItemValidationDetails): [optional] # noqa: E501 custom_label_length_too_long (CatalogsItemValidationDetails): [optional] # noqa: E501 description_length_too_long (CatalogsItemValidationDetails): [optional] # noqa: E501 expiration_date_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 gender_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 - gender_normalized (CatalogsItemValidationDetails): [optional] # noqa: E501 gtin_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 image_link_warning (CatalogsItemValidationDetails): [optional] # noqa: E501 ios_deep_link_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 @@ -410,7 +391,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 shipping_weight_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 shipping_width_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 size_type_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 - size_type_normalized (CatalogsItemValidationDetails): [optional] # noqa: E501 tax_invalid (CatalogsItemValidationDetails): [optional] # noqa: E501 title_length_too_long (CatalogsItemValidationDetails): [optional] # noqa: E501 too_many_additional_image_links (CatalogsItemValidationDetails): [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/catalogs_items.py b/openapi_generated/pinterest_client/model/catalogs_items.py index 328fa41..cfd9dac 100644 --- a/openapi_generated/pinterest_client/model/catalogs_items.py +++ b/openapi_generated/pinterest_client/model/catalogs_items.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_items_batch.py b/openapi_generated/pinterest_client/model/catalogs_items_batch.py index 7e46172..ce3fc87 100644 --- a/openapi_generated/pinterest_client/model/catalogs_items_batch.py +++ b/openapi_generated/pinterest_client/model/catalogs_items_batch.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -32,12 +32,20 @@ def lazy_import(): from openapi_generated.pinterest_client.model.batch_operation_status import BatchOperationStatus - from openapi_generated.pinterest_client.model.item_processing_record import ItemProcessingRecord + from openapi_generated.pinterest_client.model.catalogs_creative_assets_items_batch import CatalogsCreativeAssetsItemsBatch + from openapi_generated.pinterest_client.model.catalogs_hotel_items_batch import CatalogsHotelItemsBatch + from openapi_generated.pinterest_client.model.catalogs_retail_items_batch import CatalogsRetailItemsBatch + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.creative_assets_processing_record import CreativeAssetsProcessingRecord globals()['BatchOperationStatus'] = BatchOperationStatus - globals()['ItemProcessingRecord'] = ItemProcessingRecord + globals()['CatalogsCreativeAssetsItemsBatch'] = CatalogsCreativeAssetsItemsBatch + globals()['CatalogsHotelItemsBatch'] = CatalogsHotelItemsBatch + globals()['CatalogsRetailItemsBatch'] = CatalogsRetailItemsBatch + globals()['CatalogsType'] = CatalogsType + globals()['CreativeAssetsProcessingRecord'] = CreativeAssetsProcessingRecord -class CatalogsItemsBatch(ModelNormal): +class CatalogsItemsBatch(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -90,24 +98,36 @@ def openapi_types(): """ lazy_import() return { - 'items': ([ItemProcessingRecord],), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 'batch_id': (str,), # noqa: E501 'created_time': (datetime,), # noqa: E501 'completed_time': (datetime, none_type,), # noqa: E501 'status': (BatchOperationStatus,), # noqa: E501 + 'items': ([CreativeAssetsProcessingRecord],), # noqa: E501 } @cached_property def discriminator(): - return None - + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsItemsBatch, + 'CatalogsCreativeAssetsItemsBatch': CatalogsCreativeAssetsItemsBatch, + 'CatalogsHotelItemsBatch': CatalogsHotelItemsBatch, + 'CatalogsRetailItemsBatch': CatalogsRetailItemsBatch, + 'HOTEL': CatalogsHotelItemsBatch, + 'RETAIL': CatalogsRetailItemsBatch, + } + if not val: + return None + return {'catalog_type': val} attribute_map = { - 'items': 'items', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 'batch_id': 'batch_id', # noqa: E501 'created_time': 'created_time', # noqa: E501 'completed_time': 'completed_time', # noqa: E501 'status': 'status', # noqa: E501 + 'items': 'items', # noqa: E501 } read_only_vars = { @@ -115,14 +135,13 @@ def discriminator(): 'completed_time', # noqa: E501 } - _composed_schemas = {} - @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """CatalogsItemsBatch - a model defined in OpenAPI Keyword Args: + catalog_type (CatalogsType): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -153,11 +172,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - items ([ItemProcessingRecord]): Array with the catalogs items processing records part of the catalogs items batch. [optional] # noqa: E501 batch_id (str): Id of the catalogs items batch. [optional] # noqa: E501 - created_time (datetime): Time of the batch creation: YYYY-MM-DD'T'hh:mm:ssTZD. [optional] # noqa: E501 - completed_time (datetime, none_type): Time of the batch completion: YYYY-MM-DD'T'hh:mm:ssTZD. [optional] # noqa: E501 + created_time (datetime): Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + completed_time (datetime, none_type): Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 status (BatchOperationStatus): [optional] # noqa: E501 + items ([CreativeAssetsProcessingRecord]): Array with the catalogs items processing records part of the catalogs items batch. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -185,14 +204,29 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + self._additional_properties_model_instances: # discard variable. continue setattr(self, var_name, var_value) + return self required_properties = set([ @@ -202,6 +236,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 '_path_to_item', '_configuration', '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', ]) @convert_js_args_to_python_args @@ -209,6 +246,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 """CatalogsItemsBatch - a model defined in OpenAPI Keyword Args: + catalog_type (CatalogsType): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -239,11 +277,11 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - items ([ItemProcessingRecord]): Array with the catalogs items processing records part of the catalogs items batch. [optional] # noqa: E501 batch_id (str): Id of the catalogs items batch. [optional] # noqa: E501 - created_time (datetime): Time of the batch creation: YYYY-MM-DD'T'hh:mm:ssTZD. [optional] # noqa: E501 - completed_time (datetime, none_type): Time of the batch completion: YYYY-MM-DD'T'hh:mm:ssTZD. [optional] # noqa: E501 + created_time (datetime): Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + completed_time (datetime, none_type): Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 status (BatchOperationStatus): [optional] # noqa: E501 + items ([CreativeAssetsProcessingRecord]): Array with the catalogs items processing records part of the catalogs items batch. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -269,14 +307,51 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + self._additional_properties_model_instances: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsItemsBatch, + CatalogsHotelItemsBatch, + CatalogsRetailItemsBatch, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_items_batch_request.py b/openapi_generated/pinterest_client/model/catalogs_items_batch_request.py index e13bf6f..2d4ca4c 100644 --- a/openapi_generated/pinterest_client/model/catalogs_items_batch_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_items_batch_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -36,17 +36,17 @@ def lazy_import(): from openapi_generated.pinterest_client.model.catalogs_items_delete_batch_request import CatalogsItemsDeleteBatchRequest from openapi_generated.pinterest_client.model.catalogs_items_delete_discontinued_batch_request import CatalogsItemsDeleteDiscontinuedBatchRequest from openapi_generated.pinterest_client.model.catalogs_items_update_batch_request import CatalogsItemsUpdateBatchRequest + from openapi_generated.pinterest_client.model.catalogs_items_upsert_batch_request import CatalogsItemsUpsertBatchRequest from openapi_generated.pinterest_client.model.country import Country from openapi_generated.pinterest_client.model.item_delete_batch_record import ItemDeleteBatchRecord - from openapi_generated.pinterest_client.model.language import Language globals()['BatchOperation'] = BatchOperation globals()['CatalogsItemsCreateBatchRequest'] = CatalogsItemsCreateBatchRequest globals()['CatalogsItemsDeleteBatchRequest'] = CatalogsItemsDeleteBatchRequest globals()['CatalogsItemsDeleteDiscontinuedBatchRequest'] = CatalogsItemsDeleteDiscontinuedBatchRequest globals()['CatalogsItemsUpdateBatchRequest'] = CatalogsItemsUpdateBatchRequest + globals()['CatalogsItemsUpsertBatchRequest'] = CatalogsItemsUpsertBatchRequest globals()['Country'] = Country globals()['ItemDeleteBatchRecord'] = ItemDeleteBatchRecord - globals()['Language'] = Language class CatalogsItemsBatchRequest(ModelComposed): @@ -104,7 +104,7 @@ def openapi_types(): return { 'operation': (BatchOperation,), # noqa: E501 'country': (Country,), # noqa: E501 - 'language': (Language,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'items': ([ItemDeleteBatchRecord],), # noqa: E501 } @@ -117,9 +117,11 @@ def discriminator(): 'CatalogsItemsDeleteBatchRequest': CatalogsItemsDeleteBatchRequest, 'CatalogsItemsDeleteDiscontinuedBatchRequest': CatalogsItemsDeleteDiscontinuedBatchRequest, 'CatalogsItemsUpdateBatchRequest': CatalogsItemsUpdateBatchRequest, + 'CatalogsItemsUpsertBatchRequest': CatalogsItemsUpsertBatchRequest, 'DELETE': CatalogsItemsDeleteBatchRequest, 'DELETE_DISCONTINUED': CatalogsItemsDeleteDiscontinuedBatchRequest, 'UPDATE': CatalogsItemsUpdateBatchRequest, + 'UPSERT': CatalogsItemsUpsertBatchRequest, } if not val: return None @@ -173,7 +175,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) country (Country): [optional] # noqa: E501 - language (Language): [optional] # noqa: E501 + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values.. [optional] # noqa: E501 items ([ItemDeleteBatchRecord]): Array with catalogs items. [optional] # noqa: E501 """ @@ -276,7 +278,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) country (Country): [optional] # noqa: E501 - language (Language): [optional] # noqa: E501 + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values.. [optional] # noqa: E501 items ([ItemDeleteBatchRecord]): Array with catalogs items. [optional] # noqa: E501 """ @@ -350,5 +352,6 @@ def _composed_schemas(): CatalogsItemsDeleteBatchRequest, CatalogsItemsDeleteDiscontinuedBatchRequest, CatalogsItemsUpdateBatchRequest, + CatalogsItemsUpsertBatchRequest, ], } diff --git a/openapi_generated/pinterest_client/model/catalogs_items_create_batch_request.py b/openapi_generated/pinterest_client/model/catalogs_items_create_batch_request.py index 710baa2..4ba0289 100644 --- a/openapi_generated/pinterest_client/model/catalogs_items_create_batch_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_items_create_batch_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -34,11 +34,9 @@ def lazy_import(): from openapi_generated.pinterest_client.model.batch_operation import BatchOperation from openapi_generated.pinterest_client.model.country import Country from openapi_generated.pinterest_client.model.item_create_batch_record import ItemCreateBatchRecord - from openapi_generated.pinterest_client.model.language import Language globals()['BatchOperation'] = BatchOperation globals()['Country'] = Country globals()['ItemCreateBatchRecord'] = ItemCreateBatchRecord - globals()['Language'] = Language class CatalogsItemsCreateBatchRequest(ModelNormal): @@ -75,14 +73,7 @@ class CatalogsItemsCreateBatchRequest(ModelNormal): }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -99,7 +90,7 @@ def openapi_types(): lazy_import() return { 'country': (Country,), # noqa: E501 - 'language': (Language,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'operation': (BatchOperation,), # noqa: E501 'items': ([ItemCreateBatchRecord],), # noqa: E501 } @@ -128,7 +119,7 @@ def _from_openapi_data(cls, country, language, operation, items, *args, **kwargs Args: country (Country): - language (Language): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. operation (BatchOperation): items ([ItemCreateBatchRecord]): Array with catalogs items @@ -219,7 +210,7 @@ def __init__(self, country, language, operation, items, *args, **kwargs): # noq Args: country (Country): - language (Language): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. operation (BatchOperation): items ([ItemCreateBatchRecord]): Array with catalogs items diff --git a/openapi_generated/pinterest_client/model/catalogs_items_delete_batch_request.py b/openapi_generated/pinterest_client/model/catalogs_items_delete_batch_request.py index af9dae0..fa11f90 100644 --- a/openapi_generated/pinterest_client/model/catalogs_items_delete_batch_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_items_delete_batch_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -34,11 +34,9 @@ def lazy_import(): from openapi_generated.pinterest_client.model.batch_operation import BatchOperation from openapi_generated.pinterest_client.model.country import Country from openapi_generated.pinterest_client.model.item_delete_batch_record import ItemDeleteBatchRecord - from openapi_generated.pinterest_client.model.language import Language globals()['BatchOperation'] = BatchOperation globals()['Country'] = Country globals()['ItemDeleteBatchRecord'] = ItemDeleteBatchRecord - globals()['Language'] = Language class CatalogsItemsDeleteBatchRequest(ModelNormal): @@ -71,14 +69,7 @@ class CatalogsItemsDeleteBatchRequest(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -95,7 +86,7 @@ def openapi_types(): lazy_import() return { 'country': (Country,), # noqa: E501 - 'language': (Language,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'operation': (BatchOperation,), # noqa: E501 'items': ([ItemDeleteBatchRecord],), # noqa: E501 } @@ -124,7 +115,7 @@ def _from_openapi_data(cls, country, language, operation, items, *args, **kwargs Args: country (Country): - language (Language): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. operation (BatchOperation): items ([ItemDeleteBatchRecord]): Array with catalogs items @@ -215,7 +206,7 @@ def __init__(self, country, language, operation, items, *args, **kwargs): # noq Args: country (Country): - language (Language): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. operation (BatchOperation): items ([ItemDeleteBatchRecord]): Array with catalogs items diff --git a/openapi_generated/pinterest_client/model/catalogs_items_delete_discontinued_batch_request.py b/openapi_generated/pinterest_client/model/catalogs_items_delete_discontinued_batch_request.py index 68fe441..f5718b0 100644 --- a/openapi_generated/pinterest_client/model/catalogs_items_delete_discontinued_batch_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_items_delete_discontinued_batch_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -34,11 +34,9 @@ def lazy_import(): from openapi_generated.pinterest_client.model.batch_operation import BatchOperation from openapi_generated.pinterest_client.model.country import Country from openapi_generated.pinterest_client.model.item_delete_discontinued_batch_record import ItemDeleteDiscontinuedBatchRecord - from openapi_generated.pinterest_client.model.language import Language globals()['BatchOperation'] = BatchOperation globals()['Country'] = Country globals()['ItemDeleteDiscontinuedBatchRecord'] = ItemDeleteDiscontinuedBatchRecord - globals()['Language'] = Language class CatalogsItemsDeleteDiscontinuedBatchRequest(ModelNormal): @@ -71,14 +69,7 @@ class CatalogsItemsDeleteDiscontinuedBatchRequest(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -95,7 +86,7 @@ def openapi_types(): lazy_import() return { 'country': (Country,), # noqa: E501 - 'language': (Language,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'operation': (BatchOperation,), # noqa: E501 'items': ([ItemDeleteDiscontinuedBatchRecord],), # noqa: E501 } @@ -124,7 +115,7 @@ def _from_openapi_data(cls, country, language, operation, items, *args, **kwargs Args: country (Country): - language (Language): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. operation (BatchOperation): items ([ItemDeleteDiscontinuedBatchRecord]): Array with catalogs items @@ -215,7 +206,7 @@ def __init__(self, country, language, operation, items, *args, **kwargs): # noq Args: country (Country): - language (Language): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. operation (BatchOperation): items ([ItemDeleteDiscontinuedBatchRecord]): Array with catalogs items diff --git a/openapi_generated/pinterest_client/model/catalogs_items_filters.py b/openapi_generated/pinterest_client/model/catalogs_items_filters.py new file mode 100644 index 0000000..b999f98 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_items_filters.py @@ -0,0 +1,364 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_items_filter import CatalogsCreativeAssetsItemsFilter + from openapi_generated.pinterest_client.model.catalogs_hotel_items_filter import CatalogsHotelItemsFilter + from openapi_generated.pinterest_client.model.catalogs_retail_items_filter import CatalogsRetailItemsFilter + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + globals()['CatalogsCreativeAssetsItemsFilter'] = CatalogsCreativeAssetsItemsFilter + globals()['CatalogsHotelItemsFilter'] = CatalogsHotelItemsFilter + globals()['CatalogsRetailItemsFilter'] = CatalogsRetailItemsFilter + globals()['CatalogsType'] = CatalogsType + + +class CatalogsItemsFilters(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('item_ids',): { + 'max_items': 100, + 'min_items': 1, + }, + ('hotel_ids',): { + 'max_items': 100, + 'min_items': 1, + }, + ('creative_assets_ids',): { + 'max_items': 100, + 'min_items': 1, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'item_ids': ([str],), # noqa: E501 + 'hotel_ids': ([str],), # noqa: E501 + 'creative_assets_ids': ([str],), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsItemsFilter, + 'CatalogsCreativeAssetsItemsFilter': CatalogsCreativeAssetsItemsFilter, + 'CatalogsHotelItemsFilter': CatalogsHotelItemsFilter, + 'CatalogsRetailItemsFilter': CatalogsRetailItemsFilter, + 'HOTEL': CatalogsHotelItemsFilter, + 'RETAIL': CatalogsRetailItemsFilter, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'item_ids': 'item_ids', # noqa: E501 + 'hotel_ids': 'hotel_ids', # noqa: E501 + 'creative_assets_ids': 'creative_assets_ids', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsItemsFilters - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + item_ids ([str]): + hotel_ids ([str]): + creative_assets_ids ([str]): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsItemsFilters - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + item_ids ([str]): + hotel_ids ([str]): + creative_assets_ids ([str]): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsItemsFilter, + CatalogsHotelItemsFilter, + CatalogsRetailItemsFilter, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_items_post_filters.py b/openapi_generated/pinterest_client/model/catalogs_items_post_filters.py new file mode 100644 index 0000000..f59db1d --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_items_post_filters.py @@ -0,0 +1,364 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_items_post_filter import CatalogsCreativeAssetsItemsPostFilter + from openapi_generated.pinterest_client.model.catalogs_hotel_items_post_filter import CatalogsHotelItemsPostFilter + from openapi_generated.pinterest_client.model.catalogs_retail_items_post_filter import CatalogsRetailItemsPostFilter + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + globals()['CatalogsCreativeAssetsItemsPostFilter'] = CatalogsCreativeAssetsItemsPostFilter + globals()['CatalogsHotelItemsPostFilter'] = CatalogsHotelItemsPostFilter + globals()['CatalogsRetailItemsPostFilter'] = CatalogsRetailItemsPostFilter + globals()['CatalogsType'] = CatalogsType + + +class CatalogsItemsPostFilters(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('item_ids',): { + 'max_items': 1000, + 'min_items': 1, + }, + ('hotel_ids',): { + 'max_items': 1000, + 'min_items': 1, + }, + ('creative_assets_ids',): { + 'max_items': 1000, + 'min_items': 1, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'item_ids': ([str],), # noqa: E501 + 'hotel_ids': ([str],), # noqa: E501 + 'creative_assets_ids': ([str],), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsItemsPostFilter, + 'CatalogsCreativeAssetsItemsPostFilter': CatalogsCreativeAssetsItemsPostFilter, + 'CatalogsHotelItemsPostFilter': CatalogsHotelItemsPostFilter, + 'CatalogsRetailItemsPostFilter': CatalogsRetailItemsPostFilter, + 'HOTEL': CatalogsHotelItemsPostFilter, + 'RETAIL': CatalogsRetailItemsPostFilter, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'item_ids': 'item_ids', # noqa: E501 + 'hotel_ids': 'hotel_ids', # noqa: E501 + 'creative_assets_ids': 'creative_assets_ids', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsItemsPostFilters - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + item_ids ([str]): + hotel_ids ([str]): + creative_assets_ids ([str]): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsItemsPostFilters - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + item_ids ([str]): + hotel_ids ([str]): + creative_assets_ids ([str]): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsItemsPostFilter, + CatalogsHotelItemsPostFilter, + CatalogsRetailItemsPostFilter, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_items_request.py b/openapi_generated/pinterest_client/model/catalogs_items_request.py new file mode 100644 index 0000000..36188f1 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_items_request.py @@ -0,0 +1,275 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_items_post_filters import CatalogsItemsPostFilters + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsItemsPostFilters'] = CatalogsItemsPostFilters + globals()['Country'] = Country + + +class CatalogsItemsRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'country': (Country,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'filters': (CatalogsItemsPostFilters,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, country, language, filters, *args, **kwargs): # noqa: E501 + """CatalogsItemsRequest - a model defined in OpenAPI + + Args: + country (Country): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. + filters (CatalogsItemsPostFilters): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.country = country + self.language = language + self.filters = filters + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, country, language, filters, *args, **kwargs): # noqa: E501 + """CatalogsItemsRequest - a model defined in OpenAPI + + Args: + country (Country): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. + filters (CatalogsItemsPostFilters): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.country = country + self.language = language + self.filters = filters + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_items_update_batch_request.py b/openapi_generated/pinterest_client/model/catalogs_items_update_batch_request.py index 8ddcce6..31c8939 100644 --- a/openapi_generated/pinterest_client/model/catalogs_items_update_batch_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_items_update_batch_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -34,11 +34,9 @@ def lazy_import(): from openapi_generated.pinterest_client.model.batch_operation import BatchOperation from openapi_generated.pinterest_client.model.country import Country from openapi_generated.pinterest_client.model.item_update_batch_record import ItemUpdateBatchRecord - from openapi_generated.pinterest_client.model.language import Language globals()['BatchOperation'] = BatchOperation globals()['Country'] = Country globals()['ItemUpdateBatchRecord'] = ItemUpdateBatchRecord - globals()['Language'] = Language class CatalogsItemsUpdateBatchRequest(ModelNormal): @@ -75,14 +73,7 @@ class CatalogsItemsUpdateBatchRequest(ModelNormal): }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -99,7 +90,7 @@ def openapi_types(): lazy_import() return { 'country': (Country,), # noqa: E501 - 'language': (Language,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'operation': (BatchOperation,), # noqa: E501 'items': ([ItemUpdateBatchRecord],), # noqa: E501 } @@ -128,7 +119,7 @@ def _from_openapi_data(cls, country, language, operation, items, *args, **kwargs Args: country (Country): - language (Language): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. operation (BatchOperation): items ([ItemUpdateBatchRecord]): Array with catalogs items @@ -219,7 +210,7 @@ def __init__(self, country, language, operation, items, *args, **kwargs): # noq Args: country (Country): - language (Language): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. operation (BatchOperation): items ([ItemUpdateBatchRecord]): Array with catalogs items diff --git a/openapi_generated/pinterest_client/model/catalogs_items_upsert_batch_request.py b/openapi_generated/pinterest_client/model/catalogs_items_upsert_batch_request.py new file mode 100644 index 0000000..fce1981 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_items_upsert_batch_request.py @@ -0,0 +1,294 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.batch_operation import BatchOperation + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.item_upsert_batch_record import ItemUpsertBatchRecord + globals()['BatchOperation'] = BatchOperation + globals()['Country'] = Country + globals()['ItemUpsertBatchRecord'] = ItemUpsertBatchRecord + + +class CatalogsItemsUpsertBatchRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('items',): { + 'max_items': 1000, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'country': (Country,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'operation': (BatchOperation,), # noqa: E501 + 'items': ([ItemUpsertBatchRecord],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, country, language, operation, items, *args, **kwargs): # noqa: E501 + """CatalogsItemsUpsertBatchRequest - a model defined in OpenAPI + + Args: + country (Country): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. + operation (BatchOperation): + items ([ItemUpsertBatchRecord]): Array with catalogs items + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.country = country + self.language = language + self.operation = operation + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, country, language, operation, items, *args, **kwargs): # noqa: E501 + """CatalogsItemsUpsertBatchRequest - a model defined in OpenAPI + + Args: + country (Country): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. + operation (BatchOperation): + items ([ItemUpsertBatchRecord]): Array with catalogs items + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.country = country + self.language = language + self.operation = operation + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_list_products_by_feed_based_filter.py b/openapi_generated/pinterest_client/model/catalogs_list_products_by_feed_based_filter.py new file mode 100644 index 0000000..07a1e0d --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_list_products_by_feed_based_filter.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_product_group_filters import CatalogsProductGroupFilters + globals()['CatalogsProductGroupFilters'] = CatalogsProductGroupFilters + + +class CatalogsListProductsByFeedBasedFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('feed_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'feed_id': (str,), # noqa: E501 + 'filters': (CatalogsProductGroupFilters,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'feed_id': 'feed_id', # noqa: E501 + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, feed_id, filters, *args, **kwargs): # noqa: E501 + """CatalogsListProductsByFeedBasedFilter - a model defined in OpenAPI + + Args: + feed_id (str): Catalog Feed id pertaining to the catalog product group filter. + filters (CatalogsProductGroupFilters): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.feed_id = feed_id + self.filters = filters + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, feed_id, filters, *args, **kwargs): # noqa: E501 + """CatalogsListProductsByFeedBasedFilter - a model defined in OpenAPI + + Args: + feed_id (str): Catalog Feed id pertaining to the catalog product group filter. + filters (CatalogsProductGroupFilters): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.feed_id = feed_id + self.filters = filters + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_list_products_by_filter_request.py b/openapi_generated/pinterest_client/model/catalogs_list_products_by_filter_request.py index 54e2752..2bd226a 100644 --- a/openapi_generated/pinterest_client/model/catalogs_list_products_by_filter_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_list_products_by_filter_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,10 +31,18 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.catalogs_list_products_by_filter_request_one_of import CatalogsListProductsByFilterRequestOneOf + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters import CatalogsCreativeAssetsProductGroupFilters + from openapi_generated.pinterest_client.model.catalogs_list_products_by_feed_based_filter import CatalogsListProductsByFeedBasedFilter + from openapi_generated.pinterest_client.model.catalogs_locale import CatalogsLocale from openapi_generated.pinterest_client.model.catalogs_product_group_filters import CatalogsProductGroupFilters - globals()['CatalogsListProductsByFilterRequestOneOf'] = CatalogsListProductsByFilterRequestOneOf + from openapi_generated.pinterest_client.model.catalogs_verticals_list_products_by_catalog_based_filter_request import CatalogsVerticalsListProductsByCatalogBasedFilterRequest + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsCreativeAssetsProductGroupFilters'] = CatalogsCreativeAssetsProductGroupFilters + globals()['CatalogsListProductsByFeedBasedFilter'] = CatalogsListProductsByFeedBasedFilter + globals()['CatalogsLocale'] = CatalogsLocale globals()['CatalogsProductGroupFilters'] = CatalogsProductGroupFilters + globals()['CatalogsVerticalsListProductsByCatalogBasedFilterRequest'] = CatalogsVerticalsListProductsByCatalogBasedFilterRequest + globals()['Country'] = Country class CatalogsListProductsByFilterRequest(ModelComposed): @@ -62,6 +70,9 @@ class CatalogsListProductsByFilterRequest(ModelComposed): """ allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, } validations = { @@ -70,6 +81,11 @@ class CatalogsListProductsByFilterRequest(ModelComposed): 'pattern': r'^\d+$', # noqa: E501 }, }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, } @cached_property @@ -97,6 +113,10 @@ def openapi_types(): return { 'feed_id': (str,), # noqa: E501 'filters': (CatalogsProductGroupFilters,), # noqa: E501 + 'catalog_type': (str,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'locale': (CatalogsLocale,), # noqa: E501 } @cached_property @@ -107,6 +127,10 @@ def discriminator(): attribute_map = { 'feed_id': 'feed_id', # noqa: E501 'filters': 'filters', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'locale': 'locale', # noqa: E501 } read_only_vars = { @@ -150,6 +174,10 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) feed_id (str): Catalog Feed id pertaining to the catalog product group filter.. [optional] # noqa: E501 filters (CatalogsProductGroupFilters): [optional] # noqa: E501 + catalog_type (str): [optional] if omitted the server will use the default value of "CREATIVE_ASSETS" # noqa: E501 + catalog_id (str): Catalog id pertaining to the creative assets product group.. [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + locale (CatalogsLocale): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -251,6 +279,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) feed_id (str): Catalog Feed id pertaining to the catalog product group filter.. [optional] # noqa: E501 filters (CatalogsProductGroupFilters): [optional] # noqa: E501 + catalog_type (str): [optional] if omitted the server will use the default value of "CREATIVE_ASSETS" # noqa: E501 + catalog_id (str): Catalog id pertaining to the creative assets product group.. [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + locale (CatalogsLocale): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -319,6 +351,7 @@ def _composed_schemas(): ], 'oneOf': [ - CatalogsListProductsByFilterRequestOneOf, + CatalogsListProductsByFeedBasedFilter, + CatalogsVerticalsListProductsByCatalogBasedFilterRequest, ], } diff --git a/openapi_generated/pinterest_client/model/catalogs_list_products_by_filter_request_one_of.py b/openapi_generated/pinterest_client/model/catalogs_list_products_by_filter_request_one_of.py index 5210f68..a7eeb2d 100644 --- a/openapi_generated/pinterest_client/model/catalogs_list_products_by_filter_request_one_of.py +++ b/openapi_generated/pinterest_client/model/catalogs_list_products_by_filter_request_one_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.13.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_locale.py b/openapi_generated/pinterest_client/model/catalogs_locale.py index 18c6bf0..5fefb6e 100644 --- a/openapi_generated/pinterest_client/model/catalogs_locale.py +++ b/openapi_generated/pinterest_client/model/catalogs_locale.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product.py b/openapi_generated/pinterest_client/model/catalogs_product.py index a42d0c8..8ce81ff 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product.py +++ b/openapi_generated/pinterest_client/model/catalogs_product.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,13 +31,21 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.catalogs_product_metadata import CatalogsProductMetadata + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product import CatalogsCreativeAssetsProduct + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_metadata import CatalogsCreativeAssetsProductMetadata + from openapi_generated.pinterest_client.model.catalogs_hotel_product import CatalogsHotelProduct + from openapi_generated.pinterest_client.model.catalogs_retail_product import CatalogsRetailProduct + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType from openapi_generated.pinterest_client.model.pin import Pin - globals()['CatalogsProductMetadata'] = CatalogsProductMetadata + globals()['CatalogsCreativeAssetsProduct'] = CatalogsCreativeAssetsProduct + globals()['CatalogsCreativeAssetsProductMetadata'] = CatalogsCreativeAssetsProductMetadata + globals()['CatalogsHotelProduct'] = CatalogsHotelProduct + globals()['CatalogsRetailProduct'] = CatalogsRetailProduct + globals()['CatalogsType'] = CatalogsType globals()['Pin'] = Pin -class CatalogsProduct(ModelNormal): +class CatalogsProduct(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -90,16 +98,28 @@ def openapi_types(): """ lazy_import() return { - 'metadata': (CatalogsProductMetadata,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + 'metadata': (CatalogsCreativeAssetsProductMetadata,), # noqa: E501 'pin': (Pin,), # noqa: E501 } @cached_property def discriminator(): - return None - + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsProduct, + 'CatalogsCreativeAssetsProduct': CatalogsCreativeAssetsProduct, + 'CatalogsHotelProduct': CatalogsHotelProduct, + 'CatalogsRetailProduct': CatalogsRetailProduct, + 'HOTEL': CatalogsHotelProduct, + 'RETAIL': CatalogsRetailProduct, + } + if not val: + return None + return {'catalog_type': val} attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 'metadata': 'metadata', # noqa: E501 'pin': 'pin', # noqa: E501 } @@ -107,18 +127,15 @@ def discriminator(): read_only_vars = { } - _composed_schemas = {} - @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, metadata, pin, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """CatalogsProduct - a model defined in OpenAPI - Args: - metadata (CatalogsProductMetadata): - pin (Pin): - Keyword Args: + catalog_type (CatalogsType): + metadata (CatalogsCreativeAssetsProductMetadata): + pin (Pin): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -176,16 +193,29 @@ def _from_openapi_data(cls, metadata, pin, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.metadata = metadata - self.pin = pin + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + self._additional_properties_model_instances: # discard variable. continue setattr(self, var_name, var_value) + return self required_properties = set([ @@ -195,17 +225,19 @@ def _from_openapi_data(cls, metadata, pin, *args, **kwargs): # noqa: E501 '_path_to_item', '_configuration', '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', ]) @convert_js_args_to_python_args - def __init__(self, metadata, pin, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """CatalogsProduct - a model defined in OpenAPI - Args: - metadata (CatalogsProductMetadata): - pin (Pin): - Keyword Args: + catalog_type (CatalogsType): + metadata (CatalogsCreativeAssetsProductMetadata): + pin (Pin): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -261,16 +293,51 @@ def __init__(self, metadata, pin, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.metadata = metadata - self.pin = pin + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + self._additional_properties_model_instances: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsProduct, + CatalogsHotelProduct, + CatalogsRetailProduct, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_create_request.py b/openapi_generated/pinterest_client/model/catalogs_product_group_create_request.py index 1ab85c6..4a84daf 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_create_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_create_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -32,12 +32,10 @@ def lazy_import(): from openapi_generated.pinterest_client.model.catalogs_product_group_filters_request import CatalogsProductGroupFiltersRequest - from openapi_generated.pinterest_client.model.product_groups_create_request_feed_base_case import ProductGroupsCreateRequestFeedBaseCase globals()['CatalogsProductGroupFiltersRequest'] = CatalogsProductGroupFiltersRequest - globals()['ProductGroupsCreateRequestFeedBaseCase'] = ProductGroupsCreateRequestFeedBaseCase -class CatalogsProductGroupCreateRequest(ModelComposed): +class CatalogsProductGroupCreateRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -95,11 +93,11 @@ def openapi_types(): """ lazy_import() return { - 'description': (str, none_type,), # noqa: E501 - 'is_featured': (bool,), # noqa: E501 'name': (str,), # noqa: E501 'filters': (CatalogsProductGroupFiltersRequest,), # noqa: E501 'feed_id': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'is_featured': (bool,), # noqa: E501 } @cached_property @@ -108,21 +106,28 @@ def discriminator(): attribute_map = { - 'description': 'description', # noqa: E501 - 'is_featured': 'is_featured', # noqa: E501 'name': 'name', # noqa: E501 'filters': 'filters', # noqa: E501 'feed_id': 'feed_id', # noqa: E501 + 'description': 'description', # noqa: E501 + 'is_featured': 'is_featured', # noqa: E501 } read_only_vars = { } + _composed_schemas = {} + @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, name, filters, feed_id, *args, **kwargs): # noqa: E501 """CatalogsProductGroupCreateRequest - a model defined in OpenAPI + Args: + name (str): + filters (CatalogsProductGroupFiltersRequest): + feed_id (str): Catalog Feed id pertaining to the catalog product group. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -156,9 +161,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) description (str, none_type): [optional] # noqa: E501 is_featured (bool): boolean indicator of whether the product group is being featured or not. [optional] if omitted the server will use the default value of False # noqa: E501 - name (str): [optional] # noqa: E501 - filters (CatalogsProductGroupFiltersRequest): [optional] # noqa: E501 - feed_id (str): Catalog Feed id pertaining to the catalog product group.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -186,29 +188,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - + self.name = name + self.filters = filters + self.feed_id = feed_id for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ + if var_name not in self.attribute_map and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) - return self required_properties = set([ @@ -218,15 +208,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 '_path_to_item', '_configuration', '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, name, filters, feed_id, *args, **kwargs): # noqa: E501 """CatalogsProductGroupCreateRequest - a model defined in OpenAPI + Args: + name (str): + filters (CatalogsProductGroupFiltersRequest): + feed_id (str): Catalog Feed id pertaining to the catalog product group. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -260,9 +252,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) description (str, none_type): [optional] # noqa: E501 is_featured (bool): boolean indicator of whether the product group is being featured or not. [optional] if omitted the server will use the default value of False # noqa: E501 - name (str): [optional] # noqa: E501 - filters (CatalogsProductGroupFiltersRequest): [optional] # noqa: E501 - feed_id (str): Catalog Feed id pertaining to the catalog product group.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -288,49 +277,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - + self.name = name + self.filters = filters + self.feed_id = feed_id for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ + if var_name not in self.attribute_map and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - - ], - 'oneOf': [ - ProductGroupsCreateRequestFeedBaseCase, - ], - } diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_currency_criteria.py b/openapi_generated/pinterest_client/model/catalogs_product_group_currency_criteria.py index 400f673..5ea37eb 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_currency_criteria.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_currency_criteria.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_filter_keys.py b/openapi_generated/pinterest_client/model/catalogs_product_group_filter_keys.py index f9c2d9e..45bb251 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_filter_keys.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_filter_keys.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -35,6 +35,7 @@ def lazy_import(): from openapi_generated.pinterest_client.model.brand_filter import BrandFilter from openapi_generated.pinterest_client.model.catalogs_product_group_currency_criteria import CatalogsProductGroupCurrencyCriteria from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_gender_criteria import CatalogsProductGroupMultipleGenderCriteria + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_media_types_criteria import CatalogsProductGroupMultipleMediaTypesCriteria from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_string_criteria import CatalogsProductGroupMultipleStringCriteria from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_string_list_criteria import CatalogsProductGroupMultipleStringListCriteria from openapi_generated.pinterest_client.model.catalogs_product_group_pricing_criteria import CatalogsProductGroupPricingCriteria @@ -56,7 +57,9 @@ def lazy_import(): from openapi_generated.pinterest_client.model.item_group_id_filter import ItemGroupIdFilter from openapi_generated.pinterest_client.model.item_id_filter import ItemIdFilter from openapi_generated.pinterest_client.model.max_price_filter import MaxPriceFilter + from openapi_generated.pinterest_client.model.media_type_filter import MediaTypeFilter from openapi_generated.pinterest_client.model.min_price_filter import MinPriceFilter + from openapi_generated.pinterest_client.model.product_group_reference_filter import ProductGroupReferenceFilter from openapi_generated.pinterest_client.model.product_type0_filter import ProductType0Filter from openapi_generated.pinterest_client.model.product_type1_filter import ProductType1Filter from openapi_generated.pinterest_client.model.product_type2_filter import ProductType2Filter @@ -66,6 +69,7 @@ def lazy_import(): globals()['BrandFilter'] = BrandFilter globals()['CatalogsProductGroupCurrencyCriteria'] = CatalogsProductGroupCurrencyCriteria globals()['CatalogsProductGroupMultipleGenderCriteria'] = CatalogsProductGroupMultipleGenderCriteria + globals()['CatalogsProductGroupMultipleMediaTypesCriteria'] = CatalogsProductGroupMultipleMediaTypesCriteria globals()['CatalogsProductGroupMultipleStringCriteria'] = CatalogsProductGroupMultipleStringCriteria globals()['CatalogsProductGroupMultipleStringListCriteria'] = CatalogsProductGroupMultipleStringListCriteria globals()['CatalogsProductGroupPricingCriteria'] = CatalogsProductGroupPricingCriteria @@ -87,7 +91,9 @@ def lazy_import(): globals()['ItemGroupIdFilter'] = ItemGroupIdFilter globals()['ItemIdFilter'] = ItemIdFilter globals()['MaxPriceFilter'] = MaxPriceFilter + globals()['MediaTypeFilter'] = MediaTypeFilter globals()['MinPriceFilter'] = MinPriceFilter + globals()['ProductGroupReferenceFilter'] = ProductGroupReferenceFilter globals()['ProductType0Filter'] = ProductType0Filter globals()['ProductType1Filter'] = ProductType1Filter globals()['ProductType2Filter'] = ProductType2Filter @@ -162,6 +168,7 @@ def openapi_types(): 'custom_label_4': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 'item_group_id': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 'gender': (CatalogsProductGroupMultipleGenderCriteria,), # noqa: E501 + 'media_type': (CatalogsProductGroupMultipleMediaTypesCriteria,), # noqa: E501 'product_type_4': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 'product_type_3': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 'product_type_2': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 @@ -174,6 +181,7 @@ def openapi_types(): 'google_product_category_2': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 'google_product_category_1': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 'google_product_category_0': (CatalogsProductGroupMultipleStringListCriteria,), # noqa: E501 + 'product_group': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 } @cached_property @@ -196,6 +204,7 @@ def discriminator(): 'custom_label_4': 'CUSTOM_LABEL_4', # noqa: E501 'item_group_id': 'ITEM_GROUP_ID', # noqa: E501 'gender': 'GENDER', # noqa: E501 + 'media_type': 'MEDIA_TYPE', # noqa: E501 'product_type_4': 'PRODUCT_TYPE_4', # noqa: E501 'product_type_3': 'PRODUCT_TYPE_3', # noqa: E501 'product_type_2': 'PRODUCT_TYPE_2', # noqa: E501 @@ -208,6 +217,7 @@ def discriminator(): 'google_product_category_2': 'GOOGLE_PRODUCT_CATEGORY_2', # noqa: E501 'google_product_category_1': 'GOOGLE_PRODUCT_CATEGORY_1', # noqa: E501 'google_product_category_0': 'GOOGLE_PRODUCT_CATEGORY_0', # noqa: E501 + 'product_group': 'PRODUCT_GROUP', # noqa: E501 } read_only_vars = { @@ -263,6 +273,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 custom_label_4 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 item_group_id (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 gender (CatalogsProductGroupMultipleGenderCriteria): [optional] # noqa: E501 + media_type (CatalogsProductGroupMultipleMediaTypesCriteria): [optional] # noqa: E501 product_type_4 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 product_type_3 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 product_type_2 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 @@ -275,6 +286,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 google_product_category_2 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 google_product_category_1 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 google_product_category_0 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + product_group (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -388,6 +400,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 custom_label_4 (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 item_group_id (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 gender (CatalogsProductGroupMultipleGenderCriteria): [optional] # noqa: E501 + media_type (CatalogsProductGroupMultipleMediaTypesCriteria): [optional] # noqa: E501 product_type_4 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 product_type_3 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 product_type_2 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 @@ -400,6 +413,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 google_product_category_2 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 google_product_category_1 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 google_product_category_0 (CatalogsProductGroupMultipleStringListCriteria): [optional] # noqa: E501 + product_group (CatalogsProductGroupMultipleStringCriteria): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -483,7 +497,9 @@ def _composed_schemas(): ItemGroupIdFilter, ItemIdFilter, MaxPriceFilter, + MediaTypeFilter, MinPriceFilter, + ProductGroupReferenceFilter, ProductType0Filter, ProductType1Filter, ProductType2Filter, diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_filters.py b/openapi_generated/pinterest_client/model/catalogs_product_group_filters.py index 83be3ba..dd23f54 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_filters.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_filters.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_filters_all_of.py b/openapi_generated/pinterest_client/model/catalogs_product_group_filters_all_of.py index f4a89d7..c4bccc2 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_filters_all_of.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_filters_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_filters_any_of.py b/openapi_generated/pinterest_client/model/catalogs_product_group_filters_any_of.py index bde9dda..0c7a50b 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_filters_any_of.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_filters_any_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request.py b/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request.py index c380bb4..00ceed1 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request_any_of.py b/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request_any_of.py index 8d2b620..00d216f 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request_any_of.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request_any_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request_any_of1.py b/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request_any_of1.py index 2fafd68..e7c2f2f 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request_any_of1.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_filters_request_any_of1.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_countries_criteria.py b/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_countries_criteria.py new file mode 100644 index 0000000..6325c8e --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_countries_criteria.py @@ -0,0 +1,265 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.country import Country + globals()['Country'] = Country + + +class CatalogsProductGroupMultipleCountriesCriteria(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'values': ([Country],), # noqa: E501 + 'negated': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'values': 'values', # noqa: E501 + 'negated': 'negated', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, values, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupMultipleCountriesCriteria - a model defined in OpenAPI + + Args: + values ([Country]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + negated (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.values = values + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, values, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupMultipleCountriesCriteria - a model defined in OpenAPI + + Args: + values ([Country]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + negated (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.values = values + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_gender_criteria.py b/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_gender_criteria.py index 45b419e..65bdd63 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_gender_criteria.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_gender_criteria.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_media_types_criteria.py b/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_media_types_criteria.py new file mode 100644 index 0000000..a42362b --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_media_types_criteria.py @@ -0,0 +1,265 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.media_type import MediaType + globals()['MediaType'] = MediaType + + +class CatalogsProductGroupMultipleMediaTypesCriteria(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'values': ([MediaType],), # noqa: E501 + 'negated': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'values': 'values', # noqa: E501 + 'negated': 'negated', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, values, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupMultipleMediaTypesCriteria - a model defined in OpenAPI + + Args: + values ([MediaType]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + negated (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.values = values + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, values, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupMultipleMediaTypesCriteria - a model defined in OpenAPI + + Args: + values ([MediaType]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + negated (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.values = values + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_string_criteria.py b/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_string_criteria.py index b41f7f1..b979fb5 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_string_criteria.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_string_criteria.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_string_list_criteria.py b/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_string_list_criteria.py index fb5bea3..6d66398 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_string_list_criteria.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_multiple_string_list_criteria.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_pricing_criteria.py b/openapi_generated/pinterest_client/model/catalogs_product_group_pricing_criteria.py index 149e082..fbddb8b 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_pricing_criteria.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_pricing_criteria.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_pricing_currency_criteria.py b/openapi_generated/pinterest_client/model/catalogs_product_group_pricing_currency_criteria.py new file mode 100644 index 0000000..1bb0daa --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_pricing_currency_criteria.py @@ -0,0 +1,293 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.non_nullable_catalogs_currency import NonNullableCatalogsCurrency + globals()['NonNullableCatalogsCurrency'] = NonNullableCatalogsCurrency + + +class CatalogsProductGroupPricingCurrencyCriteria(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operator',): { + 'GREATER_THAN': "GREATER_THAN", + 'GREATER_THAN_OR_EQUALS': "GREATER_THAN_OR_EQUALS", + 'LESS_THAN': "LESS_THAN", + 'LESS_THAN_OR_EQUALS': "LESS_THAN_OR_EQUALS", + }, + } + + validations = { + ('value',): { + 'inclusive_minimum': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'operator': (str,), # noqa: E501 + 'value': (float,), # noqa: E501 + 'currency': (NonNullableCatalogsCurrency,), # noqa: E501 + 'negated': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'operator': 'operator', # noqa: E501 + 'value': 'value', # noqa: E501 + 'currency': 'currency', # noqa: E501 + 'negated': 'negated', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, operator, value, currency, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupPricingCurrencyCriteria - a model defined in OpenAPI + + Args: + operator (str): + value (float): + currency (NonNullableCatalogsCurrency): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + negated (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.operator = operator + self.value = value + self.currency = currency + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, operator, value, currency, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupPricingCurrencyCriteria - a model defined in OpenAPI + + Args: + operator (str): + value (float): + currency (NonNullableCatalogsCurrency): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + negated (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.operator = operator + self.value = value + self.currency = currency + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_product_counts.py b/openapi_generated/pinterest_client/model/catalogs_product_group_product_counts.py index 31ae261..e15e345 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_product_counts.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_product_counts.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.13.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_product_counts_vertical.py b/openapi_generated/pinterest_client/model/catalogs_product_group_product_counts_vertical.py new file mode 100644 index 0000000..494ac96 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_product_counts_vertical.py @@ -0,0 +1,366 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_product_counts import CatalogsCreativeAssetsProductGroupProductCounts + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_product_counts import CatalogsHotelProductGroupProductCounts + from openapi_generated.pinterest_client.model.catalogs_retail_product_group_product_counts import CatalogsRetailProductGroupProductCounts + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + globals()['CatalogsCreativeAssetsProductGroupProductCounts'] = CatalogsCreativeAssetsProductGroupProductCounts + globals()['CatalogsHotelProductGroupProductCounts'] = CatalogsHotelProductGroupProductCounts + globals()['CatalogsRetailProductGroupProductCounts'] = CatalogsRetailProductGroupProductCounts + globals()['CatalogsType'] = CatalogsType + + +class CatalogsProductGroupProductCountsVertical(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('in_stock',): { + 'inclusive_minimum': 0, + }, + ('out_of_stock',): { + 'inclusive_minimum': 0, + }, + ('preorder',): { + 'inclusive_minimum': 0, + }, + ('total',): { + 'inclusive_minimum': 0, + }, + ('videos',): { + 'inclusive_minimum': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'in_stock': (float,), # noqa: E501 + 'out_of_stock': (float,), # noqa: E501 + 'preorder': (float,), # noqa: E501 + 'total': (float,), # noqa: E501 + 'videos': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsProductGroupProductCounts, + 'CatalogsCreativeAssetsProductGroupProductCounts': CatalogsCreativeAssetsProductGroupProductCounts, + 'CatalogsHotelProductGroupProductCounts': CatalogsHotelProductGroupProductCounts, + 'CatalogsRetailProductGroupProductCounts': CatalogsRetailProductGroupProductCounts, + 'HOTEL': CatalogsHotelProductGroupProductCounts, + 'RETAIL': CatalogsRetailProductGroupProductCounts, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'in_stock': 'in_stock', # noqa: E501 + 'out_of_stock': 'out_of_stock', # noqa: E501 + 'preorder': 'preorder', # noqa: E501 + 'total': 'total', # noqa: E501 + 'videos': 'videos', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupProductCountsVertical - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + in_stock (float): + out_of_stock (float): + preorder (float): + total (float): + videos (float): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupProductCountsVertical - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + in_stock (float): + out_of_stock (float): + preorder (float): + total (float): + videos (float): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsProductGroupProductCounts, + CatalogsHotelProductGroupProductCounts, + CatalogsRetailProductGroupProductCounts, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_status.py b/openapi_generated/pinterest_client/model/catalogs_product_group_status.py index 0a573d6..20beeaa 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_status.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_type.py b/openapi_generated/pinterest_client/model/catalogs_product_group_type.py index 7a2e114..f309925 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_type.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_product_group_update_request.py b/openapi_generated/pinterest_client/model/catalogs_product_group_update_request.py index dcf505c..3eb5c98 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_group_update_request.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_update_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -65,14 +65,7 @@ class CatalogsProductGroupUpdateRequest(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/openapi_generated/pinterest_client/model/catalogs_product_metadata.py b/openapi_generated/pinterest_client/model/catalogs_product_metadata.py index b9ccd2d..408d35f 100644 --- a/openapi_generated/pinterest_client/model/catalogs_product_metadata.py +++ b/openapi_generated/pinterest_client/model/catalogs_product_metadata.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.13.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_report.py b/openapi_generated/pinterest_client/model/catalogs_report.py new file mode 100644 index 0000000..9ff502d --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_report.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsReport(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('report_status',): { + 'FINISHED': "FINISHED", + 'IN_PROGRESS': "IN_PROGRESS", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'report_status': (str,), # noqa: E501 + 'url': (str, none_type,), # noqa: E501 + 'size': (float, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'report_status': 'report_status', # noqa: E501 + 'url': 'url', # noqa: E501 + 'size': 'size', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsReport - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + report_status (str): [optional] # noqa: E501 + url (str, none_type): URL to download the report. [optional] # noqa: E501 + size (float, none_type): Size of the report in bytes. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsReport - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + report_status (str): [optional] # noqa: E501 + url (str, none_type): URL to download the report. [optional] # noqa: E501 + size (float, none_type): Size of the report in bytes. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_report_distribution_issue_filter.py b/openapi_generated/pinterest_client/model/catalogs_report_distribution_issue_filter.py new file mode 100644 index 0000000..d889b40 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_report_distribution_issue_filter.py @@ -0,0 +1,270 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsReportDistributionIssueFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('report_type',): { + 'DISTRIBUTION_ISSUES': "DISTRIBUTION_ISSUES", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'report_type': (str,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'report_type': 'report_type', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsReportDistributionIssueFilter - a model defined in OpenAPI + + Args: + + Keyword Args: + report_type (str): defaults to "DISTRIBUTION_ISSUES", must be one of ["DISTRIBUTION_ISSUES", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Unique identifier of a catalog. If not given, oldest catalog will be used. [optional] # noqa: E501 + """ + + report_type = kwargs.get('report_type', "DISTRIBUTION_ISSUES") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.report_type = report_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsReportDistributionIssueFilter - a model defined in OpenAPI + + Args: + + Keyword Args: + report_type (str): defaults to "DISTRIBUTION_ISSUES", must be one of ["DISTRIBUTION_ISSUES", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Unique identifier of a catalog. If not given, oldest catalog will be used. [optional] # noqa: E501 + """ + + report_type = kwargs.get('report_type', "DISTRIBUTION_ISSUES") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.report_type = report_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_report_distribution_stats.py b/openapi_generated/pinterest_client/model/catalogs_report_distribution_stats.py new file mode 100644 index 0000000..373c235 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_report_distribution_stats.py @@ -0,0 +1,292 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsReportDistributionStats(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('report_type',): { + 'DISTRIBUTION_ISSUES': "DISTRIBUTION_ISSUES", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'report_type': (str,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'code': (int,), # noqa: E501 + 'code_label': (str,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'occurrences': (int,), # noqa: E501 + 'ineligible_for_ads': (bool,), # noqa: E501 + 'ineligible_for_organic': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'report_type': 'report_type', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'code': 'code', # noqa: E501 + 'code_label': 'code_label', # noqa: E501 + 'message': 'message', # noqa: E501 + 'occurrences': 'occurrences', # noqa: E501 + 'ineligible_for_ads': 'ineligible_for_ads', # noqa: E501 + 'ineligible_for_organic': 'ineligible_for_organic', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsReportDistributionStats - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + report_type (str): [optional] if omitted the server will use the default value of "DISTRIBUTION_ISSUES" # noqa: E501 + catalog_id (str): ID of the catalog entity.. [optional] # noqa: E501 + code (int): The event code that a diagnostics aggregated number references. [optional] # noqa: E501 + code_label (str): A human-friendly label for the event code (e.g, 'SPAM'). [optional] # noqa: E501 + message (str): Title message describing the diagnostic issue. [optional] # noqa: E501 + occurrences (int): Number of occurrences of the issue. [optional] # noqa: E501 + ineligible_for_ads (bool): Indicates if issue makes items ineligible for ads distribution. [optional] # noqa: E501 + ineligible_for_organic (bool): Indicates if issue makes items ineligible for organic distribution. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsReportDistributionStats - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + report_type (str): [optional] if omitted the server will use the default value of "DISTRIBUTION_ISSUES" # noqa: E501 + catalog_id (str): ID of the catalog entity.. [optional] # noqa: E501 + code (int): The event code that a diagnostics aggregated number references. [optional] # noqa: E501 + code_label (str): A human-friendly label for the event code (e.g, 'SPAM'). [optional] # noqa: E501 + message (str): Title message describing the diagnostic issue. [optional] # noqa: E501 + occurrences (int): Number of occurrences of the issue. [optional] # noqa: E501 + ineligible_for_ads (bool): Indicates if issue makes items ineligible for ads distribution. [optional] # noqa: E501 + ineligible_for_organic (bool): Indicates if issue makes items ineligible for organic distribution. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_report_feed_ingestion_filter.py b/openapi_generated/pinterest_client/model/catalogs_report_feed_ingestion_filter.py new file mode 100644 index 0000000..1eea9cf --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_report_feed_ingestion_filter.py @@ -0,0 +1,281 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsReportFeedIngestionFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('report_type',): { + 'FEED_INGESTION_ISSUES': "FEED_INGESTION_ISSUES", + }, + } + + validations = { + ('feed_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('processing_result_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'report_type': (str,), # noqa: E501 + 'feed_id': (str,), # noqa: E501 + 'processing_result_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'report_type': 'report_type', # noqa: E501 + 'feed_id': 'feed_id', # noqa: E501 + 'processing_result_id': 'processing_result_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, feed_id, *args, **kwargs): # noqa: E501 + """CatalogsReportFeedIngestionFilter - a model defined in OpenAPI + + Args: + feed_id (str): ID of the feed entity. + + Keyword Args: + report_type (str): defaults to "FEED_INGESTION_ISSUES", must be one of ["FEED_INGESTION_ISSUES", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + processing_result_id (str): Unique identifier of a feed processing result. It can be acquired from the \"id\" field of the \"items\" array within the response of the [List processing results for a given feed](/docs/api/v5/#operation/feed_processing_results/list). If not provided, default to most recent completed processing result.. [optional] # noqa: E501 + """ + + report_type = kwargs.get('report_type', "FEED_INGESTION_ISSUES") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.report_type = report_type + self.feed_id = feed_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, feed_id, *args, **kwargs): # noqa: E501 + """CatalogsReportFeedIngestionFilter - a model defined in OpenAPI + + Args: + feed_id (str): ID of the feed entity. + + Keyword Args: + report_type (str): defaults to "FEED_INGESTION_ISSUES", must be one of ["FEED_INGESTION_ISSUES", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + processing_result_id (str): Unique identifier of a feed processing result. It can be acquired from the \"id\" field of the \"items\" array within the response of the [List processing results for a given feed](/docs/api/v5/#operation/feed_processing_results/list). If not provided, default to most recent completed processing result.. [optional] # noqa: E501 + """ + + report_type = kwargs.get('report_type', "FEED_INGESTION_ISSUES") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.report_type = report_type + self.feed_id = feed_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_report_feed_ingestion_stats.py b/openapi_generated/pinterest_client/model/catalogs_report_feed_ingestion_stats.py new file mode 100644 index 0000000..bc67b84 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_report_feed_ingestion_stats.py @@ -0,0 +1,292 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsReportFeedIngestionStats(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('report_type',): { + 'FEED_INGESTION_ISSUES': "FEED_INGESTION_ISSUES", + }, + ('severity',): { + 'WARN': "WARN", + 'ERROR': "ERROR", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'report_type': (str,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'code': (int,), # noqa: E501 + 'code_label': (str,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'occurrences': (int,), # noqa: E501 + 'severity': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'report_type': 'report_type', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'code': 'code', # noqa: E501 + 'code_label': 'code_label', # noqa: E501 + 'message': 'message', # noqa: E501 + 'occurrences': 'occurrences', # noqa: E501 + 'severity': 'severity', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsReportFeedIngestionStats - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + report_type (str): [optional] if omitted the server will use the default value of "FEED_INGESTION_ISSUES" # noqa: E501 + catalog_id (str): ID of the catalog entity.. [optional] # noqa: E501 + code (int): The event code that a diagnostics aggregated number references. [optional] # noqa: E501 + code_label (str): A human-friendly label for the event code (e.g, 'AVAILABILITY_INVALID'). [optional] # noqa: E501 + message (str): Title message describing the diagnostic issue. [optional] # noqa: E501 + occurrences (int): Number of occurrences of the issue. [optional] # noqa: E501 + severity (str): An ERROR means that items have been dropped, while a WARN denotes that items have been ingested despite an issue. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsReportFeedIngestionStats - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + report_type (str): [optional] if omitted the server will use the default value of "FEED_INGESTION_ISSUES" # noqa: E501 + catalog_id (str): ID of the catalog entity.. [optional] # noqa: E501 + code (int): The event code that a diagnostics aggregated number references. [optional] # noqa: E501 + code_label (str): A human-friendly label for the event code (e.g, 'AVAILABILITY_INVALID'). [optional] # noqa: E501 + message (str): Title message describing the diagnostic issue. [optional] # noqa: E501 + occurrences (int): Number of occurrences of the issue. [optional] # noqa: E501 + severity (str): An ERROR means that items have been dropped, while a WARN denotes that items have been ingested despite an issue. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_report_parameters.py b/openapi_generated/pinterest_client/model/catalogs_report_parameters.py new file mode 100644 index 0000000..b669684 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_report_parameters.py @@ -0,0 +1,334 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_report_parameters import CatalogsHotelReportParameters + from openapi_generated.pinterest_client.model.catalogs_report_distribution_issue_filter import CatalogsReportDistributionIssueFilter + from openapi_generated.pinterest_client.model.catalogs_report_feed_ingestion_filter import CatalogsReportFeedIngestionFilter + from openapi_generated.pinterest_client.model.catalogs_retail_report_parameters import CatalogsRetailReportParameters + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + globals()['CatalogsHotelReportParameters'] = CatalogsHotelReportParameters + globals()['CatalogsReportDistributionIssueFilter'] = CatalogsReportDistributionIssueFilter + globals()['CatalogsReportFeedIngestionFilter'] = CatalogsReportFeedIngestionFilter + globals()['CatalogsRetailReportParameters'] = CatalogsRetailReportParameters + globals()['CatalogsType'] = CatalogsType + + +class CatalogsReportParameters(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'report': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CatalogsHotelReportParameters': CatalogsHotelReportParameters, + 'CatalogsRetailReportParameters': CatalogsRetailReportParameters, + 'HOTEL': CatalogsHotelReportParameters, + 'RETAIL': CatalogsRetailReportParameters, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'report': 'report', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsReportParameters - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + report ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsReportParameters - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + report ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsHotelReportParameters, + CatalogsRetailReportParameters, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_report_stats.py b/openapi_generated/pinterest_client/model/catalogs_report_stats.py new file mode 100644 index 0000000..00ca41c --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_report_stats.py @@ -0,0 +1,369 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_report_distribution_stats import CatalogsReportDistributionStats + from openapi_generated.pinterest_client.model.catalogs_report_feed_ingestion_stats import CatalogsReportFeedIngestionStats + globals()['CatalogsReportDistributionStats'] = CatalogsReportDistributionStats + globals()['CatalogsReportFeedIngestionStats'] = CatalogsReportFeedIngestionStats + + +class CatalogsReportStats(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('report_type',): { + 'FEED_INGESTION_ISSUES': "FEED_INGESTION_ISSUES", + 'DISTRIBUTION_ISSUES': "DISTRIBUTION_ISSUES", + }, + ('severity',): { + 'WARN': "WARN", + 'ERROR': "ERROR", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'report_type': (str,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'code': (int,), # noqa: E501 + 'code_label': (str,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'occurrences': (int,), # noqa: E501 + 'severity': (str,), # noqa: E501 + 'ineligible_for_ads': (bool,), # noqa: E501 + 'ineligible_for_organic': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CatalogsReportDistributionStats': CatalogsReportDistributionStats, + 'CatalogsReportFeedIngestionStats': CatalogsReportFeedIngestionStats, + 'DISTRIBUTION_ISSUES': CatalogsReportDistributionStats, + 'FEED_INGESTION_ISSUES': CatalogsReportFeedIngestionStats, + } + if not val: + return None + return {'report_type': val} + + attribute_map = { + 'report_type': 'report_type', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'code': 'code', # noqa: E501 + 'code_label': 'code_label', # noqa: E501 + 'message': 'message', # noqa: E501 + 'occurrences': 'occurrences', # noqa: E501 + 'severity': 'severity', # noqa: E501 + 'ineligible_for_ads': 'ineligible_for_ads', # noqa: E501 + 'ineligible_for_organic': 'ineligible_for_organic', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsReportStats - a model defined in OpenAPI + + Keyword Args: + report_type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): ID of the catalog entity.. [optional] # noqa: E501 + code (int): The event code that a diagnostics aggregated number references. [optional] # noqa: E501 + code_label (str): A human-friendly label for the event code (e.g, 'SPAM'). [optional] # noqa: E501 + message (str): Title message describing the diagnostic issue. [optional] # noqa: E501 + occurrences (int): Number of occurrences of the issue. [optional] # noqa: E501 + severity (str): An ERROR means that items have been dropped, while a WARN denotes that items have been ingested despite an issue. [optional] # noqa: E501 + ineligible_for_ads (bool): Indicates if issue makes items ineligible for ads distribution. [optional] # noqa: E501 + ineligible_for_organic (bool): Indicates if issue makes items ineligible for organic distribution. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsReportStats - a model defined in OpenAPI + + Keyword Args: + report_type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): ID of the catalog entity.. [optional] # noqa: E501 + code (int): The event code that a diagnostics aggregated number references. [optional] # noqa: E501 + code_label (str): A human-friendly label for the event code (e.g, 'SPAM'). [optional] # noqa: E501 + message (str): Title message describing the diagnostic issue. [optional] # noqa: E501 + occurrences (int): Number of occurrences of the issue. [optional] # noqa: E501 + severity (str): An ERROR means that items have been dropped, while a WARN denotes that items have been ingested despite an issue. [optional] # noqa: E501 + ineligible_for_ads (bool): Indicates if issue makes items ineligible for ads distribution. [optional] # noqa: E501 + ineligible_for_organic (bool): Indicates if issue makes items ineligible for organic distribution. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsReportDistributionStats, + CatalogsReportFeedIngestionStats, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_batch_request.py b/openapi_generated/pinterest_client/model/catalogs_retail_batch_request.py new file mode 100644 index 0000000..1eeb243 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_batch_request.py @@ -0,0 +1,288 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.country import Country + globals()['Country'] = Country + + +class CatalogsRetailBatchRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'RETAIL': "RETAIL", + }, + } + + validations = { + ('items',): { + 'max_items': 1000, + 'min_items': 1, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'items': ([bool, date, datetime, dict, float, int, list, str, none_type],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, country, language, items, *args, **kwargs): # noqa: E501 + """CatalogsRetailBatchRequest - a model defined in OpenAPI + + Args: + country (Country): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. + items ([bool, date, datetime, dict, float, int, list, str, none_type]): Array with catalogs item operations + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.country = country + self.language = language + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, country, language, items, *args, **kwargs): # noqa: E501 + """CatalogsRetailBatchRequest - a model defined in OpenAPI + + Args: + country (Country): + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values. + items ([bool, date, datetime, dict, float, int, list, str, none_type]): Array with catalogs item operations + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.country = country + self.language = language + self.items = items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_feed.py b/openapi_generated/pinterest_client/model/catalogs_retail_feed.py new file mode 100644 index 0000000..4d9ec0a --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_feed.py @@ -0,0 +1,382 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_db_item import CatalogsDbItem + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.feed_fields2 import FeedFields2 + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + from openapi_generated.pinterest_client.model.product_availability_type import ProductAvailabilityType + globals()['CatalogsDbItem'] = CatalogsDbItem + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['Country'] = Country + globals()['FeedFields2'] = FeedFields2 + globals()['NullableCurrency'] = NullableCurrency + globals()['ProductAvailabilityType'] = ProductAvailabilityType + + +class CatalogsRetailFeed(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'created_at': (datetime,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'updated_at': (datetime,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'status': (CatalogsStatus,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'default_locale': (str,), # noqa: E501 + 'default_country': (Country,), # noqa: E501 + 'default_availability': (ProductAvailabilityType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'created_at': 'created_at', # noqa: E501 + 'id': 'id', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'location': 'location', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'status': 'status', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'default_country': 'default_country', # noqa: E501 + 'default_availability': 'default_availability', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsRetailFeed - a model defined in OpenAPI + + Keyword Args: + created_at (datetime): + id (str): + updated_at (datetime): + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. + format (CatalogsFormat): + catalog_type (CatalogsType): + credentials (CatalogsFeedCredentials): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + preferred_processing_schedule (CatalogsFeedProcessingSchedule): + status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + default_country (Country): + default_availability (ProductAvailabilityType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsRetailFeed - a model defined in OpenAPI + + Keyword Args: + created_at (datetime): + id (str): + updated_at (datetime): + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. + format (CatalogsFormat): + catalog_type (CatalogsType): + credentials (CatalogsFeedCredentials): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + preferred_processing_schedule (CatalogsFeedProcessingSchedule): + status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + default_country (Country): + default_availability (ProductAvailabilityType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_feeds_create_request.py b/openapi_generated/pinterest_client/model/catalogs_retail_feeds_create_request.py new file mode 100644 index 0000000..94e1865 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_feeds_create_request.py @@ -0,0 +1,330 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + from openapi_generated.pinterest_client.model.product_availability_type import ProductAvailabilityType + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['Country'] = Country + globals()['NullableCurrency'] = NullableCurrency + globals()['ProductAvailabilityType'] = ProductAvailabilityType + + +class CatalogsRetailFeedsCreateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('location',): { + 'regex': { + 'pattern': r'^(http|https|ftp|sftp):\/\/', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'default_locale': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + 'default_country': (Country,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'default_availability': (ProductAvailabilityType,), # noqa: E501 + 'status': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'location': 'location', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + 'default_country': 'default_country', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'default_availability': 'default_availability', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, format, default_locale, location, catalog_type, default_country, *args, **kwargs): # noqa: E501 + """CatalogsRetailFeedsCreateRequest - a model defined in OpenAPI + + Args: + name (str): A human-friendly name associated to a given feed. + format (CatalogsFormat): + default_locale (bool, date, datetime, dict, float, int, list, str, none_type): The locale used within a feed for product descriptions. + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + catalog_type (CatalogsType): + default_country (Country): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.format = format + self.default_locale = default_locale + self.location = location + self.catalog_type = catalog_type + self.default_country = default_country + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, format, default_locale, location, catalog_type, default_country, *args, **kwargs): # noqa: E501 + """CatalogsRetailFeedsCreateRequest - a model defined in OpenAPI + + Args: + name (str): A human-friendly name associated to a given feed. + format (CatalogsFormat): + default_locale (bool, date, datetime, dict, float, int, list, str, none_type): The locale used within a feed for product descriptions. + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + catalog_type (CatalogsType): + default_country (Country): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.format = format + self.default_locale = default_locale + self.location = location + self.catalog_type = catalog_type + self.default_country = default_country + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_feeds_update_request.py b/openapi_generated/pinterest_client/model/catalogs_retail_feeds_update_request.py new file mode 100644 index 0000000..6a7d874 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_feeds_update_request.py @@ -0,0 +1,310 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + from openapi_generated.pinterest_client.model.product_availability_type import ProductAvailabilityType + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['NullableCurrency'] = NullableCurrency + globals()['ProductAvailabilityType'] = ProductAvailabilityType + + +class CatalogsRetailFeedsUpdateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('location',): { + 'regex': { + 'pattern': r'^(http|https|ftp|sftp):\/\/', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'status': (CatalogsStatus,), # noqa: E501 + 'default_availability': (ProductAvailabilityType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'location': 'location', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'status': 'status', # noqa: E501 + 'default_availability': 'default_availability', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsRetailFeedsUpdateRequest - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + name (str): A human-friendly name associated to a given feed.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + status (CatalogsStatus): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsRetailFeedsUpdateRequest - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + name (str): A human-friendly name associated to a given feed.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + status (CatalogsStatus): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_item_error_response.py b/openapi_generated/pinterest_client/model/catalogs_retail_item_error_response.py new file mode 100644 index 0000000..1320b7c --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_item_error_response.py @@ -0,0 +1,278 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.item_validation_event import ItemValidationEvent + globals()['CatalogsType'] = CatalogsType + globals()['ItemValidationEvent'] = ItemValidationEvent + + +class CatalogsRetailItemErrorResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'item_id': (str,), # noqa: E501 + 'errors': ([ItemValidationEvent],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'item_id': 'item_id', # noqa: E501 + 'errors': 'errors', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsRetailItemErrorResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 + errors ([ItemValidationEvent]): Array with the errors for the item id requested. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsRetailItemErrorResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 + errors ([ItemValidationEvent]): Array with the errors for the item id requested. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_item_response.py b/openapi_generated/pinterest_client/model/catalogs_retail_item_response.py new file mode 100644 index 0000000..0283e8b --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_item_response.py @@ -0,0 +1,287 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.item_attributes import ItemAttributes + from openapi_generated.pinterest_client.model.pin import Pin + globals()['CatalogsType'] = CatalogsType + globals()['ItemAttributes'] = ItemAttributes + globals()['Pin'] = Pin + + +class CatalogsRetailItemResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('pins',): { + 'max_items': 11, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'item_id': (str,), # noqa: E501 + 'pins': ([Pin], none_type,), # noqa: E501 + 'attributes': (ItemAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'item_id': 'item_id', # noqa: E501 + 'pins': 'pins', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsRetailItemResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + item_id (str): The catalog retail item id in the merchant namespace. [optional] # noqa: E501 + pins ([Pin], none_type): The pins mapped to the item. [optional] # noqa: E501 + attributes (ItemAttributes): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsRetailItemResponse - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + item_id (str): The catalog retail item id in the merchant namespace. [optional] # noqa: E501 + pins ([Pin], none_type): The pins mapped to the item. [optional] # noqa: E501 + attributes (ItemAttributes): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_items_batch.py b/openapi_generated/pinterest_client/model/catalogs_retail_items_batch.py new file mode 100644 index 0000000..9d78d02 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_items_batch.py @@ -0,0 +1,294 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.batch_operation_status import BatchOperationStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.item_processing_record import ItemProcessingRecord + globals()['BatchOperationStatus'] = BatchOperationStatus + globals()['CatalogsType'] = CatalogsType + globals()['ItemProcessingRecord'] = ItemProcessingRecord + + +class CatalogsRetailItemsBatch(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'batch_id': (str,), # noqa: E501 + 'created_time': (datetime,), # noqa: E501 + 'completed_time': (datetime, none_type,), # noqa: E501 + 'status': (BatchOperationStatus,), # noqa: E501 + 'items': ([ItemProcessingRecord],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'batch_id': 'batch_id', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + 'completed_time': 'completed_time', # noqa: E501 + 'status': 'status', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + 'created_time', # noqa: E501 + 'completed_time', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsRetailItemsBatch - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + batch_id (str): Id of the catalogs items batch. [optional] # noqa: E501 + created_time (datetime): Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + completed_time (datetime, none_type): Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + status (BatchOperationStatus): [optional] # noqa: E501 + items ([ItemProcessingRecord]): Array with the catalogs items processing records part of the catalogs items batch. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 + """CatalogsRetailItemsBatch - a model defined in OpenAPI + + Args: + catalog_type (CatalogsType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + batch_id (str): Id of the catalogs items batch. [optional] # noqa: E501 + created_time (datetime): Date and time (UTC) of the batch creation: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + completed_time (datetime, none_type): Date and time (UTC) of the batch completion: YYYY-MM-DD'T'hh:mm:ss. [optional] # noqa: E501 + status (BatchOperationStatus): [optional] # noqa: E501 + items ([ItemProcessingRecord]): Array with the catalogs items processing records part of the catalogs items batch. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_items_filter.py b/openapi_generated/pinterest_client/model/catalogs_retail_items_filter.py new file mode 100644 index 0000000..c5087db --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_items_filter.py @@ -0,0 +1,286 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsRetailItemsFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'RETAIL': "RETAIL", + }, + } + + validations = { + ('item_ids',): { + 'max_items': 100, + 'min_items': 1, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'catalog_type': (str,), # noqa: E501 + 'item_ids': ([str],), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'item_ids': 'item_ids', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, item_ids, *args, **kwargs): # noqa: E501 + """CatalogsRetailItemsFilter - a model defined in OpenAPI + + Args: + item_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the retail item. If not provided, default to oldest retail catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.item_ids = item_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, item_ids, *args, **kwargs): # noqa: E501 + """CatalogsRetailItemsFilter - a model defined in OpenAPI + + Args: + item_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the retail item. If not provided, default to oldest retail catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.item_ids = item_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_items_post_filter.py b/openapi_generated/pinterest_client/model/catalogs_retail_items_post_filter.py new file mode 100644 index 0000000..d12de6d --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_items_post_filter.py @@ -0,0 +1,286 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsRetailItemsPostFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'RETAIL': "RETAIL", + }, + } + + validations = { + ('item_ids',): { + 'max_items': 1000, + 'min_items': 1, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'catalog_type': (str,), # noqa: E501 + 'item_ids': ([str],), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'item_ids': 'item_ids', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, item_ids, *args, **kwargs): # noqa: E501 + """CatalogsRetailItemsPostFilter - a model defined in OpenAPI + + Args: + item_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the retail item. If not provided, default to oldest retail catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.item_ids = item_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, item_ids, *args, **kwargs): # noqa: E501 + """CatalogsRetailItemsPostFilter - a model defined in OpenAPI + + Args: + item_ids ([str]): + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the retail item. If not provided, default to oldest retail catalog. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.item_ids = item_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_list_products_by_catalog_based_filter_request.py b/openapi_generated/pinterest_client/model/catalogs_retail_list_products_by_catalog_based_filter_request.py new file mode 100644 index 0000000..3934005 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_list_products_by_catalog_based_filter_request.py @@ -0,0 +1,299 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_locale import CatalogsLocale + from openapi_generated.pinterest_client.model.catalogs_product_group_filters import CatalogsProductGroupFilters + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsLocale'] = CatalogsLocale + globals()['CatalogsProductGroupFilters'] = CatalogsProductGroupFilters + globals()['Country'] = Country + + +class CatalogsRetailListProductsByCatalogBasedFilterRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'RETAIL': "RETAIL", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'filters': (CatalogsProductGroupFilters,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'locale': (CatalogsLocale,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'country': 'country', # noqa: E501 + 'locale': 'locale', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_id, filters, country, locale, *args, **kwargs): # noqa: E501 + """CatalogsRetailListProductsByCatalogBasedFilterRequest - a model defined in OpenAPI + + Args: + catalog_id (str): Catalog id pertaining to the retail product group. + filters (CatalogsProductGroupFilters): + country (Country): + locale (CatalogsLocale): + + Keyword Args: + catalog_type (str): Retail catalog based product group is available only for selected partners at the moment. If you are not eligible, please use feed based one.. defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.catalog_id = catalog_id + self.filters = filters + self.country = country + self.locale = locale + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, catalog_id, filters, country, locale, *args, **kwargs): # noqa: E501 + """CatalogsRetailListProductsByCatalogBasedFilterRequest - a model defined in OpenAPI + + Args: + catalog_id (str): Catalog id pertaining to the retail product group. + filters (CatalogsProductGroupFilters): + country (Country): + locale (CatalogsLocale): + + Keyword Args: + catalog_type (str): Retail catalog based product group is available only for selected partners at the moment. If you are not eligible, please use feed based one.. defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.catalog_id = catalog_id + self.filters = filters + self.country = country + self.locale = locale + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_product.py b/openapi_generated/pinterest_client/model/catalogs_retail_product.py new file mode 100644 index 0000000..3aa9733 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_product.py @@ -0,0 +1,287 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_retail_product_metadata import CatalogsRetailProductMetadata + from openapi_generated.pinterest_client.model.pin import Pin + globals()['CatalogsRetailProductMetadata'] = CatalogsRetailProductMetadata + globals()['Pin'] = Pin + + +class CatalogsRetailProduct(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'RETAIL': "RETAIL", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'metadata': (CatalogsRetailProductMetadata,), # noqa: E501 + 'pin': (Pin,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'pin': 'pin', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, metadata, pin, *args, **kwargs): # noqa: E501 + """CatalogsRetailProduct - a model defined in OpenAPI + + Args: + metadata (CatalogsRetailProductMetadata): + pin (Pin): + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.metadata = metadata + self.pin = pin + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, metadata, pin, *args, **kwargs): # noqa: E501 + """CatalogsRetailProduct - a model defined in OpenAPI + + Args: + metadata (CatalogsRetailProductMetadata): + pin (Pin): + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.metadata = metadata + self.pin = pin + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_product_group.py b/openapi_generated/pinterest_client/model/catalogs_retail_product_group.py new file mode 100644 index 0000000..fb1a26c --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_product_group.py @@ -0,0 +1,352 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_product_group_filters import CatalogsProductGroupFilters + from openapi_generated.pinterest_client.model.catalogs_product_group_status import CatalogsProductGroupStatus + from openapi_generated.pinterest_client.model.catalogs_product_group_type import CatalogsProductGroupType + globals()['CatalogsProductGroupFilters'] = CatalogsProductGroupFilters + globals()['CatalogsProductGroupStatus'] = CatalogsProductGroupStatus + globals()['CatalogsProductGroupType'] = CatalogsProductGroupType + + +class CatalogsRetailProductGroup(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'RETAIL': "RETAIL", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('feed_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'filters': (CatalogsProductGroupFilters,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'feed_id': (str, none_type,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'is_featured': (bool,), # noqa: E501 + 'type': (CatalogsProductGroupType,), # noqa: E501 + 'status': (CatalogsProductGroupStatus,), # noqa: E501 + 'created_at': (int,), # noqa: E501 + 'updated_at': (int,), # noqa: E501 + 'country': (str, none_type,), # noqa: E501 + 'locale': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'id': 'id', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'feed_id': 'feed_id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'is_featured': 'is_featured', # noqa: E501 + 'type': 'type', # noqa: E501 + 'status': 'status', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'country': 'country', # noqa: E501 + 'locale': 'locale', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, filters, catalog_id, feed_id, *args, **kwargs): # noqa: E501 + """CatalogsRetailProductGroup - a model defined in OpenAPI + + Args: + id (str): ID of the catalog product group. + filters (CatalogsProductGroupFilters): + catalog_id (str): Catalog id pertaining to the retail product group. + feed_id (str, none_type): id of the catalogs feed belonging to this catalog product group + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Name of catalog product group. [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + is_featured (bool): boolean indicator of whether the product group is being featured or not. [optional] # noqa: E501 + type (CatalogsProductGroupType): [optional] # noqa: E501 + status (CatalogsProductGroupStatus): [optional] # noqa: E501 + created_at (int): Unix timestamp in seconds of when catalog product group was created.. [optional] # noqa: E501 + updated_at (int): Unix timestamp in seconds of last time catalog product group was updated.. [optional] # noqa: E501 + country (str, none_type): [optional] # noqa: E501 + locale (str, none_type): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.id = id + self.filters = filters + self.catalog_id = catalog_id + self.feed_id = feed_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, filters, catalog_id, feed_id, *args, **kwargs): # noqa: E501 + """CatalogsRetailProductGroup - a model defined in OpenAPI + + Args: + id (str): ID of the catalog product group. + filters (CatalogsProductGroupFilters): + catalog_id (str): Catalog id pertaining to the retail product group. + feed_id (str, none_type): id of the catalogs feed belonging to this catalog product group + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Name of catalog product group. [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + is_featured (bool): boolean indicator of whether the product group is being featured or not. [optional] # noqa: E501 + type (CatalogsProductGroupType): [optional] # noqa: E501 + status (CatalogsProductGroupStatus): [optional] # noqa: E501 + created_at (int): Unix timestamp in seconds of when catalog product group was created.. [optional] # noqa: E501 + updated_at (int): Unix timestamp in seconds of last time catalog product group was updated.. [optional] # noqa: E501 + country (str, none_type): [optional] # noqa: E501 + locale (str, none_type): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.id = id + self.filters = filters + self.catalog_id = catalog_id + self.feed_id = feed_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_product_group_create_request.py b/openapi_generated/pinterest_client/model/catalogs_retail_product_group_create_request.py new file mode 100644 index 0000000..7a21d9b --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_product_group_create_request.py @@ -0,0 +1,309 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_locale import CatalogsLocale + from openapi_generated.pinterest_client.model.catalogs_product_group_filters_request import CatalogsProductGroupFiltersRequest + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsLocale'] = CatalogsLocale + globals()['CatalogsProductGroupFiltersRequest'] = CatalogsProductGroupFiltersRequest + globals()['Country'] = Country + + +class CatalogsRetailProductGroupCreateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'RETAIL': "RETAIL", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'filters': (CatalogsProductGroupFiltersRequest,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'locale': (CatalogsLocale,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'name': 'name', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'locale': 'locale', # noqa: E501 + 'description': 'description', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, filters, catalog_id, country, locale, *args, **kwargs): # noqa: E501 + """CatalogsRetailProductGroupCreateRequest - a model defined in OpenAPI + + Args: + name (str): + filters (CatalogsProductGroupFiltersRequest): + catalog_id (str): Catalog id pertaining to the retail product group. + country (Country): + locale (CatalogsLocale): + + Keyword Args: + catalog_type (str): Retail catalog based product group is available only for selected partners at the moment. If you are not eligible, please use feed based one.. defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str, none_type): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.name = name + self.filters = filters + self.catalog_id = catalog_id + self.country = country + self.locale = locale + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, filters, catalog_id, country, locale, *args, **kwargs): # noqa: E501 + """CatalogsRetailProductGroupCreateRequest - a model defined in OpenAPI + + Args: + name (str): + filters (CatalogsProductGroupFiltersRequest): + catalog_id (str): Catalog id pertaining to the retail product group. + country (Country): + locale (CatalogsLocale): + + Keyword Args: + catalog_type (str): Retail catalog based product group is available only for selected partners at the moment. If you are not eligible, please use feed based one.. defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str, none_type): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.name = name + self.filters = filters + self.catalog_id = catalog_id + self.country = country + self.locale = locale + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_product_group_product_counts.py b/openapi_generated/pinterest_client/model/catalogs_retail_product_group_product_counts.py new file mode 100644 index 0000000..9f38dd7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_product_group_product_counts.py @@ -0,0 +1,310 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsRetailProductGroupProductCounts(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'RETAIL': "RETAIL", + }, + } + + validations = { + ('in_stock',): { + 'inclusive_minimum': 0, + }, + ('out_of_stock',): { + 'inclusive_minimum': 0, + }, + ('preorder',): { + 'inclusive_minimum': 0, + }, + ('total',): { + 'inclusive_minimum': 0, + }, + ('videos',): { + 'inclusive_minimum': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'catalog_type': (str,), # noqa: E501 + 'in_stock': (float,), # noqa: E501 + 'out_of_stock': (float,), # noqa: E501 + 'preorder': (float,), # noqa: E501 + 'total': (float,), # noqa: E501 + 'videos': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'in_stock': 'in_stock', # noqa: E501 + 'out_of_stock': 'out_of_stock', # noqa: E501 + 'preorder': 'preorder', # noqa: E501 + 'total': 'total', # noqa: E501 + 'videos': 'videos', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, in_stock, out_of_stock, preorder, total, *args, **kwargs): # noqa: E501 + """CatalogsRetailProductGroupProductCounts - a model defined in OpenAPI + + Args: + in_stock (float): + out_of_stock (float): + preorder (float): + total (float): + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + videos (float): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.in_stock = in_stock + self.out_of_stock = out_of_stock + self.preorder = preorder + self.total = total + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, in_stock, out_of_stock, preorder, total, *args, **kwargs): # noqa: E501 + """CatalogsRetailProductGroupProductCounts - a model defined in OpenAPI + + Args: + in_stock (float): + out_of_stock (float): + preorder (float): + total (float): + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + videos (float): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.in_stock = in_stock + self.out_of_stock = out_of_stock + self.preorder = preorder + self.total = total + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_product_group_update_request.py b/openapi_generated/pinterest_client/model/catalogs_retail_product_group_update_request.py new file mode 100644 index 0000000..2181265 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_product_group_update_request.py @@ -0,0 +1,282 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_locale import CatalogsLocale + from openapi_generated.pinterest_client.model.catalogs_product_group_filters_request import CatalogsProductGroupFiltersRequest + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsLocale'] = CatalogsLocale + globals()['CatalogsProductGroupFiltersRequest'] = CatalogsProductGroupFiltersRequest + globals()['Country'] = Country + + +class CatalogsRetailProductGroupUpdateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'RETAIL': "RETAIL", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'filters': (CatalogsProductGroupFiltersRequest,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'locale': (CatalogsLocale,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'country': 'country', # noqa: E501 + 'locale': 'locale', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsRetailProductGroupUpdateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_type (str): Retail catalog based product group is available only for selected partners at the moment. If you are not eligible, please use feed based one.. [optional] if omitted the server will use the default value of "RETAIL" # noqa: E501 + name (str): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + filters (CatalogsProductGroupFiltersRequest): [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + locale (CatalogsLocale): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsRetailProductGroupUpdateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_type (str): Retail catalog based product group is available only for selected partners at the moment. If you are not eligible, please use feed based one.. [optional] if omitted the server will use the default value of "RETAIL" # noqa: E501 + name (str): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + filters (CatalogsProductGroupFiltersRequest): [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + locale (CatalogsLocale): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_product_metadata.py b/openapi_generated/pinterest_client/model/catalogs_retail_product_metadata.py new file mode 100644 index 0000000..8270dd3 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_product_metadata.py @@ -0,0 +1,300 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.non_nullable_catalogs_currency import NonNullableCatalogsCurrency + from openapi_generated.pinterest_client.model.non_nullable_product_availability_type import NonNullableProductAvailabilityType + globals()['NonNullableCatalogsCurrency'] = NonNullableCatalogsCurrency + globals()['NonNullableProductAvailabilityType'] = NonNullableProductAvailabilityType + + +class CatalogsRetailProductMetadata(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'item_group_id': (str, none_type,), # noqa: E501 + 'availability': (NonNullableProductAvailabilityType,), # noqa: E501 + 'price': (float,), # noqa: E501 + 'sale_price': (float, none_type,), # noqa: E501 + 'currency': (NonNullableCatalogsCurrency,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'item_group_id': 'item_group_id', # noqa: E501 + 'availability': 'availability', # noqa: E501 + 'price': 'price', # noqa: E501 + 'sale_price': 'sale_price', # noqa: E501 + 'currency': 'currency', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, item_id, item_group_id, availability, price, sale_price, currency, *args, **kwargs): # noqa: E501 + """CatalogsRetailProductMetadata - a model defined in OpenAPI + + Args: + item_id (str): The user-created unique ID that represents the product. + item_group_id (str, none_type): The parent ID of the product. + availability (NonNullableProductAvailabilityType): + price (float): The price of the product. + sale_price (float, none_type): The discounted price of the product. + currency (NonNullableCatalogsCurrency): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.item_group_id = item_group_id + self.availability = availability + self.price = price + self.sale_price = sale_price + self.currency = currency + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, item_id, item_group_id, availability, price, sale_price, currency, *args, **kwargs): # noqa: E501 + """CatalogsRetailProductMetadata - a model defined in OpenAPI + + Args: + item_id (str): The user-created unique ID that represents the product. + item_group_id (str, none_type): The parent ID of the product. + availability (NonNullableProductAvailabilityType): + price (float): The price of the product. + sale_price (float, none_type): The discounted price of the product. + currency (NonNullableCatalogsCurrency): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.item_group_id = item_group_id + self.availability = availability + self.price = price + self.sale_price = sale_price + self.currency = currency + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_retail_report_parameters.py b/openapi_generated/pinterest_client/model/catalogs_retail_report_parameters.py new file mode 100644 index 0000000..4413cf5 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_report_parameters.py @@ -0,0 +1,281 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_report_distribution_issue_filter import CatalogsReportDistributionIssueFilter + from openapi_generated.pinterest_client.model.catalogs_report_feed_ingestion_filter import CatalogsReportFeedIngestionFilter + globals()['CatalogsReportDistributionIssueFilter'] = CatalogsReportDistributionIssueFilter + globals()['CatalogsReportFeedIngestionFilter'] = CatalogsReportFeedIngestionFilter + + +class CatalogsRetailReportParameters(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'RETAIL': "RETAIL", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'report': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'report': 'report', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, report, *args, **kwargs): # noqa: E501 + """CatalogsRetailReportParameters - a model defined in OpenAPI + + Args: + report ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.report = report + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, report, *args, **kwargs): # noqa: E501 + """CatalogsRetailReportParameters - a model defined in OpenAPI + + Args: + report ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + + Keyword Args: + catalog_type (str): defaults to "RETAIL", must be one of ["RETAIL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + catalog_type = kwargs.get('catalog_type', "RETAIL") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.catalog_type = catalog_type + self.report = report + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_status.py b/openapi_generated/pinterest_client/model/catalogs_status.py index 06093b4..63b2cea 100644 --- a/openapi_generated/pinterest_client/model/catalogs_status.py +++ b/openapi_generated/pinterest_client/model/catalogs_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/catalogs_type.py b/openapi_generated/pinterest_client/model/catalogs_type.py new file mode 100644 index 0000000..219cacb --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_type.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'RETAIL': "RETAIL", + 'HOTEL': "HOTEL", + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """CatalogsType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Type of the catalog entity.., must be one of ["RETAIL", "HOTEL", "CREATIVE_ASSETS", ] # noqa: E501 + + Keyword Args: + value (str): Type of the catalog entity.., must be one of ["RETAIL", "HOTEL", "CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """CatalogsType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Type of the catalog entity.., must be one of ["RETAIL", "HOTEL", "CREATIVE_ASSETS", ] # noqa: E501 + + Keyword Args: + value (str): Type of the catalog entity.., must be one of ["RETAIL", "HOTEL", "CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/catalogs_updatable_creative_assets_attributes.py b/openapi_generated/pinterest_client/model/catalogs_updatable_creative_assets_attributes.py new file mode 100644 index 0000000..bc0572b --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_updatable_creative_assets_attributes.py @@ -0,0 +1,300 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CatalogsUpdatableCreativeAssetsAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'link': (str,), # noqa: E501 + 'ios_deep_link': (str, none_type,), # noqa: E501 + 'android_deep_link': (str, none_type,), # noqa: E501 + 'google_product_category': (str, none_type,), # noqa: E501 + 'custom_label_0': (str, none_type,), # noqa: E501 + 'custom_label_1': (str, none_type,), # noqa: E501 + 'custom_label_2': (str, none_type,), # noqa: E501 + 'custom_label_3': (str, none_type,), # noqa: E501 + 'custom_label_4': (str, none_type,), # noqa: E501 + 'visibility': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'link': 'link', # noqa: E501 + 'ios_deep_link': 'ios_deep_link', # noqa: E501 + 'android_deep_link': 'android_deep_link', # noqa: E501 + 'google_product_category': 'google_product_category', # noqa: E501 + 'custom_label_0': 'custom_label_0', # noqa: E501 + 'custom_label_1': 'custom_label_1', # noqa: E501 + 'custom_label_2': 'custom_label_2', # noqa: E501 + 'custom_label_3': 'custom_label_3', # noqa: E501 + 'custom_label_4': 'custom_label_4', # noqa: E501 + 'visibility': 'visibility', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsUpdatableCreativeAssetsAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): The name of the creative assets.. [optional] # noqa: E501 + description (str): Brief description of the creative assets.. [optional] # noqa: E501 + link (str): Link to the creative assets page.. [optional] # noqa: E501 + ios_deep_link (str, none_type): IOS deep link to the creative assets page.. [optional] # noqa: E501 + android_deep_link (str, none_type): Link to the creative assets page.. [optional] # noqa: E501 + google_product_category (str, none_type): The categorization of the product based on the standardized Google Product Taxonomy. This is a set taxonomy. Both the text values and numeric codes are accepted.. [optional] # noqa: E501 + custom_label_0 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_1 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_2 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_3 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_4 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + visibility (str, none_type): Visibility of the creative assets. Must be one of the following values (upper or lowercase): ‘visible’, ‘hidden’.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsUpdatableCreativeAssetsAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): The name of the creative assets.. [optional] # noqa: E501 + description (str): Brief description of the creative assets.. [optional] # noqa: E501 + link (str): Link to the creative assets page.. [optional] # noqa: E501 + ios_deep_link (str, none_type): IOS deep link to the creative assets page.. [optional] # noqa: E501 + android_deep_link (str, none_type): Link to the creative assets page.. [optional] # noqa: E501 + google_product_category (str, none_type): The categorization of the product based on the standardized Google Product Taxonomy. This is a set taxonomy. Both the text values and numeric codes are accepted.. [optional] # noqa: E501 + custom_label_0 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_1 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_2 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_3 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + custom_label_4 (str, none_type): Custom grouping of creative assets.. [optional] # noqa: E501 + visibility (str, none_type): Visibility of the creative assets. Must be one of the following values (upper or lowercase): ‘visible’, ‘hidden’.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_updatable_hotel_attributes.py b/openapi_generated/pinterest_client/model/catalogs_updatable_hotel_attributes.py new file mode 100644 index 0000000..634f95c --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_updatable_hotel_attributes.py @@ -0,0 +1,328 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_address import CatalogsHotelAddress + from openapi_generated.pinterest_client.model.catalogs_hotel_guest_ratings import CatalogsHotelGuestRatings + globals()['CatalogsHotelAddress'] = CatalogsHotelAddress + globals()['CatalogsHotelGuestRatings'] = CatalogsHotelGuestRatings + + +class CatalogsUpdatableHotelAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str, none_type,), # noqa: E501 + 'link': (str, none_type,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'brand': (str, none_type,), # noqa: E501 + 'latitude': (float,), # noqa: E501 + 'longitude': (float, none_type,), # noqa: E501 + 'neighborhood': ([str], none_type,), # noqa: E501 + 'address': (CatalogsHotelAddress,), # noqa: E501 + 'custom_label_0': (str, none_type,), # noqa: E501 + 'custom_label_1': (str, none_type,), # noqa: E501 + 'custom_label_2': (str, none_type,), # noqa: E501 + 'custom_label_3': (str, none_type,), # noqa: E501 + 'custom_label_4': (str, none_type,), # noqa: E501 + 'category': (str, none_type,), # noqa: E501 + 'base_price': (str, none_type,), # noqa: E501 + 'sale_price': (str, none_type,), # noqa: E501 + 'guest_ratings': (CatalogsHotelGuestRatings,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'link': 'link', # noqa: E501 + 'description': 'description', # noqa: E501 + 'brand': 'brand', # noqa: E501 + 'latitude': 'latitude', # noqa: E501 + 'longitude': 'longitude', # noqa: E501 + 'neighborhood': 'neighborhood', # noqa: E501 + 'address': 'address', # noqa: E501 + 'custom_label_0': 'custom_label_0', # noqa: E501 + 'custom_label_1': 'custom_label_1', # noqa: E501 + 'custom_label_2': 'custom_label_2', # noqa: E501 + 'custom_label_3': 'custom_label_3', # noqa: E501 + 'custom_label_4': 'custom_label_4', # noqa: E501 + 'category': 'category', # noqa: E501 + 'base_price': 'base_price', # noqa: E501 + 'sale_price': 'sale_price', # noqa: E501 + 'guest_ratings': 'guest_ratings', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsUpdatableHotelAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): The hotel's name.. [optional] # noqa: E501 + link (str, none_type): Link to the product page. [optional] # noqa: E501 + description (str, none_type): Brief description of the hotel.. [optional] # noqa: E501 + brand (str, none_type): The brand to which this hotel belongs to.. [optional] # noqa: E501 + latitude (float): Latitude of the hotel.. [optional] # noqa: E501 + longitude (float, none_type): Longitude of the hotel.. [optional] # noqa: E501 + neighborhood ([str], none_type): A list of neighborhoods where the hotel is located. [optional] # noqa: E501 + address (CatalogsHotelAddress): [optional] # noqa: E501 + custom_label_0 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_1 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_2 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_3 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_4 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + category (str, none_type): The type of property. The category can be any type of internal description desired.. [optional] # noqa: E501 + base_price (str, none_type): Base price of the hotel room per night followed by the ISO currency code. [optional] # noqa: E501 + sale_price (str, none_type): Sale price of a hotel room per night. Used to advertise discounts off the regular price of the hotel.. [optional] # noqa: E501 + guest_ratings (CatalogsHotelGuestRatings): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsUpdatableHotelAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): The hotel's name.. [optional] # noqa: E501 + link (str, none_type): Link to the product page. [optional] # noqa: E501 + description (str, none_type): Brief description of the hotel.. [optional] # noqa: E501 + brand (str, none_type): The brand to which this hotel belongs to.. [optional] # noqa: E501 + latitude (float): Latitude of the hotel.. [optional] # noqa: E501 + longitude (float, none_type): Longitude of the hotel.. [optional] # noqa: E501 + neighborhood ([str], none_type): A list of neighborhoods where the hotel is located. [optional] # noqa: E501 + address (CatalogsHotelAddress): [optional] # noqa: E501 + custom_label_0 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_1 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_2 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_3 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + custom_label_4 (str, none_type): Custom grouping of hotels. [optional] # noqa: E501 + category (str, none_type): The type of property. The category can be any type of internal description desired.. [optional] # noqa: E501 + base_price (str, none_type): Base price of the hotel room per night followed by the ISO currency code. [optional] # noqa: E501 + sale_price (str, none_type): Sale price of a hotel room per night. Used to advertise discounts off the regular price of the hotel.. [optional] # noqa: E501 + guest_ratings (CatalogsHotelGuestRatings): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_update_creative_assets_item.py b/openapi_generated/pinterest_client/model/catalogs_update_creative_assets_item.py new file mode 100644 index 0000000..7c11342 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_update_creative_assets_item.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_updatable_creative_assets_attributes import CatalogsUpdatableCreativeAssetsAttributes + globals()['CatalogsUpdatableCreativeAssetsAttributes'] = CatalogsUpdatableCreativeAssetsAttributes + + +class CatalogsUpdateCreativeAssetsItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'UPDATE': "UPDATE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'creative_assets_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + 'attributes': (CatalogsUpdatableCreativeAssetsAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'creative_assets_id': 'creative_assets_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, creative_assets_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpdateCreativeAssetsItem - a model defined in OpenAPI + + Args: + creative_assets_id (str): The catalog creative assets item id in the merchant namespace + attributes (CatalogsUpdatableCreativeAssetsAttributes): + + Keyword Args: + operation (str): defaults to "UPDATE", must be one of ["UPDATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "UPDATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, creative_assets_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpdateCreativeAssetsItem - a model defined in OpenAPI + + Args: + creative_assets_id (str): The catalog creative assets item id in the merchant namespace + attributes (CatalogsUpdatableCreativeAssetsAttributes): + + Keyword Args: + operation (str): defaults to "UPDATE", must be one of ["UPDATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "UPDATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_update_hotel_item.py b/openapi_generated/pinterest_client/model/catalogs_update_hotel_item.py new file mode 100644 index 0000000..9e42297 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_update_hotel_item.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_updatable_hotel_attributes import CatalogsUpdatableHotelAttributes + globals()['CatalogsUpdatableHotelAttributes'] = CatalogsUpdatableHotelAttributes + + +class CatalogsUpdateHotelItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'UPDATE': "UPDATE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'hotel_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + 'attributes': (CatalogsUpdatableHotelAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'hotel_id': 'hotel_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, hotel_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpdateHotelItem - a model defined in OpenAPI + + Args: + hotel_id (str): The catalog hotel item id in the merchant namespace + attributes (CatalogsUpdatableHotelAttributes): + + Keyword Args: + operation (str): defaults to "UPDATE", must be one of ["UPDATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "UPDATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, hotel_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpdateHotelItem - a model defined in OpenAPI + + Args: + hotel_id (str): The catalog hotel item id in the merchant namespace + attributes (CatalogsUpdatableHotelAttributes): + + Keyword Args: + operation (str): defaults to "UPDATE", must be one of ["UPDATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "UPDATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_update_retail_item.py b/openapi_generated/pinterest_client/model/catalogs_update_retail_item.py new file mode 100644 index 0000000..fd39d01 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_update_retail_item.py @@ -0,0 +1,291 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.updatable_item_attributes import UpdatableItemAttributes + from openapi_generated.pinterest_client.model.update_mask_field_type import UpdateMaskFieldType + globals()['UpdatableItemAttributes'] = UpdatableItemAttributes + globals()['UpdateMaskFieldType'] = UpdateMaskFieldType + + +class CatalogsUpdateRetailItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'UPDATE': "UPDATE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + 'attributes': (UpdatableItemAttributes,), # noqa: E501 + 'update_mask': ([UpdateMaskFieldType], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'update_mask': 'update_mask', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, item_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpdateRetailItem - a model defined in OpenAPI + + Args: + item_id (str): The catalog item id in the merchant namespace + attributes (UpdatableItemAttributes): + + Keyword Args: + operation (str): defaults to "UPDATE", must be one of ["UPDATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + update_mask ([UpdateMaskFieldType], none_type): The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item.. [optional] # noqa: E501 + """ + + operation = kwargs.get('operation', "UPDATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, item_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpdateRetailItem - a model defined in OpenAPI + + Args: + item_id (str): The catalog item id in the merchant namespace + attributes (UpdatableItemAttributes): + + Keyword Args: + operation (str): defaults to "UPDATE", must be one of ["UPDATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + update_mask ([UpdateMaskFieldType], none_type): The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item.. [optional] # noqa: E501 + """ + + operation = kwargs.get('operation', "UPDATE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_upsert_creative_assets_item.py b/openapi_generated/pinterest_client/model/catalogs_upsert_creative_assets_item.py new file mode 100644 index 0000000..34b5e25 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_upsert_creative_assets_item.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_attributes import CatalogsCreativeAssetsAttributes + globals()['CatalogsCreativeAssetsAttributes'] = CatalogsCreativeAssetsAttributes + + +class CatalogsUpsertCreativeAssetsItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'UPSERT': "UPSERT", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'creative_assets_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + 'attributes': (CatalogsCreativeAssetsAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'creative_assets_id': 'creative_assets_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, creative_assets_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpsertCreativeAssetsItem - a model defined in OpenAPI + + Args: + creative_assets_id (str): The catalog creative assets id in the merchant namespace + attributes (CatalogsCreativeAssetsAttributes): + + Keyword Args: + operation (str): defaults to "UPSERT", must be one of ["UPSERT", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "UPSERT") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, creative_assets_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpsertCreativeAssetsItem - a model defined in OpenAPI + + Args: + creative_assets_id (str): The catalog creative assets id in the merchant namespace + attributes (CatalogsCreativeAssetsAttributes): + + Keyword Args: + operation (str): defaults to "UPSERT", must be one of ["UPSERT", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "UPSERT") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_upsert_hotel_item.py b/openapi_generated/pinterest_client/model/catalogs_upsert_hotel_item.py new file mode 100644 index 0000000..c74c996 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_upsert_hotel_item.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_hotel_attributes import CatalogsHotelAttributes + globals()['CatalogsHotelAttributes'] = CatalogsHotelAttributes + + +class CatalogsUpsertHotelItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'UPSERT': "UPSERT", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'hotel_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + 'attributes': (CatalogsHotelAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'hotel_id': 'hotel_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, hotel_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpsertHotelItem - a model defined in OpenAPI + + Args: + hotel_id (str): The catalog hotel id in the merchant namespace + attributes (CatalogsHotelAttributes): + + Keyword Args: + operation (str): defaults to "UPSERT", must be one of ["UPSERT", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "UPSERT") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, hotel_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpsertHotelItem - a model defined in OpenAPI + + Args: + hotel_id (str): The catalog hotel id in the merchant namespace + attributes (CatalogsHotelAttributes): + + Keyword Args: + operation (str): defaults to "UPSERT", must be one of ["UPSERT", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "UPSERT") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_upsert_retail_item.py b/openapi_generated/pinterest_client/model/catalogs_upsert_retail_item.py new file mode 100644 index 0000000..67247c7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_upsert_retail_item.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.item_attributes_request import ItemAttributesRequest + globals()['ItemAttributesRequest'] = ItemAttributesRequest + + +class CatalogsUpsertRetailItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation',): { + 'UPSERT': "UPSERT", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'operation': (str,), # noqa: E501 + 'attributes': (ItemAttributesRequest,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, item_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpsertRetailItem - a model defined in OpenAPI + + Args: + item_id (str): The catalog item id in the merchant namespace + attributes (ItemAttributesRequest): + + Keyword Args: + operation (str): defaults to "UPSERT", must be one of ["UPSERT", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "UPSERT") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, item_id, attributes, *args, **kwargs): # noqa: E501 + """CatalogsUpsertRetailItem - a model defined in OpenAPI + + Args: + item_id (str): The catalog item id in the merchant namespace + attributes (ItemAttributesRequest): + + Keyword Args: + operation (str): defaults to "UPSERT", must be one of ["UPSERT", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation = kwargs.get('operation', "UPSERT") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.item_id = item_id + self.operation = operation + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/catalogs_vertical_batch_request.py b/openapi_generated/pinterest_client/model/catalogs_vertical_batch_request.py new file mode 100644 index 0000000..118edcc --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_vertical_batch_request.py @@ -0,0 +1,363 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_batch_item import CatalogsCreativeAssetsBatchItem + from openapi_generated.pinterest_client.model.catalogs_creative_assets_batch_request import CatalogsCreativeAssetsBatchRequest + from openapi_generated.pinterest_client.model.catalogs_hotel_batch_request import CatalogsHotelBatchRequest + from openapi_generated.pinterest_client.model.catalogs_retail_batch_request import CatalogsRetailBatchRequest + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsCreativeAssetsBatchItem'] = CatalogsCreativeAssetsBatchItem + globals()['CatalogsCreativeAssetsBatchRequest'] = CatalogsCreativeAssetsBatchRequest + globals()['CatalogsHotelBatchRequest'] = CatalogsHotelBatchRequest + globals()['CatalogsRetailBatchRequest'] = CatalogsRetailBatchRequest + globals()['Country'] = Country + + +class CatalogsVerticalBatchRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('items',): { + 'max_items': 1000, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'language': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'items': ([CatalogsCreativeAssetsBatchItem],), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsBatchRequest, + 'CatalogsCreativeAssetsBatchRequest': CatalogsCreativeAssetsBatchRequest, + 'CatalogsHotelBatchRequest': CatalogsHotelBatchRequest, + 'CatalogsRetailBatchRequest': CatalogsRetailBatchRequest, + 'HOTEL': CatalogsHotelBatchRequest, + 'RETAIL': CatalogsRetailBatchRequest, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'language': 'language', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsVerticalBatchRequest - a model defined in OpenAPI + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values.. [optional] # noqa: E501 + items ([CatalogsCreativeAssetsBatchItem]): Array with creative assets item operations. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsVerticalBatchRequest - a model defined in OpenAPI + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets item. If not provided, default to oldest creative assets catalog. [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + language (bool, date, datetime, dict, float, int, list, str, none_type): We recommend using the CatalogsLocale values.. [optional] # noqa: E501 + items ([CatalogsCreativeAssetsBatchItem]): Array with creative assets item operations. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsBatchRequest, + CatalogsHotelBatchRequest, + CatalogsRetailBatchRequest, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_vertical_feeds_create_request.py b/openapi_generated/pinterest_client/model/catalogs_vertical_feeds_create_request.py new file mode 100644 index 0000000..73c4483 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_vertical_feeds_create_request.py @@ -0,0 +1,399 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_feeds_create_request import CatalogsCreativeAssetsFeedsCreateRequest + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_hotel_feeds_create_request import CatalogsHotelFeedsCreateRequest + from openapi_generated.pinterest_client.model.catalogs_retail_feeds_create_request import CatalogsRetailFeedsCreateRequest + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + from openapi_generated.pinterest_client.model.product_availability_type import ProductAvailabilityType + globals()['CatalogsCreativeAssetsFeedsCreateRequest'] = CatalogsCreativeAssetsFeedsCreateRequest + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsHotelFeedsCreateRequest'] = CatalogsHotelFeedsCreateRequest + globals()['CatalogsRetailFeedsCreateRequest'] = CatalogsRetailFeedsCreateRequest + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['Country'] = Country + globals()['NullableCurrency'] = NullableCurrency + globals()['ProductAvailabilityType'] = ProductAvailabilityType + + +class CatalogsVerticalFeedsCreateRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('location',): { + 'regex': { + 'pattern': r'^(http|https|ftp|sftp):\/\/', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'default_availability': (ProductAvailabilityType,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'catalog_id': (str, none_type,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'default_locale': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'default_country': (Country,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsFeedsCreateRequest, + 'CatalogsCreativeAssetsFeedsCreateRequest': CatalogsCreativeAssetsFeedsCreateRequest, + 'CatalogsHotelFeedsCreateRequest': CatalogsHotelFeedsCreateRequest, + 'CatalogsRetailFeedsCreateRequest': CatalogsRetailFeedsCreateRequest, + 'HOTEL': CatalogsHotelFeedsCreateRequest, + 'RETAIL': CatalogsRetailFeedsCreateRequest, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'default_availability': 'default_availability', # noqa: E501 + 'status': 'status', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'location': 'location', # noqa: E501 + 'default_country': 'default_country', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsVerticalFeedsCreateRequest - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. At the moment a catalog can not have multiple creative assets feeds but this will change in the future.. [optional] # noqa: E501 + name (str): A human-friendly name associated to a given feed.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + default_locale (bool, date, datetime, dict, float, int, list, str, none_type): The locale used within a feed for product descriptions.. [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + default_country (Country): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsVerticalFeedsCreateRequest - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. At the moment a catalog can not have multiple creative assets feeds but this will change in the future.. [optional] # noqa: E501 + name (str): A human-friendly name associated to a given feed.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + default_locale (bool, date, datetime, dict, float, int, list, str, none_type): The locale used within a feed for product descriptions.. [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + default_country (Country): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsFeedsCreateRequest, + CatalogsHotelFeedsCreateRequest, + CatalogsRetailFeedsCreateRequest, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_vertical_feeds_update_request.py b/openapi_generated/pinterest_client/model/catalogs_vertical_feeds_update_request.py new file mode 100644 index 0000000..36ae2a4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_vertical_feeds_update_request.py @@ -0,0 +1,380 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_feeds_update_request import CatalogsCreativeAssetsFeedsUpdateRequest + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_hotel_feeds_update_request import CatalogsHotelFeedsUpdateRequest + from openapi_generated.pinterest_client.model.catalogs_retail_feeds_update_request import CatalogsRetailFeedsUpdateRequest + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + from openapi_generated.pinterest_client.model.product_availability_type import ProductAvailabilityType + globals()['CatalogsCreativeAssetsFeedsUpdateRequest'] = CatalogsCreativeAssetsFeedsUpdateRequest + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsHotelFeedsUpdateRequest'] = CatalogsHotelFeedsUpdateRequest + globals()['CatalogsRetailFeedsUpdateRequest'] = CatalogsRetailFeedsUpdateRequest + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['NullableCurrency'] = NullableCurrency + globals()['ProductAvailabilityType'] = ProductAvailabilityType + + +class CatalogsVerticalFeedsUpdateRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('location',): { + 'regex': { + 'pattern': r'^(http|https|ftp|sftp):\/\/', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (CatalogsType,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'status': (CatalogsStatus,), # noqa: E501 + 'default_availability': (ProductAvailabilityType,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsFeedsUpdateRequest, + 'CatalogsCreativeAssetsFeedsUpdateRequest': CatalogsCreativeAssetsFeedsUpdateRequest, + 'CatalogsHotelFeedsUpdateRequest': CatalogsHotelFeedsUpdateRequest, + 'CatalogsRetailFeedsUpdateRequest': CatalogsRetailFeedsUpdateRequest, + 'HOTEL': CatalogsHotelFeedsUpdateRequest, + 'RETAIL': CatalogsRetailFeedsUpdateRequest, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'location': 'location', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'status': 'status', # noqa: E501 + 'default_availability': 'default_availability', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsVerticalFeedsUpdateRequest - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + name (str): A human-friendly name associated to a given feed.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + status (CatalogsStatus): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsVerticalFeedsUpdateRequest - a model defined in OpenAPI + + Keyword Args: + catalog_type (CatalogsType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_currency (NullableCurrency): [optional] # noqa: E501 + name (str): A human-friendly name associated to a given feed.. [optional] # noqa: E501 + format (CatalogsFormat): [optional] # noqa: E501 + credentials (CatalogsFeedCredentials): [optional] # noqa: E501 + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing.. [optional] # noqa: E501 + preferred_processing_schedule (CatalogsFeedProcessingSchedule): [optional] # noqa: E501 + status (CatalogsStatus): [optional] # noqa: E501 + default_availability (ProductAvailabilityType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsFeedsUpdateRequest, + CatalogsHotelFeedsUpdateRequest, + CatalogsRetailFeedsUpdateRequest, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_vertical_product_group.py b/openapi_generated/pinterest_client/model/catalogs_vertical_product_group.py new file mode 100644 index 0000000..7750c4a --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_vertical_product_group.py @@ -0,0 +1,407 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group import CatalogsCreativeAssetsProductGroup + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters import CatalogsCreativeAssetsProductGroupFilters + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group import CatalogsHotelProductGroup + from openapi_generated.pinterest_client.model.catalogs_product_group_status import CatalogsProductGroupStatus + from openapi_generated.pinterest_client.model.catalogs_product_group_type import CatalogsProductGroupType + from openapi_generated.pinterest_client.model.catalogs_retail_product_group import CatalogsRetailProductGroup + globals()['CatalogsCreativeAssetsProductGroup'] = CatalogsCreativeAssetsProductGroup + globals()['CatalogsCreativeAssetsProductGroupFilters'] = CatalogsCreativeAssetsProductGroupFilters + globals()['CatalogsHotelProductGroup'] = CatalogsHotelProductGroup + globals()['CatalogsProductGroupStatus'] = CatalogsProductGroupStatus + globals()['CatalogsProductGroupType'] = CatalogsProductGroupType + globals()['CatalogsRetailProductGroup'] = CatalogsRetailProductGroup + + +class CatalogsVerticalProductGroup(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('feed_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'is_featured': (bool,), # noqa: E501 + 'type': (CatalogsProductGroupType,), # noqa: E501 + 'status': (CatalogsProductGroupStatus,), # noqa: E501 + 'created_at': (int,), # noqa: E501 + 'updated_at': (int,), # noqa: E501 + 'country': (str, none_type,), # noqa: E501 + 'locale': (str, none_type,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'filters': (CatalogsCreativeAssetsProductGroupFilters,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'feed_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsProductGroup, + 'CatalogsCreativeAssetsProductGroup': CatalogsCreativeAssetsProductGroup, + 'CatalogsHotelProductGroup': CatalogsHotelProductGroup, + 'CatalogsRetailProductGroup': CatalogsRetailProductGroup, + 'HOTEL': CatalogsHotelProductGroup, + 'RETAIL': CatalogsRetailProductGroup, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'is_featured': 'is_featured', # noqa: E501 + 'type': 'type', # noqa: E501 + 'status': 'status', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'country': 'country', # noqa: E501 + 'locale': 'locale', # noqa: E501 + 'id': 'id', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'feed_id': 'feed_id', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsVerticalProductGroup - a model defined in OpenAPI + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Name of creative assets product group. [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + is_featured (bool): boolean indicator of whether the product group is being featured or not. [optional] # noqa: E501 + type (CatalogsProductGroupType): [optional] # noqa: E501 + status (CatalogsProductGroupStatus): [optional] # noqa: E501 + created_at (int): Unix timestamp in seconds of when catalog product group was created.. [optional] # noqa: E501 + updated_at (int): Unix timestamp in seconds of last time catalog product group was updated.. [optional] # noqa: E501 + country (str, none_type): [optional] # noqa: E501 + locale (str, none_type): [optional] # noqa: E501 + id (str): ID of the creative assets product group.. [optional] # noqa: E501 + filters (CatalogsCreativeAssetsProductGroupFilters): [optional] # noqa: E501 + catalog_id (str): Catalog id pertaining to the creative assets product group.. [optional] # noqa: E501 + feed_id (str, none_type): id of the catalogs feed belonging to this catalog product group. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsVerticalProductGroup - a model defined in OpenAPI + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Name of creative assets product group. [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + is_featured (bool): boolean indicator of whether the product group is being featured or not. [optional] # noqa: E501 + type (CatalogsProductGroupType): [optional] # noqa: E501 + status (CatalogsProductGroupStatus): [optional] # noqa: E501 + created_at (int): Unix timestamp in seconds of when catalog product group was created.. [optional] # noqa: E501 + updated_at (int): Unix timestamp in seconds of last time catalog product group was updated.. [optional] # noqa: E501 + country (str, none_type): [optional] # noqa: E501 + locale (str, none_type): [optional] # noqa: E501 + id (str): ID of the creative assets product group.. [optional] # noqa: E501 + filters (CatalogsCreativeAssetsProductGroupFilters): [optional] # noqa: E501 + catalog_id (str): Catalog id pertaining to the creative assets product group.. [optional] # noqa: E501 + feed_id (str, none_type): id of the catalogs feed belonging to this catalog product group. [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsProductGroup, + CatalogsHotelProductGroup, + CatalogsRetailProductGroup, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_vertical_product_group_create_request.py b/openapi_generated/pinterest_client/model/catalogs_vertical_product_group_create_request.py new file mode 100644 index 0000000..79fd7ae --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_vertical_product_group_create_request.py @@ -0,0 +1,369 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_create_request import CatalogsCreativeAssetsProductGroupCreateRequest + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters import CatalogsCreativeAssetsProductGroupFilters + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_create_request import CatalogsHotelProductGroupCreateRequest + from openapi_generated.pinterest_client.model.catalogs_locale import CatalogsLocale + from openapi_generated.pinterest_client.model.catalogs_retail_product_group_create_request import CatalogsRetailProductGroupCreateRequest + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsCreativeAssetsProductGroupCreateRequest'] = CatalogsCreativeAssetsProductGroupCreateRequest + globals()['CatalogsCreativeAssetsProductGroupFilters'] = CatalogsCreativeAssetsProductGroupFilters + globals()['CatalogsHotelProductGroupCreateRequest'] = CatalogsHotelProductGroupCreateRequest + globals()['CatalogsLocale'] = CatalogsLocale + globals()['CatalogsRetailProductGroupCreateRequest'] = CatalogsRetailProductGroupCreateRequest + globals()['Country'] = Country + + +class CatalogsVerticalProductGroupCreateRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'filters': (CatalogsCreativeAssetsProductGroupFilters,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'locale': (CatalogsLocale,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsProductGroupCreateRequest, + 'CatalogsCreativeAssetsProductGroupCreateRequest': CatalogsCreativeAssetsProductGroupCreateRequest, + 'CatalogsHotelProductGroupCreateRequest': CatalogsHotelProductGroupCreateRequest, + 'CatalogsRetailProductGroupCreateRequest': CatalogsRetailProductGroupCreateRequest, + 'HOTEL': CatalogsHotelProductGroupCreateRequest, + 'RETAIL': CatalogsRetailProductGroupCreateRequest, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'description': 'description', # noqa: E501 + 'name': 'name', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'country': 'country', # noqa: E501 + 'locale': 'locale', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsVerticalProductGroupCreateRequest - a model defined in OpenAPI + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str, none_type): [optional] # noqa: E501 + name (str): [optional] # noqa: E501 + filters (CatalogsCreativeAssetsProductGroupFilters): [optional] # noqa: E501 + catalog_id (str): Catalog id pertaining to the creative assets product group.. [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + locale (CatalogsLocale): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsVerticalProductGroupCreateRequest - a model defined in OpenAPI + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str, none_type): [optional] # noqa: E501 + name (str): [optional] # noqa: E501 + filters (CatalogsCreativeAssetsProductGroupFilters): [optional] # noqa: E501 + catalog_id (str): Catalog id pertaining to the creative assets product group.. [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + locale (CatalogsLocale): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsProductGroupCreateRequest, + CatalogsHotelProductGroupCreateRequest, + CatalogsRetailProductGroupCreateRequest, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_vertical_product_group_update_request.py b/openapi_generated/pinterest_client/model/catalogs_vertical_product_group_update_request.py new file mode 100644 index 0000000..733c6a2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_vertical_product_group_update_request.py @@ -0,0 +1,358 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters import CatalogsCreativeAssetsProductGroupFilters + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_update_request import CatalogsCreativeAssetsProductGroupUpdateRequest + from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_update_request import CatalogsHotelProductGroupUpdateRequest + from openapi_generated.pinterest_client.model.catalogs_locale import CatalogsLocale + from openapi_generated.pinterest_client.model.catalogs_retail_product_group_update_request import CatalogsRetailProductGroupUpdateRequest + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsCreativeAssetsProductGroupFilters'] = CatalogsCreativeAssetsProductGroupFilters + globals()['CatalogsCreativeAssetsProductGroupUpdateRequest'] = CatalogsCreativeAssetsProductGroupUpdateRequest + globals()['CatalogsHotelProductGroupUpdateRequest'] = CatalogsHotelProductGroupUpdateRequest + globals()['CatalogsLocale'] = CatalogsLocale + globals()['CatalogsRetailProductGroupUpdateRequest'] = CatalogsRetailProductGroupUpdateRequest + globals()['Country'] = Country + + +class CatalogsVerticalProductGroupUpdateRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'filters': (CatalogsCreativeAssetsProductGroupFilters,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'locale': (CatalogsLocale,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsProductGroupUpdateRequest, + 'CatalogsCreativeAssetsProductGroupUpdateRequest': CatalogsCreativeAssetsProductGroupUpdateRequest, + 'CatalogsHotelProductGroupUpdateRequest': CatalogsHotelProductGroupUpdateRequest, + 'CatalogsRetailProductGroupUpdateRequest': CatalogsRetailProductGroupUpdateRequest, + 'HOTEL': CatalogsHotelProductGroupUpdateRequest, + 'RETAIL': CatalogsRetailProductGroupUpdateRequest, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'country': 'country', # noqa: E501 + 'locale': 'locale', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsVerticalProductGroupUpdateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_type (str): [optional] if omitted the server will use the default value of "CREATIVE_ASSETS" # noqa: E501 + name (str): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + filters (CatalogsCreativeAssetsProductGroupFilters): [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + locale (CatalogsLocale): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsVerticalProductGroupUpdateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_type (str): [optional] if omitted the server will use the default value of "CREATIVE_ASSETS" # noqa: E501 + name (str): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + filters (CatalogsCreativeAssetsProductGroupFilters): [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + locale (CatalogsLocale): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsProductGroupUpdateRequest, + CatalogsHotelProductGroupUpdateRequest, + CatalogsRetailProductGroupUpdateRequest, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_verticals_list_products_by_catalog_based_filter_request.py b/openapi_generated/pinterest_client/model/catalogs_verticals_list_products_by_catalog_based_filter_request.py new file mode 100644 index 0000000..4bc358d --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_verticals_list_products_by_catalog_based_filter_request.py @@ -0,0 +1,361 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_creative_assets_list_products_by_catalog_based_filter_request import CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest + from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters import CatalogsCreativeAssetsProductGroupFilters + from openapi_generated.pinterest_client.model.catalogs_hotel_list_products_by_catalog_based_filter_request import CatalogsHotelListProductsByCatalogBasedFilterRequest + from openapi_generated.pinterest_client.model.catalogs_locale import CatalogsLocale + from openapi_generated.pinterest_client.model.catalogs_retail_list_products_by_catalog_based_filter_request import CatalogsRetailListProductsByCatalogBasedFilterRequest + from openapi_generated.pinterest_client.model.country import Country + globals()['CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest'] = CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest + globals()['CatalogsCreativeAssetsProductGroupFilters'] = CatalogsCreativeAssetsProductGroupFilters + globals()['CatalogsHotelListProductsByCatalogBasedFilterRequest'] = CatalogsHotelListProductsByCatalogBasedFilterRequest + globals()['CatalogsLocale'] = CatalogsLocale + globals()['CatalogsRetailListProductsByCatalogBasedFilterRequest'] = CatalogsRetailListProductsByCatalogBasedFilterRequest + globals()['Country'] = Country + + +class CatalogsVerticalsListProductsByCatalogBasedFilterRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('catalog_type',): { + 'CREATIVE_ASSETS': "CREATIVE_ASSETS", + }, + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'catalog_type': (str,), # noqa: E501 + 'catalog_id': (str,), # noqa: E501 + 'filters': (CatalogsCreativeAssetsProductGroupFilters,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'locale': (CatalogsLocale,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest, + 'CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest': CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest, + 'CatalogsHotelListProductsByCatalogBasedFilterRequest': CatalogsHotelListProductsByCatalogBasedFilterRequest, + 'CatalogsRetailListProductsByCatalogBasedFilterRequest': CatalogsRetailListProductsByCatalogBasedFilterRequest, + 'HOTEL': CatalogsHotelListProductsByCatalogBasedFilterRequest, + 'RETAIL': CatalogsRetailListProductsByCatalogBasedFilterRequest, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'country': 'country', # noqa: E501 + 'locale': 'locale', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsVerticalsListProductsByCatalogBasedFilterRequest - a model defined in OpenAPI + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets product group.. [optional] # noqa: E501 + filters (CatalogsCreativeAssetsProductGroupFilters): [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + locale (CatalogsLocale): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CatalogsVerticalsListProductsByCatalogBasedFilterRequest - a model defined in OpenAPI + + Keyword Args: + catalog_type (str): defaults to "CREATIVE_ASSETS", must be one of ["CREATIVE_ASSETS", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + catalog_id (str): Catalog id pertaining to the creative assets product group.. [optional] # noqa: E501 + filters (CatalogsCreativeAssetsProductGroupFilters): [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + locale (CatalogsLocale): [optional] # noqa: E501 + """ + + catalog_type = kwargs.get('catalog_type', "CREATIVE_ASSETS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest, + CatalogsHotelListProductsByCatalogBasedFilterRequest, + CatalogsRetailListProductsByCatalogBasedFilterRequest, + ], + } diff --git a/openapi_generated/pinterest_client/model/condition_filter.py b/openapi_generated/pinterest_client/model/condition_filter.py index 5afce0e..68bf32a 100644 --- a/openapi_generated/pinterest_client/model/condition_filter.py +++ b/openapi_generated/pinterest_client/model/condition_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_api_response.py b/openapi_generated/pinterest_client/model/conversion_api_response.py index f48fb68..b4c8e64 100644 --- a/openapi_generated/pinterest_client/model/conversion_api_response.py +++ b/openapi_generated/pinterest_client/model/conversion_api_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_api_response_events.py b/openapi_generated/pinterest_client/model/conversion_api_response_events.py index bd48481..71c4227 100644 --- a/openapi_generated/pinterest_client/model/conversion_api_response_events.py +++ b/openapi_generated/pinterest_client/model/conversion_api_response_events.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_attribution_window_days.py b/openapi_generated/pinterest_client/model/conversion_attribution_window_days.py index 6f3f949..8f46bc9 100644 --- a/openapi_generated/pinterest_client/model/conversion_attribution_window_days.py +++ b/openapi_generated/pinterest_client/model/conversion_attribution_window_days.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_event_response.py b/openapi_generated/pinterest_client/model/conversion_event_response.py index c616a32..a5b20ba 100644 --- a/openapi_generated/pinterest_client/model/conversion_event_response.py +++ b/openapi_generated/pinterest_client/model/conversion_event_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_events.py b/openapi_generated/pinterest_client/model/conversion_events.py index 295581f..466b27a 100644 --- a/openapi_generated/pinterest_client/model/conversion_events.py +++ b/openapi_generated/pinterest_client/model/conversion_events.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_events_custom_data.py b/openapi_generated/pinterest_client/model/conversion_events_custom_data.py index 35dfe3f..91ab196 100644 --- a/openapi_generated/pinterest_client/model/conversion_events_custom_data.py +++ b/openapi_generated/pinterest_client/model/conversion_events_custom_data.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -173,7 +173,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 num_items (int): Total number of products of the event. For example, the total number of items purchased in a checkout event. We recommend using this if you are a merchant for AddToCart and Checkouts. For detail, please check here (Install the Pinterest tag section).. [optional] # noqa: E501 order_id (str, none_type): The order ID. We recommend sending order_id to help us deduplicate events when necessary. This also helps to run other measurement products at Pinterest.. [optional] # noqa: E501 search_string (str, none_type): The search string related to the user conversion event.. [optional] # noqa: E501 - opt_out_type (str, none_type): Flags for different privacy rights laws to opt out users of sharing personal information. Values should be comma separated. Please follow the Help Center and dev site for specific opt_out_type set up.. [optional] # noqa: E501 + opt_out_type (str, none_type): Flags for different privacy rights laws to opt out users of sharing personal information. Values should be comma separated. Please follow the Help Center and dev site for specific opt_out_type set up.. [optional] # noqa: E501 np (str, none_type): Named partner. Not required, this is for Pinterest internal use only. Please do not use this unless specifically guided.. [optional] # noqa: E501 """ @@ -266,7 +266,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 num_items (int): Total number of products of the event. For example, the total number of items purchased in a checkout event. We recommend using this if you are a merchant for AddToCart and Checkouts. For detail, please check here (Install the Pinterest tag section).. [optional] # noqa: E501 order_id (str, none_type): The order ID. We recommend sending order_id to help us deduplicate events when necessary. This also helps to run other measurement products at Pinterest.. [optional] # noqa: E501 search_string (str, none_type): The search string related to the user conversion event.. [optional] # noqa: E501 - opt_out_type (str, none_type): Flags for different privacy rights laws to opt out users of sharing personal information. Values should be comma separated. Please follow the Help Center and dev site for specific opt_out_type set up.. [optional] # noqa: E501 + opt_out_type (str, none_type): Flags for different privacy rights laws to opt out users of sharing personal information. Values should be comma separated. Please follow the Help Center and dev site for specific opt_out_type set up.. [optional] # noqa: E501 np (str, none_type): Named partner. Not required, this is for Pinterest internal use only. Please do not use this unless specifically guided.. [optional] # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/conversion_events_custom_data_contents.py b/openapi_generated/pinterest_client/model/conversion_events_custom_data_contents.py index a7d634c..c5b9bb8 100644 --- a/openapi_generated/pinterest_client/model/conversion_events_custom_data_contents.py +++ b/openapi_generated/pinterest_client/model/conversion_events_custom_data_contents.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -85,6 +85,9 @@ def openapi_types(): 'id': (str,), # noqa: E501 'item_price': (str,), # noqa: E501 'quantity': (int,), # noqa: E501 + 'item_name': (str,), # noqa: E501 + 'item_category': (str,), # noqa: E501 + 'item_brand': (str,), # noqa: E501 } @cached_property @@ -96,6 +99,9 @@ def discriminator(): 'id': 'id', # noqa: E501 'item_price': 'item_price', # noqa: E501 'quantity': 'quantity', # noqa: E501 + 'item_name': 'item_name', # noqa: E501 + 'item_category': 'item_category', # noqa: E501 + 'item_brand': 'item_brand', # noqa: E501 } read_only_vars = { @@ -142,6 +148,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 id (str): The id of a product. We recommend using this if you are a merchant for AddToCart and Checkouts. For detail, please check here (Install the Pinterest tag section).. [optional] # noqa: E501 item_price (str): The price of a product. Accepted as a string in the request; it will be parsed into a double. This is the original item value before any discount. We recommend using this if you are a merchant for PageVisit, AddToCart and Checkouts. For detail, please check here (Install the Pinterest tag section).. [optional] # noqa: E501 quantity (int): The amount of a product. We recommend using this if you are a merchant for AddToCart and Checkouts. For detail, please check here (Install the Pinterest tag section).. [optional] # noqa: E501 + item_name (str): The name of a product.. [optional] # noqa: E501 + item_category (str): The category of a product.. [optional] # noqa: E501 + item_brand (str): The brand of a product.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -226,6 +235,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 id (str): The id of a product. We recommend using this if you are a merchant for AddToCart and Checkouts. For detail, please check here (Install the Pinterest tag section).. [optional] # noqa: E501 item_price (str): The price of a product. Accepted as a string in the request; it will be parsed into a double. This is the original item value before any discount. We recommend using this if you are a merchant for PageVisit, AddToCart and Checkouts. For detail, please check here (Install the Pinterest tag section).. [optional] # noqa: E501 quantity (int): The amount of a product. We recommend using this if you are a merchant for AddToCart and Checkouts. For detail, please check here (Install the Pinterest tag section).. [optional] # noqa: E501 + item_name (str): The name of a product.. [optional] # noqa: E501 + item_category (str): The category of a product.. [optional] # noqa: E501 + item_brand (str): The brand of a product.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/conversion_events_data.py b/openapi_generated/pinterest_client/model/conversion_events_data.py index f863070..5d61b56 100644 --- a/openapi_generated/pinterest_client/model/conversion_events_data.py +++ b/openapi_generated/pinterest_client/model/conversion_events_data.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -149,8 +149,8 @@ def _from_openapi_data(cls, event_name, action_source, event_time, event_id, use """ConversionEventsData - a model defined in OpenAPI Args: - event_name (str): The type of the user event. Please use the right event_name otherwise the event won’t be accepted and show up correctly in reports.
  • add_to_cart
  • checkout
  • custom
  • lead
  • page_visit
  • search
  • signup
  • view_category
  • watch_video - action_source (str): The source indicating where the conversion event occurred.
  • app_android
  • app_ios
  • web
  • offline + event_name (str):

    The type of the user event. Please use the right event_name otherwise the event won't be accepted and show up correctly in reports.

    + action_source (str):

    The source indicating where the conversion event occurred.

    event_time (int): The time when the event happened. Unix timestamp in seconds. event_id (str): A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking. Without this, event's data is likely to be double counted and will cause report metric inflation. Third-party vendors make sure this field is updated on both Pinterest tag and Conversions API side before rolling out template for Conversions API. user_data (ConversionEventsUserData): @@ -256,8 +256,8 @@ def __init__(self, event_name, action_source, event_time, event_id, user_data, * """ConversionEventsData - a model defined in OpenAPI Args: - event_name (str): The type of the user event. Please use the right event_name otherwise the event won’t be accepted and show up correctly in reports.
  • add_to_cart
  • checkout
  • custom
  • lead
  • page_visit
  • search
  • signup
  • view_category
  • watch_video - action_source (str): The source indicating where the conversion event occurred.
  • app_android
  • app_ios
  • web
  • offline + event_name (str):

    The type of the user event. Please use the right event_name otherwise the event won't be accepted and show up correctly in reports.

    + action_source (str):

    The source indicating where the conversion event occurred.

    event_time (int): The time when the event happened. Unix timestamp in seconds. event_id (str): A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking. Without this, event's data is likely to be double counted and will cause report metric inflation. Third-party vendors make sure this field is updated on both Pinterest tag and Conversions API side before rolling out template for Conversions API. user_data (ConversionEventsUserData): diff --git a/openapi_generated/pinterest_client/model/conversion_events_user_data.py b/openapi_generated/pinterest_client/model/conversion_events_user_data.py index a900987..8e798e1 100644 --- a/openapi_generated/pinterest_client/model/conversion_events_user_data.py +++ b/openapi_generated/pinterest_client/model/conversion_events_user_data.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -107,6 +107,7 @@ def openapi_types(): 'country': ([str],), # noqa: E501 'external_id': ([str],), # noqa: E501 'click_id': (str, none_type,), # noqa: E501 + 'partner_id': (str, none_type,), # noqa: E501 } @cached_property @@ -130,6 +131,7 @@ def discriminator(): 'country': 'country', # noqa: E501 'external_id': 'external_id', # noqa: E501 'click_id': 'click_id', # noqa: E501 + 'partner_id': 'partner_id', # noqa: E501 } read_only_vars = { @@ -141,8 +143,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ConversionEventsUserData - a model defined in OpenAPI Keyword Args: - em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. - hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. + em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. + hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. client_ip_address (str): The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. client_user_agent (str): The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. _check_type (bool): if True, values for parameters in openapi_types @@ -175,17 +177,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - ph ([str]): Sha256 hashes of user's phone numbers, only digits with country code, area code, and number. Remove any symbols, letters, spaces and leading zeros. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 - ge ([str]): Sha256 hashes of user's gender, in lowercase. Either \"f\" or \"m\" or \"n\" for non-binary gender.. [optional] # noqa: E501 - db ([str]): Sha256 hashes of user's date of birthday, given as year, month, and day.. [optional] # noqa: E501 - ln ([str]): Sha256 hashes of user's last name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 - fn ([str]): Sha256 hashes of user's first name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 - ct ([str]): Sha256 hashes of user's city, in lowercase, and without spaces or punctuation. User residency city (mostly billing).. [optional] # noqa: E501 - st ([str]): Sha256 hashes of user's state, given as a two-letter code in lowercase. User residency state (mostly billing).. [optional] # noqa: E501 - zp ([str]): Sha256 hashes of user's zipcode, only digits. User residency zipcode (mostly billing).. [optional] # noqa: E501 - country ([str]): Sha256 hashes of two-character ISO-3166 country code indicating the user's country, in lowercase.. [optional] # noqa: E501 - external_id ([str]): Sha256 hashes of the unique id from the advertiser that identifies a user in their space, e.g. user id, loyalty id, etc. We highly recommend this on all events. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 + ph ([str]): Sha256 hashes of user's phone numbers, only digits with country code, area code, and number. Remove any symbols, letters, spaces and leading zeros. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 + ge ([str]): Sha256 hashes of user's gender, in lowercase. Either \"f\" or \"m\" or \"n\" for non-binary gender. The string should be in the UTF-8 format.. [optional] # noqa: E501 + db ([str]): Sha256 hashes of user's date of birthday, given as year, month, and day. The string should be in the UTF-8 format.. [optional] # noqa: E501 + ln ([str]): Sha256 hashes of user's last name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 + fn ([str]): Sha256 hashes of user's first name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 + ct ([str]): Sha256 hashes of user's city, in lowercase, and without spaces or punctuation. User residency city (mostly billing). The string should be in the UTF-8 format.. [optional] # noqa: E501 + st ([str]): Sha256 hashes of user's state, given as a two-letter code in lowercase. User residency state (mostly billing). The string should be in the UTF-8 format.. [optional] # noqa: E501 + zp ([str]): Sha256 hashes of user's zipcode, only digits. User residency zipcode (mostly billing). The string should be in the UTF-8 format.. [optional] # noqa: E501 + country ([str]): Sha256 hashes of two-character ISO-3166 country code indicating the user's country, in lowercase. The string should be in the UTF-8 format.. [optional] # noqa: E501 + external_id ([str]): Sha256 hashes of the unique id from the advertiser that identifies a user in their space, e.g. user id, loyalty id, etc. We highly recommend this on all events. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 click_id (str, none_type): The unique identifier stored in _epik cookie on your domain or &epik= query parameter in the URL. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 + partner_id (str, none_type): A unique identifier of visitors' information defined by third party partners. e.g RampID. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -255,8 +258,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 """ConversionEventsUserData - a model defined in OpenAPI Keyword Args: - em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. - hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. + em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. + hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. client_ip_address (str): The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. client_user_agent (str): The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA. _check_type (bool): if True, values for parameters in openapi_types @@ -289,17 +292,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - ph ([str]): Sha256 hashes of user's phone numbers, only digits with country code, area code, and number. Remove any symbols, letters, spaces and leading zeros. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 - ge ([str]): Sha256 hashes of user's gender, in lowercase. Either \"f\" or \"m\" or \"n\" for non-binary gender.. [optional] # noqa: E501 - db ([str]): Sha256 hashes of user's date of birthday, given as year, month, and day.. [optional] # noqa: E501 - ln ([str]): Sha256 hashes of user's last name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 - fn ([str]): Sha256 hashes of user's first name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 - ct ([str]): Sha256 hashes of user's city, in lowercase, and without spaces or punctuation. User residency city (mostly billing).. [optional] # noqa: E501 - st ([str]): Sha256 hashes of user's state, given as a two-letter code in lowercase. User residency state (mostly billing).. [optional] # noqa: E501 - zp ([str]): Sha256 hashes of user's zipcode, only digits. User residency zipcode (mostly billing).. [optional] # noqa: E501 - country ([str]): Sha256 hashes of two-character ISO-3166 country code indicating the user's country, in lowercase.. [optional] # noqa: E501 - external_id ([str]): Sha256 hashes of the unique id from the advertiser that identifies a user in their space, e.g. user id, loyalty id, etc. We highly recommend this on all events. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 + ph ([str]): Sha256 hashes of user's phone numbers, only digits with country code, area code, and number. Remove any symbols, letters, spaces and leading zeros. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 + ge ([str]): Sha256 hashes of user's gender, in lowercase. Either \"f\" or \"m\" or \"n\" for non-binary gender. The string should be in the UTF-8 format.. [optional] # noqa: E501 + db ([str]): Sha256 hashes of user's date of birthday, given as year, month, and day. The string should be in the UTF-8 format.. [optional] # noqa: E501 + ln ([str]): Sha256 hashes of user's last name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 + fn ([str]): Sha256 hashes of user's first name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 + ct ([str]): Sha256 hashes of user's city, in lowercase, and without spaces or punctuation. User residency city (mostly billing). The string should be in the UTF-8 format.. [optional] # noqa: E501 + st ([str]): Sha256 hashes of user's state, given as a two-letter code in lowercase. User residency state (mostly billing). The string should be in the UTF-8 format.. [optional] # noqa: E501 + zp ([str]): Sha256 hashes of user's zipcode, only digits. User residency zipcode (mostly billing). The string should be in the UTF-8 format.. [optional] # noqa: E501 + country ([str]): Sha256 hashes of two-character ISO-3166 country code indicating the user's country, in lowercase. The string should be in the UTF-8 format.. [optional] # noqa: E501 + external_id ([str]): Sha256 hashes of the unique id from the advertiser that identifies a user in their space, e.g. user id, loyalty id, etc. We highly recommend this on all events. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 click_id (str, none_type): The unique identifier stored in _epik cookie on your domain or &epik= query parameter in the URL. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 + partner_id (str, none_type): A unique identifier of visitors' information defined by third party partners. e.g RampID. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of.py b/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of.py index a424c4d..415e1e1 100644 --- a/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of.py +++ b/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -111,7 +111,7 @@ def _from_openapi_data(cls, em, *args, **kwargs): # noqa: E501 """ConversionEventsUserDataAnyOf - a model defined in OpenAPI Args: - em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. + em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -144,7 +144,7 @@ def _from_openapi_data(cls, em, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 + hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 client_ip_address (str): The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 client_user_agent (str): The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 """ @@ -199,7 +199,7 @@ def __init__(self, em, *args, **kwargs): # noqa: E501 """ConversionEventsUserDataAnyOf - a model defined in OpenAPI Args: - em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. + em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -232,7 +232,7 @@ def __init__(self, em, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 + hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 client_ip_address (str): The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 client_user_agent (str): The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of1.py b/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of1.py index 9826163..dd3b416 100644 --- a/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of1.py +++ b/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of1.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -111,7 +111,7 @@ def _from_openapi_data(cls, hashed_maids, *args, **kwargs): # noqa: E501 """ConversionEventsUserDataAnyOf1 - a model defined in OpenAPI Args: - hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. + hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -144,7 +144,7 @@ def _from_openapi_data(cls, hashed_maids, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 + em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 client_ip_address (str): The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 client_user_agent (str): The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 """ @@ -199,7 +199,7 @@ def __init__(self, hashed_maids, *args, **kwargs): # noqa: E501 """ConversionEventsUserDataAnyOf1 - a model defined in OpenAPI Args: - hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. + hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -232,7 +232,7 @@ def __init__(self, hashed_maids, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 + em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 client_ip_address (str): The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 client_user_agent (str): The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of2.py b/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of2.py index 9c737c2..f3d6071 100644 --- a/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of2.py +++ b/openapi_generated/pinterest_client/model/conversion_events_user_data_any_of2.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -145,8 +145,8 @@ def _from_openapi_data(cls, client_ip_address, client_user_agent, *args, **kwarg Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 - hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 + em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 + hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -234,8 +234,8 @@ def __init__(self, client_ip_address, client_user_agent, *args, **kwargs): # no Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 - hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.. [optional] # noqa: E501 + em ([str]): Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 + hashed_maids ([str]): Sha256 hashes of user's \"Google Advertising IDs\" (GAIDs) or \"Apple's Identifier for Advertisers\" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. The string should be in the UTF-8 format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/conversion_report_attribution_type.py b/openapi_generated/pinterest_client/model/conversion_report_attribution_type.py index 38246e7..71da044 100644 --- a/openapi_generated/pinterest_client/model/conversion_report_attribution_type.py +++ b/openapi_generated/pinterest_client/model/conversion_report_attribution_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_report_time_type.py b/openapi_generated/pinterest_client/model/conversion_report_time_type.py index 839d6af..c5f82a1 100644 --- a/openapi_generated/pinterest_client/model/conversion_report_time_type.py +++ b/openapi_generated/pinterest_client/model/conversion_report_time_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_tag_common.py b/openapi_generated/pinterest_client/model/conversion_tag_common.py index 332ce83..a78e7e3 100644 --- a/openapi_generated/pinterest_client/model/conversion_tag_common.py +++ b/openapi_generated/pinterest_client/model/conversion_tag_common.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_tag_configs.py b/openapi_generated/pinterest_client/model/conversion_tag_configs.py index a5b33b0..169d88e 100644 --- a/openapi_generated/pinterest_client/model/conversion_tag_configs.py +++ b/openapi_generated/pinterest_client/model/conversion_tag_configs.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_tag_create.py b/openapi_generated/pinterest_client/model/conversion_tag_create.py index de68c03..e4c2d11 100644 --- a/openapi_generated/pinterest_client/model/conversion_tag_create.py +++ b/openapi_generated/pinterest_client/model/conversion_tag_create.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_tag_list_response.py b/openapi_generated/pinterest_client/model/conversion_tag_list_response.py index 8b5be91..9b5e4c2 100644 --- a/openapi_generated/pinterest_client/model/conversion_tag_list_response.py +++ b/openapi_generated/pinterest_client/model/conversion_tag_list_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_tag_response.py b/openapi_generated/pinterest_client/model/conversion_tag_response.py index c714857..69dd759 100644 --- a/openapi_generated/pinterest_client/model/conversion_tag_response.py +++ b/openapi_generated/pinterest_client/model/conversion_tag_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_tag_type.py b/openapi_generated/pinterest_client/model/conversion_tag_type.py index bcfc121..5820c2e 100644 --- a/openapi_generated/pinterest_client/model/conversion_tag_type.py +++ b/openapi_generated/pinterest_client/model/conversion_tag_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/conversion_tags_ocpm_eligible_response.py b/openapi_generated/pinterest_client/model/conversion_tags_ocpm_eligible_response.py index c40f8cf..1a48954 100644 --- a/openapi_generated/pinterest_client/model/conversion_tags_ocpm_eligible_response.py +++ b/openapi_generated/pinterest_client/model/conversion_tags_ocpm_eligible_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/country.py b/openapi_generated/pinterest_client/model/country.py index d4fae6f..14923b3 100644 --- a/openapi_generated/pinterest_client/model/country.py +++ b/openapi_generated/pinterest_client/model/country.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/country_filter.py b/openapi_generated/pinterest_client/model/country_filter.py new file mode 100644 index 0000000..a39aa14 --- /dev/null +++ b/openapi_generated/pinterest_client/model/country_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_countries_criteria import CatalogsProductGroupMultipleCountriesCriteria + globals()['CatalogsProductGroupMultipleCountriesCriteria'] = CatalogsProductGroupMultipleCountriesCriteria + + +class CountryFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'country': (CatalogsProductGroupMultipleCountriesCriteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'country': 'COUNTRY', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, country, *args, **kwargs): # noqa: E501 + """CountryFilter - a model defined in OpenAPI + + Args: + country (CatalogsProductGroupMultipleCountriesCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.country = country + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, country, *args, **kwargs): # noqa: E501 + """CountryFilter - a model defined in OpenAPI + + Args: + country (CatalogsProductGroupMultipleCountriesCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.country = country + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_asset_access_request_body.py b/openapi_generated/pinterest_client/model/create_asset_access_request_body.py new file mode 100644 index 0000000..a75131c --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_asset_access_request_body.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.create_asset_access_request_body_asset_requests import CreateAssetAccessRequestBodyAssetRequests + globals()['CreateAssetAccessRequestBodyAssetRequests'] = CreateAssetAccessRequestBodyAssetRequests + + +class CreateAssetAccessRequestBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_requests',): { + 'max_items': 100, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_requests': ([CreateAssetAccessRequestBodyAssetRequests],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_requests': 'asset_requests', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, asset_requests, *args, **kwargs): # noqa: E501 + """CreateAssetAccessRequestBody - a model defined in OpenAPI + + Args: + asset_requests ([CreateAssetAccessRequestBodyAssetRequests]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_requests = asset_requests + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, asset_requests, *args, **kwargs): # noqa: E501 + """CreateAssetAccessRequestBody - a model defined in OpenAPI + + Args: + asset_requests ([CreateAssetAccessRequestBodyAssetRequests]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_requests = asset_requests + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_asset_access_request_body_asset_requests.py b/openapi_generated/pinterest_client/model/create_asset_access_request_body_asset_requests.py new file mode 100644 index 0000000..322548b --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_asset_access_request_body_asset_requests.py @@ -0,0 +1,279 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_id_to_permissions import AssetIdToPermissions + globals()['AssetIdToPermissions'] = AssetIdToPermissions + + +class CreateAssetAccessRequestBodyAssetRequests(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('partner_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'partner_id': (str,), # noqa: E501 + 'asset_id_to_permissions': (AssetIdToPermissions,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'partner_id': 'partner_id', # noqa: E501 + 'asset_id_to_permissions': 'asset_id_to_permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, partner_id, asset_id_to_permissions, *args, **kwargs): # noqa: E501 + """CreateAssetAccessRequestBodyAssetRequests - a model defined in OpenAPI + + Args: + partner_id (str): Unique identifier of a business partner to request asset access to. + asset_id_to_permissions (AssetIdToPermissions): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.partner_id = partner_id + self.asset_id_to_permissions = asset_id_to_permissions + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, partner_id, asset_id_to_permissions, *args, **kwargs): # noqa: E501 + """CreateAssetAccessRequestBodyAssetRequests - a model defined in OpenAPI + + Args: + partner_id (str): Unique identifier of a business partner to request asset access to. + asset_id_to_permissions (AssetIdToPermissions): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.partner_id = partner_id + self.asset_id_to_permissions = asset_id_to_permissions + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_asset_access_request_error_message.py b/openapi_generated/pinterest_client/model/create_asset_access_request_error_message.py new file mode 100644 index 0000000..0b97b7a --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_asset_access_request_error_message.py @@ -0,0 +1,279 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CreateAssetAccessRequestErrorMessage(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """CreateAssetAccessRequestErrorMessage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type): A list of errors associated with the asset access requests. Will be returned if there is an error.. # noqa: E501 + + Keyword Args: + value ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type): A list of errors associated with the asset access requests. Will be returned if there is an error.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """CreateAssetAccessRequestErrorMessage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type): A list of errors associated with the asset access requests. Will be returned if there is an error.. # noqa: E501 + + Keyword Args: + value ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type): A list of errors associated with the asset access requests. Will be returned if there is an error.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/create_asset_access_request_response.py b/openapi_generated/pinterest_client/model/create_asset_access_request_response.py new file mode 100644 index 0000000..9eeea6c --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_asset_access_request_response.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.create_asset_access_request_error_message import CreateAssetAccessRequestErrorMessage + globals()['CreateAssetAccessRequestErrorMessage'] = CreateAssetAccessRequestErrorMessage + + +class CreateAssetAccessRequestResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'exceptions': (CreateAssetAccessRequestErrorMessage,), # noqa: E501 + 'invites': ({str: (str,)}, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'exceptions': 'exceptions', # noqa: E501 + 'invites': 'invites', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreateAssetAccessRequestResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exceptions (CreateAssetAccessRequestErrorMessage): [optional] # noqa: E501 + invites ({str: (str,)}, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CreateAssetAccessRequestResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exceptions (CreateAssetAccessRequestErrorMessage): [optional] # noqa: E501 + invites ({str: (str,)}, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_asset_group_body.py b/openapi_generated/pinterest_client/model/create_asset_group_body.py new file mode 100644 index 0000000..7430f02 --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_asset_group_body.py @@ -0,0 +1,280 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_group_types import AssetGroupTypes + globals()['AssetGroupTypes'] = AssetGroupTypes + + +class CreateAssetGroupBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_group_name': (str,), # noqa: E501 + 'asset_group_description': (str,), # noqa: E501 + 'asset_group_types': (AssetGroupTypes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_group_name': 'asset_group_name', # noqa: E501 + 'asset_group_description': 'asset_group_description', # noqa: E501 + 'asset_group_types': 'asset_group_types', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, asset_group_name, asset_group_description, asset_group_types, *args, **kwargs): # noqa: E501 + """CreateAssetGroupBody - a model defined in OpenAPI + + Args: + asset_group_name (str): Asset Group name + asset_group_description (str): Asset group description + asset_group_types (AssetGroupTypes): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_group_name = asset_group_name + self.asset_group_description = asset_group_description + self.asset_group_types = asset_group_types + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, asset_group_name, asset_group_description, asset_group_types, *args, **kwargs): # noqa: E501 + """CreateAssetGroupBody - a model defined in OpenAPI + + Args: + asset_group_name (str): Asset Group name + asset_group_description (str): Asset group description + asset_group_types (AssetGroupTypes): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_group_name = asset_group_name + self.asset_group_description = asset_group_description + self.asset_group_types = asset_group_types + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_asset_group_response.py b/openapi_generated/pinterest_client/model/create_asset_group_response.py new file mode 100644 index 0000000..42d4e1a --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_asset_group_response.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_group_binding import AssetGroupBinding + globals()['AssetGroupBinding'] = AssetGroupBinding + + +class CreateAssetGroupResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_group': (AssetGroupBinding,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_group': 'asset_group', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreateAssetGroupResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_group (AssetGroupBinding): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CreateAssetGroupResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_group (AssetGroupBinding): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_asset_invites_request.py b/openapi_generated/pinterest_client/model/create_asset_invites_request.py new file mode 100644 index 0000000..8eace08 --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_asset_invites_request.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.create_asset_invites_request_item import CreateAssetInvitesRequestItem + globals()['CreateAssetInvitesRequestItem'] = CreateAssetInvitesRequestItem + + +class CreateAssetInvitesRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('invites',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'invites': ([CreateAssetInvitesRequestItem],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'invites': 'invites', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, invites, *args, **kwargs): # noqa: E501 + """CreateAssetInvitesRequest - a model defined in OpenAPI + + Args: + invites ([CreateAssetInvitesRequestItem]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.invites = invites + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, invites, *args, **kwargs): # noqa: E501 + """CreateAssetInvitesRequest - a model defined in OpenAPI + + Args: + invites ([CreateAssetInvitesRequestItem]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.invites = invites + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_asset_invites_request_item.py b/openapi_generated/pinterest_client/model/create_asset_invites_request_item.py new file mode 100644 index 0000000..9f62c0d --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_asset_invites_request_item.py @@ -0,0 +1,287 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_id_to_permissions import AssetIdToPermissions + from openapi_generated.pinterest_client.model.invite_type import InviteType + globals()['AssetIdToPermissions'] = AssetIdToPermissions + globals()['InviteType'] = InviteType + + +class CreateAssetInvitesRequestItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('invite_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'invite_id': (str,), # noqa: E501 + 'invite_type': (InviteType,), # noqa: E501 + 'asset_id_to_permissions': (AssetIdToPermissions,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'invite_id': 'invite_id', # noqa: E501 + 'invite_type': 'invite_type', # noqa: E501 + 'asset_id_to_permissions': 'asset_id_to_permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, invite_id, invite_type, asset_id_to_permissions, *args, **kwargs): # noqa: E501 + """CreateAssetInvitesRequestItem - a model defined in OpenAPI + + Args: + invite_id (str): Unique identifier of an invite. + invite_type (InviteType): + asset_id_to_permissions (AssetIdToPermissions): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.invite_id = invite_id + self.invite_type = invite_type + self.asset_id_to_permissions = asset_id_to_permissions + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, invite_id, invite_type, asset_id_to_permissions, *args, **kwargs): # noqa: E501 + """CreateAssetInvitesRequestItem - a model defined in OpenAPI + + Args: + invite_id (str): Unique identifier of an invite. + invite_type (InviteType): + asset_id_to_permissions (AssetIdToPermissions): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.invite_id = invite_id + self.invite_type = invite_type + self.asset_id_to_permissions = asset_id_to_permissions + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_invites_results_response_array.py b/openapi_generated/pinterest_client/model/create_invites_results_response_array.py new file mode 100644 index 0000000..6ad1899 --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_invites_results_response_array.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.create_invites_results_response_array_items import CreateInvitesResultsResponseArrayItems + globals()['CreateInvitesResultsResponseArrayItems'] = CreateInvitesResultsResponseArrayItems + + +class CreateInvitesResultsResponseArray(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([CreateInvitesResultsResponseArrayItems],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreateInvitesResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([CreateInvitesResultsResponseArrayItems]): List of invite/request creation status. If there is an error, an exception object will be returned. If the action was successfully completed, an invite object will be returned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CreateInvitesResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([CreateInvitesResultsResponseArrayItems]): List of invite/request creation status. If there is an error, an exception object will be returned. If the action was successfully completed, an invite object will be returned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_invites_results_response_array_invite.py b/openapi_generated/pinterest_client/model/create_invites_results_response_array_invite.py new file mode 100644 index 0000000..878a220 --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_invites_results_response_array_invite.py @@ -0,0 +1,271 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_access_user_summary import BusinessAccessUserSummary + globals()['BusinessAccessUserSummary'] = BusinessAccessUserSummary + + +class CreateInvitesResultsResponseArrayInvite(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'user': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'user': 'user', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreateInvitesResultsResponseArrayInvite - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the invite/request.. [optional] # noqa: E501 + user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Metadata for the member/partner that was sent the invite/request.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CreateInvitesResultsResponseArrayInvite - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the invite/request.. [optional] # noqa: E501 + user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Metadata for the member/partner that was sent the invite/request.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_invites_results_response_array_items.py b/openapi_generated/pinterest_client/model/create_invites_results_response_array_items.py new file mode 100644 index 0000000..13d4a57 --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_invites_results_response_array_items.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.create_invites_results_response_array_invite import CreateInvitesResultsResponseArrayInvite + from openapi_generated.pinterest_client.model.invite_exception_response import InviteExceptionResponse + globals()['CreateInvitesResultsResponseArrayInvite'] = CreateInvitesResultsResponseArrayInvite + globals()['InviteExceptionResponse'] = InviteExceptionResponse + + +class CreateInvitesResultsResponseArrayItems(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'exception': (InviteExceptionResponse,), # noqa: E501 + 'invite': (CreateInvitesResultsResponseArrayInvite,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'exception': 'exception', # noqa: E501 + 'invite': 'invite', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreateInvitesResultsResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exception (InviteExceptionResponse): [optional] # noqa: E501 + invite (CreateInvitesResultsResponseArrayInvite): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CreateInvitesResultsResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exception (InviteExceptionResponse): [optional] # noqa: E501 + invite (CreateInvitesResultsResponseArrayInvite): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_membership_or_partnership_invites_body.py b/openapi_generated/pinterest_client/model/create_membership_or_partnership_invites_body.py new file mode 100644 index 0000000..1456298 --- /dev/null +++ b/openapi_generated/pinterest_client/model/create_membership_or_partnership_invites_body.py @@ -0,0 +1,295 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.invite_type import InviteType + globals()['InviteType'] = InviteType + + +class CreateMembershipOrPartnershipInvitesBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('business_role',): { + 'EMPLOYEE': "EMPLOYEE", + 'BIZ_ADMIN': "BIZ_ADMIN", + 'PARTNER': "PARTNER", + }, + } + + validations = { + ('members',): { + 'max_items': 50, + 'min_items': 1, + }, + ('partners',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'business_role': (str,), # noqa: E501 + 'invite_type': (InviteType,), # noqa: E501 + 'members': ([str],), # noqa: E501 + 'partners': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'business_role': 'business_role', # noqa: E501 + 'invite_type': 'invite_type', # noqa: E501 + 'members': 'members', # noqa: E501 + 'partners': 'partners', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, business_role, invite_type, *args, **kwargs): # noqa: E501 + """CreateMembershipOrPartnershipInvitesBody - a model defined in OpenAPI + + Args: + business_role (str): The business access level to grant member/partner. Note, values are case-sensitive. - EMPLOYEE: Can only view and access assets you assign them to. They cannot see details about other employees, partners, or other assets. - BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access. - PARTNER: Can only view and access assets you assign them to/or they assign to you. + invite_type (InviteType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + members ([str]): A list of usernames, emails, or a mix of them. Should be used if invite_type is MEMBER_INVITE. [optional] # noqa: E501 + partners ([str]): A list of partner_id. Should be used if invite_type is PARTNER_INVITE or PARTNER_REQUEST. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.business_role = business_role + self.invite_type = invite_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, business_role, invite_type, *args, **kwargs): # noqa: E501 + """CreateMembershipOrPartnershipInvitesBody - a model defined in OpenAPI + + Args: + business_role (str): The business access level to grant member/partner. Note, values are case-sensitive. - EMPLOYEE: Can only view and access assets you assign them to. They cannot see details about other employees, partners, or other assets. - BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access. - PARTNER: Can only view and access assets you assign them to/or they assign to you. + invite_type (InviteType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + members ([str]): A list of usernames, emails, or a mix of them. Should be used if invite_type is MEMBER_INVITE. [optional] # noqa: E501 + partners ([str]): A list of partner_id. Should be used if invite_type is PARTNER_INVITE or PARTNER_REQUEST. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.business_role = business_role + self.invite_type = invite_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/create_mmm_report_request.py b/openapi_generated/pinterest_client/model/create_mmm_report_request.py index 216d0db..f46c015 100644 --- a/openapi_generated/pinterest_client/model/create_mmm_report_request.py +++ b/openapi_generated/pinterest_client/model/create_mmm_report_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -32,9 +32,13 @@ def lazy_import(): from openapi_generated.pinterest_client.model.create_mmm_report_request_all_of import CreateMMMReportRequestAllOf - from openapi_generated.pinterest_client.model.items import Items + from openapi_generated.pinterest_client.model.mmm_reporting_column import MMMReportingColumn + from openapi_generated.pinterest_client.model.mmm_reporting_targeting_type import MMMReportingTargetingType + from openapi_generated.pinterest_client.model.targeting_advertiser_country import TargetingAdvertiserCountry globals()['CreateMMMReportRequestAllOf'] = CreateMMMReportRequestAllOf - globals()['Items'] = Items + globals()['MMMReportingColumn'] = MMMReportingColumn + globals()['MMMReportingTargetingType'] = MMMReportingTargetingType + globals()['TargetingAdvertiserCountry'] = TargetingAdvertiserCountry class CreateMMMReportRequest(ModelComposed): @@ -70,75 +74,6 @@ class CreateMMMReportRequest(ModelComposed): 'CAMPAIGN_TARGETING': "CAMPAIGN_TARGETING", 'AD_GROUP_TARGETING': "AD_GROUP_TARGETING", }, - ('targeting_types',): { - 'APPTYPE': "APPTYPE", - 'COUNTRY': "COUNTRY", - 'CREATIVE_TYPE': "CREATIVE_TYPE", - 'GENDER': "GENDER", - 'LOCATION': "LOCATION", - }, - ('columns',): { - 'SPEND_IN_DOLLAR': "SPEND_IN_DOLLAR", - 'ECPC_IN_DOLLAR': "ECPC_IN_DOLLAR", - 'ECTR': "ECTR", - 'CAMPAIGN_NAME': "CAMPAIGN_NAME", - 'TOTAL_ENGAGEMENT': "TOTAL_ENGAGEMENT", - 'EENGAGEMENT_RATE': "EENGAGEMENT_RATE", - 'ECPM_IN_DOLLAR': "ECPM_IN_DOLLAR", - 'CAMPAIGN_ID': "CAMPAIGN_ID", - 'ADVERTISER_ID': "ADVERTISER_ID", - 'AD_GROUP_ID': "AD_GROUP_ID", - 'AD_GROUP_NAME': "AD_GROUP_NAME", - 'CLICKTHROUGH_1': "CLICKTHROUGH_1", - 'IMPRESSION_1': "IMPRESSION_1", - 'CLICKTHROUGH_2': "CLICKTHROUGH_2", - 'IMPRESSION_2': "IMPRESSION_2", - 'TOTAL_CLICKTHROUGH': "TOTAL_CLICKTHROUGH", - 'TOTAL_IMPRESSION': "TOTAL_IMPRESSION", - 'ADVERTISER_NAME': "ADVERTISER_NAME", - }, - ('countries',): { - 'UNKNOWN': "UNKNOWN", - 'US': "US", - 'GB': "GB", - 'CA': "CA", - 'IE': "IE", - 'AU': "AU", - 'NZ': "NZ", - 'FR': "FR", - 'SE': "SE", - 'IL': "IL", - 'DE': "DE", - 'AT': "AT", - 'IT': "IT", - 'ES': "ES", - 'NL': "NL", - 'BE': "BE", - 'PT': "PT", - 'CH': "CH", - 'HK': "HK", - 'JP': "JP", - 'KR': "KR", - 'SG': "SG", - 'NO': "NO", - 'DK': "DK", - 'FI': "FI", - 'CY': "CY", - 'LU': "LU", - 'MT': "MT", - 'PL': "PL", - 'RO': "RO", - 'HU': "HU", - 'CZ': "CZ", - 'GR': "GR", - 'SK': "SK", - 'BR': "BR", - 'MX': "MX", - 'AR': "AR", - 'CL': "CL", - 'CO': "CO", - 'NULL': "null", - }, } validations = { @@ -156,9 +91,6 @@ class CreateMMMReportRequest(ModelComposed): 'max_items': 5, 'min_items': 1, }, - ('custom_column_ids',): { - 'max_items': 20, - }, } @cached_property @@ -189,10 +121,9 @@ def openapi_types(): 'end_date': (str,), # noqa: E501 'granularity': (str,), # noqa: E501 'level': (str,), # noqa: E501 - 'targeting_types': ([str],), # noqa: E501 - 'columns': ([str],), # noqa: E501 - 'custom_column_ids': ([Items],), # noqa: E501 - 'countries': ([str, none_type],), # noqa: E501 + 'targeting_types': ([MMMReportingTargetingType],), # noqa: E501 + 'columns': ([MMMReportingColumn],), # noqa: E501 + 'countries': ([TargetingAdvertiserCountry],), # noqa: E501 } @cached_property @@ -208,7 +139,6 @@ def discriminator(): 'level': 'level', # noqa: E501 'targeting_types': 'targeting_types', # noqa: E501 'columns': 'columns', # noqa: E501 - 'custom_column_ids': 'custom_column_ids', # noqa: E501 'countries': 'countries', # noqa: E501 } @@ -226,8 +156,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 end_date (str): Metric report end date (UTC). Format: YYYY-MM-DD granularity (str): DAY - metrics are broken down daily.
    WEEK - metrics are broken down weekly. level (str): Level of the report - targeting_types ([str]): List of targeting types - columns ([str]): Metric and entity columns + targeting_types ([MMMReportingTargetingType]): List of targeting types + columns ([MMMReportingColumn]): Metric and entity columns _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -258,8 +188,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - custom_column_ids ([Items]): List of custom column ids. [optional] # noqa: E501 - countries ([str, none_type]): A List of country for filtering. [optional] # noqa: E501 + countries ([TargetingAdvertiserCountry]): A List of countries for filtering. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -334,8 +263,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 end_date (str): Metric report end date (UTC). Format: YYYY-MM-DD granularity (str): DAY - metrics are broken down daily.
    WEEK - metrics are broken down weekly. level (str): Level of the report - targeting_types ([str]): List of targeting types - columns ([str]): Metric and entity columns + targeting_types ([MMMReportingTargetingType]): List of targeting types + columns ([MMMReportingColumn]): Metric and entity columns _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -366,8 +295,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - custom_column_ids ([Items]): List of custom column ids. [optional] # noqa: E501 - countries ([str, none_type]): A List of country for filtering. [optional] # noqa: E501 + countries ([TargetingAdvertiserCountry]): A List of countries for filtering. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/create_mmm_report_request_all_of.py b/openapi_generated/pinterest_client/model/create_mmm_report_request_all_of.py index 8f641c8..88848f6 100644 --- a/openapi_generated/pinterest_client/model/create_mmm_report_request_all_of.py +++ b/openapi_generated/pinterest_client/model/create_mmm_report_request_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -30,6 +30,10 @@ from openapi_generated.pinterest_client.exceptions import ApiAttributeError +def lazy_import(): + from openapi_generated.pinterest_client.model.targeting_advertiser_country import TargetingAdvertiserCountry + globals()['TargetingAdvertiserCountry'] = TargetingAdvertiserCountry + class CreateMMMReportRequestAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -56,48 +60,6 @@ class CreateMMMReportRequestAllOf(ModelNormal): """ allowed_values = { - ('countries',): { - 'UNKNOWN': "UNKNOWN", - 'US': "US", - 'GB': "GB", - 'CA': "CA", - 'IE': "IE", - 'AU': "AU", - 'NZ': "NZ", - 'FR': "FR", - 'SE': "SE", - 'IL': "IL", - 'DE': "DE", - 'AT': "AT", - 'IT': "IT", - 'ES': "ES", - 'NL': "NL", - 'BE': "BE", - 'PT': "PT", - 'CH': "CH", - 'HK': "HK", - 'JP': "JP", - 'KR': "KR", - 'SG': "SG", - 'NO': "NO", - 'DK': "DK", - 'FI': "FI", - 'CY': "CY", - 'LU': "LU", - 'MT': "MT", - 'PL': "PL", - 'RO': "RO", - 'HU': "HU", - 'CZ': "CZ", - 'GR': "GR", - 'SK': "SK", - 'BR': "BR", - 'MX': "MX", - 'AR': "AR", - 'CL': "CL", - 'CO': "CO", - 'NULL': "null", - }, } validations = { @@ -109,6 +71,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ + lazy_import() return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -123,8 +86,9 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ + lazy_import() return { - 'countries': ([str, none_type],), # noqa: E501 + 'countries': ([TargetingAdvertiserCountry],), # noqa: E501 } @cached_property @@ -177,7 +141,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - countries ([str, none_type]): A List of country for filtering. [optional] # noqa: E501 + countries ([TargetingAdvertiserCountry]): A List of countries for filtering. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -259,7 +223,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - countries ([str, none_type]): A List of country for filtering. [optional] # noqa: E501 + countries ([TargetingAdvertiserCountry]): A List of countries for filtering. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/create_mmm_report_response.py b/openapi_generated/pinterest_client/model/create_mmm_report_response.py index b1a9a61..52e6c0f 100644 --- a/openapi_generated/pinterest_client/model/create_mmm_report_response.py +++ b/openapi_generated/pinterest_client/model/create_mmm_report_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/create_mmm_report_response_data.py b/openapi_generated/pinterest_client/model/create_mmm_report_response_data.py index 1f8f4cd..5c95b15 100644 --- a/openapi_generated/pinterest_client/model/create_mmm_report_response_data.py +++ b/openapi_generated/pinterest_client/model/create_mmm_report_response_data.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/creative_assets_id_filter.py b/openapi_generated/pinterest_client/model/creative_assets_id_filter.py new file mode 100644 index 0000000..6f97726 --- /dev/null +++ b/openapi_generated/pinterest_client/model/creative_assets_id_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_string_criteria import CatalogsProductGroupMultipleStringCriteria + globals()['CatalogsProductGroupMultipleStringCriteria'] = CatalogsProductGroupMultipleStringCriteria + + +class CreativeAssetsIdFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'creative_assets_id': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'creative_assets_id': 'CREATIVE_ASSETS_ID', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, creative_assets_id, *args, **kwargs): # noqa: E501 + """CreativeAssetsIdFilter - a model defined in OpenAPI + + Args: + creative_assets_id (CatalogsProductGroupMultipleStringCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, creative_assets_id, *args, **kwargs): # noqa: E501 + """CreativeAssetsIdFilter - a model defined in OpenAPI + + Args: + creative_assets_id (CatalogsProductGroupMultipleStringCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.creative_assets_id = creative_assets_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/creative_assets_processing_record.py b/openapi_generated/pinterest_client/model/creative_assets_processing_record.py new file mode 100644 index 0000000..5c46930 --- /dev/null +++ b/openapi_generated/pinterest_client/model/creative_assets_processing_record.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.item_processing_status import ItemProcessingStatus + from openapi_generated.pinterest_client.model.item_validation_event import ItemValidationEvent + globals()['ItemProcessingStatus'] = ItemProcessingStatus + globals()['ItemValidationEvent'] = ItemValidationEvent + + +class CreativeAssetsProcessingRecord(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'creative_assets_id': (str,), # noqa: E501 + 'errors': ([ItemValidationEvent],), # noqa: E501 + 'warnings': ([ItemValidationEvent],), # noqa: E501 + 'status': (ItemProcessingStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'creative_assets_id': 'creative_assets_id', # noqa: E501 + 'errors': 'errors', # noqa: E501 + 'warnings': 'warnings', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreativeAssetsProcessingRecord - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_assets_id (str): The catalog creative assets id in the merchant namespace. [optional] # noqa: E501 + errors ([ItemValidationEvent]): Array with the validation errors for the item processing record. A non empty errors list causes the item processing to fail.. [optional] # noqa: E501 + warnings ([ItemValidationEvent]): Array with the validation warnings for the item processing record. [optional] # noqa: E501 + status (ItemProcessingStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CreativeAssetsProcessingRecord - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_assets_id (str): The catalog creative assets id in the merchant namespace. [optional] # noqa: E501 + errors ([ItemValidationEvent]): Array with the validation errors for the item processing record. A non empty errors list causes the item processing to fail.. [optional] # noqa: E501 + warnings ([ItemValidationEvent]): Array with the validation warnings for the item processing record. [optional] # noqa: E501 + status (ItemProcessingStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/creative_assets_visibility_type.py b/openapi_generated/pinterest_client/model/creative_assets_visibility_type.py new file mode 100644 index 0000000..5a0b9ab --- /dev/null +++ b/openapi_generated/pinterest_client/model/creative_assets_visibility_type.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class CreativeAssetsVisibilityType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'VISIBLE': "VISIBLE", + 'HIDDEN': "HIDDEN", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """CreativeAssetsVisibilityType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Creative assets visibility.., must be one of ["VISIBLE", "HIDDEN", ] # noqa: E501 + + Keyword Args: + value (str): Creative assets visibility.., must be one of ["VISIBLE", "HIDDEN", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """CreativeAssetsVisibilityType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Creative assets visibility.., must be one of ["VISIBLE", "HIDDEN", ] # noqa: E501 + + Keyword Args: + value (str): Creative assets visibility.., must be one of ["VISIBLE", "HIDDEN", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/creative_type.py b/openapi_generated/pinterest_client/model/creative_type.py index 3a9788d..faad8e0 100644 --- a/openapi_generated/pinterest_client/model/creative_type.py +++ b/openapi_generated/pinterest_client/model/creative_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -114,10 +114,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Ad creative type enum.

    Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.., must be one of ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "COLLECTION", "IDEA", "SHOWCASE", "QUIZ", ] # noqa: E501 + args[0] (str): Ad creative type enum. For update, only draft ads may update creative type.

    Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.., must be one of ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "COLLECTION", "IDEA", "SHOWCASE", "QUIZ", ] # noqa: E501 Keyword Args: - value (str): Ad creative type enum.

    Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.., must be one of ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "COLLECTION", "IDEA", "SHOWCASE", "QUIZ", ] # noqa: E501 + value (str): Ad creative type enum. For update, only draft ads may update creative type.

    Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.., must be one of ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "COLLECTION", "IDEA", "SHOWCASE", "QUIZ", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -204,10 +204,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Ad creative type enum.

    Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.., must be one of ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "COLLECTION", "IDEA", "SHOWCASE", "QUIZ", ] # noqa: E501 + args[0] (str): Ad creative type enum. For update, only draft ads may update creative type.

    Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.., must be one of ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "COLLECTION", "IDEA", "SHOWCASE", "QUIZ", ] # noqa: E501 Keyword Args: - value (str): Ad creative type enum.

    Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.., must be one of ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "COLLECTION", "IDEA", "SHOWCASE", "QUIZ", ] # noqa: E501 + value (str): Ad creative type enum. For update, only draft ads may update creative type.

    Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.., must be one of ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "COLLECTION", "IDEA", "SHOWCASE", "QUIZ", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/currency.py b/openapi_generated/pinterest_client/model/currency.py index 9e9456d..39c09ed 100644 --- a/openapi_generated/pinterest_client/model/currency.py +++ b/openapi_generated/pinterest_client/model/currency.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -78,6 +78,8 @@ class Currency(ModelSimple): 'ARS': "ARS", 'CLP': "CLP", 'COP': "COP", + 'INR': "INR", + 'TRY': "TRY", }, } @@ -129,10 +131,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Currency Codes from ISO 4217., must be one of ["UNK", "USD", "GBP", "CAD", "EUR", "AUD", "NZD", "SEK", "ILS", "CHF", "HKD", "JPY", "SGD", "KRW", "NOK", "DKK", "PLN", "RON", "HUF", "CZK", "BRL", "MXN", "ARS", "CLP", "COP", ] # noqa: E501 + args[0] (str): Currency Codes from ISO 4217., must be one of ["UNK", "USD", "GBP", "CAD", "EUR", "AUD", "NZD", "SEK", "ILS", "CHF", "HKD", "JPY", "SGD", "KRW", "NOK", "DKK", "PLN", "RON", "HUF", "CZK", "BRL", "MXN", "ARS", "CLP", "COP", "INR", "TRY", ] # noqa: E501 Keyword Args: - value (str): Currency Codes from ISO 4217., must be one of ["UNK", "USD", "GBP", "CAD", "EUR", "AUD", "NZD", "SEK", "ILS", "CHF", "HKD", "JPY", "SGD", "KRW", "NOK", "DKK", "PLN", "RON", "HUF", "CZK", "BRL", "MXN", "ARS", "CLP", "COP", ] # noqa: E501 + value (str): Currency Codes from ISO 4217., must be one of ["UNK", "USD", "GBP", "CAD", "EUR", "AUD", "NZD", "SEK", "ILS", "CHF", "HKD", "JPY", "SGD", "KRW", "NOK", "DKK", "PLN", "RON", "HUF", "CZK", "BRL", "MXN", "ARS", "CLP", "COP", "INR", "TRY", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -219,10 +221,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Currency Codes from ISO 4217., must be one of ["UNK", "USD", "GBP", "CAD", "EUR", "AUD", "NZD", "SEK", "ILS", "CHF", "HKD", "JPY", "SGD", "KRW", "NOK", "DKK", "PLN", "RON", "HUF", "CZK", "BRL", "MXN", "ARS", "CLP", "COP", ] # noqa: E501 + args[0] (str): Currency Codes from ISO 4217., must be one of ["UNK", "USD", "GBP", "CAD", "EUR", "AUD", "NZD", "SEK", "ILS", "CHF", "HKD", "JPY", "SGD", "KRW", "NOK", "DKK", "PLN", "RON", "HUF", "CZK", "BRL", "MXN", "ARS", "CLP", "COP", "INR", "TRY", ] # noqa: E501 Keyword Args: - value (str): Currency Codes from ISO 4217., must be one of ["UNK", "USD", "GBP", "CAD", "EUR", "AUD", "NZD", "SEK", "ILS", "CHF", "HKD", "JPY", "SGD", "KRW", "NOK", "DKK", "PLN", "RON", "HUF", "CZK", "BRL", "MXN", "ARS", "CLP", "COP", ] # noqa: E501 + value (str): Currency Codes from ISO 4217., must be one of ["UNK", "USD", "GBP", "CAD", "EUR", "AUD", "NZD", "SEK", "ILS", "CHF", "HKD", "JPY", "SGD", "KRW", "NOK", "DKK", "PLN", "RON", "HUF", "CZK", "BRL", "MXN", "ARS", "CLP", "COP", "INR", "TRY", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/currency_filter.py b/openapi_generated/pinterest_client/model/currency_filter.py index 41c5513..f9e199a 100644 --- a/openapi_generated/pinterest_client/model/currency_filter.py +++ b/openapi_generated/pinterest_client/model/currency_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/custom_label0_filter.py b/openapi_generated/pinterest_client/model/custom_label0_filter.py index ddf1ca3..ea3dc76 100644 --- a/openapi_generated/pinterest_client/model/custom_label0_filter.py +++ b/openapi_generated/pinterest_client/model/custom_label0_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/custom_label1_filter.py b/openapi_generated/pinterest_client/model/custom_label1_filter.py index 07254f7..b542a8b 100644 --- a/openapi_generated/pinterest_client/model/custom_label1_filter.py +++ b/openapi_generated/pinterest_client/model/custom_label1_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/custom_label2_filter.py b/openapi_generated/pinterest_client/model/custom_label2_filter.py index 2709dc8..81cea93 100644 --- a/openapi_generated/pinterest_client/model/custom_label2_filter.py +++ b/openapi_generated/pinterest_client/model/custom_label2_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/custom_label3_filter.py b/openapi_generated/pinterest_client/model/custom_label3_filter.py index b04d561..cab065e 100644 --- a/openapi_generated/pinterest_client/model/custom_label3_filter.py +++ b/openapi_generated/pinterest_client/model/custom_label3_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/custom_label4_filter.py b/openapi_generated/pinterest_client/model/custom_label4_filter.py index 68c4399..ace813f 100644 --- a/openapi_generated/pinterest_client/model/custom_label4_filter.py +++ b/openapi_generated/pinterest_client/model/custom_label4_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/customer_list.py b/openapi_generated/pinterest_client/model/customer_list.py index bac4bd0..4e65f57 100644 --- a/openapi_generated/pinterest_client/model/customer_list.py +++ b/openapi_generated/pinterest_client/model/customer_list.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/customer_list_request.py b/openapi_generated/pinterest_client/model/customer_list_request.py index 46c13c8..a6a1508 100644 --- a/openapi_generated/pinterest_client/model/customer_list_request.py +++ b/openapi_generated/pinterest_client/model/customer_list_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/customer_list_update_request.py b/openapi_generated/pinterest_client/model/customer_list_update_request.py index fb74587..3f83b2c 100644 --- a/openapi_generated/pinterest_client/model/customer_list_update_request.py +++ b/openapi_generated/pinterest_client/model/customer_list_update_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/data_output_format.py b/openapi_generated/pinterest_client/model/data_output_format.py index bf0b111..c2050e6 100644 --- a/openapi_generated/pinterest_client/model/data_output_format.py +++ b/openapi_generated/pinterest_client/model/data_output_format.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/data_status.py b/openapi_generated/pinterest_client/model/data_status.py index 620e509..5ba0de2 100644 --- a/openapi_generated/pinterest_client/model/data_status.py +++ b/openapi_generated/pinterest_client/model/data_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/delete_asset_group_body.py b/openapi_generated/pinterest_client/model/delete_asset_group_body.py new file mode 100644 index 0000000..3b10253 --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_asset_group_body.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class DeleteAssetGroupBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_groups_to_delete',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'asset_groups_to_delete': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_groups_to_delete': 'asset_groups_to_delete', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, asset_groups_to_delete, *args, **kwargs): # noqa: E501 + """DeleteAssetGroupBody - a model defined in OpenAPI + + Args: + asset_groups_to_delete ([str]): List of ids of asset groups to be deleted + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_groups_to_delete = asset_groups_to_delete + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, asset_groups_to_delete, *args, **kwargs): # noqa: E501 + """DeleteAssetGroupBody - a model defined in OpenAPI + + Args: + asset_groups_to_delete ([str]): List of ids of asset groups to be deleted + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_groups_to_delete = asset_groups_to_delete + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_asset_group_response.py b/openapi_generated/pinterest_client/model/delete_asset_group_response.py new file mode 100644 index 0000000..29fc432 --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_asset_group_response.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.delete_asset_group_response_exceptions import DeleteAssetGroupResponseExceptions + globals()['DeleteAssetGroupResponseExceptions'] = DeleteAssetGroupResponseExceptions + + +class DeleteAssetGroupResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'deleted_asset_groups': ([str],), # noqa: E501 + 'exceptions': ([DeleteAssetGroupResponseExceptions], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'deleted_asset_groups': 'deleted_asset_groups', # noqa: E501 + 'exceptions': 'exceptions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeleteAssetGroupResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + deleted_asset_groups ([str]): A list of ids of successfully deleted asset groups.. [optional] # noqa: E501 + exceptions ([DeleteAssetGroupResponseExceptions], none_type): A list of errors associated with the asset groups. Will be returned if there is an error.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeleteAssetGroupResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + deleted_asset_groups ([str]): A list of ids of successfully deleted asset groups.. [optional] # noqa: E501 + exceptions ([DeleteAssetGroupResponseExceptions], none_type): A list of errors associated with the asset groups. Will be returned if there is an error.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_asset_group_response_exceptions.py b/openapi_generated/pinterest_client/model/delete_asset_group_response_exceptions.py new file mode 100644 index 0000000..3687e68 --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_asset_group_response_exceptions.py @@ -0,0 +1,264 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class DeleteAssetGroupResponseExceptions(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'asset_group_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'code': 'code', # noqa: E501 + 'message': 'message', # noqa: E501 + 'asset_group_id': 'asset_group_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeleteAssetGroupResponseExceptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + code (int): Error code associated with the error deleting asset group.. [optional] # noqa: E501 + message (str): Error message associated with the error deleting asset group.. [optional] # noqa: E501 + asset_group_id (str): Asset group id of the exception.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeleteAssetGroupResponseExceptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + code (int): Error code associated with the error deleting asset group.. [optional] # noqa: E501 + message (str): Error message associated with the error deleting asset group.. [optional] # noqa: E501 + asset_group_id (str): Asset group id of the exception.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_invites_results_response_array.py b/openapi_generated/pinterest_client/model/delete_invites_results_response_array.py new file mode 100644 index 0000000..dc5720d --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_invites_results_response_array.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.delete_invites_results_response_array_items import DeleteInvitesResultsResponseArrayItems + globals()['DeleteInvitesResultsResponseArrayItems'] = DeleteInvitesResultsResponseArrayItems + + +class DeleteInvitesResultsResponseArray(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([DeleteInvitesResultsResponseArrayItems],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeleteInvitesResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([DeleteInvitesResultsResponseArrayItems]): List of invite/Request deletion status. If there is an error, an exception object will be returned. If the invite/request was successfully cancelled, an invite object will be returned for the invite that was cancelled.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeleteInvitesResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([DeleteInvitesResultsResponseArrayItems]): List of invite/Request deletion status. If there is an error, an exception object will be returned. If the invite/request was successfully cancelled, an invite object will be returned for the invite that was cancelled.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_invites_results_response_array_exception.py b/openapi_generated/pinterest_client/model/delete_invites_results_response_array_exception.py new file mode 100644 index 0000000..fd23758 --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_invites_results_response_array_exception.py @@ -0,0 +1,265 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class DeleteInvitesResultsResponseArrayException(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('invite_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'invite_id': (str,), # noqa: E501 + 'message': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'invite_id': 'invite_id', # noqa: E501 + 'message': 'message', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeleteInvitesResultsResponseArrayException - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invite_id (str): Unique identifier of an invite.. [optional] # noqa: E501 + message (str): Error message associated with the error in performing the action on the invite/request.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeleteInvitesResultsResponseArrayException - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invite_id (str): Unique identifier of an invite.. [optional] # noqa: E501 + message (str): Error message associated with the error in performing the action on the invite/request.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_invites_results_response_array_items.py b/openapi_generated/pinterest_client/model/delete_invites_results_response_array_items.py new file mode 100644 index 0000000..104920a --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_invites_results_response_array_items.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.base_invite_data_response import BaseInviteDataResponse + from openapi_generated.pinterest_client.model.delete_invites_results_response_array_exception import DeleteInvitesResultsResponseArrayException + globals()['BaseInviteDataResponse'] = BaseInviteDataResponse + globals()['DeleteInvitesResultsResponseArrayException'] = DeleteInvitesResultsResponseArrayException + + +class DeleteInvitesResultsResponseArrayItems(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'exception': (DeleteInvitesResultsResponseArrayException,), # noqa: E501 + 'invite': (BaseInviteDataResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'exception': 'exception', # noqa: E501 + 'invite': 'invite', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeleteInvitesResultsResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exception (DeleteInvitesResultsResponseArrayException): [optional] # noqa: E501 + invite (BaseInviteDataResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeleteInvitesResultsResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exception (DeleteInvitesResultsResponseArrayException): [optional] # noqa: E501 + invite (BaseInviteDataResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_member_access_result.py b/openapi_generated/pinterest_client/model/delete_member_access_result.py new file mode 100644 index 0000000..3fa7a02 --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_member_access_result.py @@ -0,0 +1,270 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class DeleteMemberAccessResult(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('member_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'asset_id': (str,), # noqa: E501 + 'member_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_id': 'asset_id', # noqa: E501 + 'member_id': 'member_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeleteMemberAccessResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of the business asset.. [optional] # noqa: E501 + member_id (str): Unique identifier of the business member.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeleteMemberAccessResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of the business asset.. [optional] # noqa: E501 + member_id (str): Unique identifier of the business member.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_member_access_results_response_array.py b/openapi_generated/pinterest_client/model/delete_member_access_results_response_array.py new file mode 100644 index 0000000..c8a9767 --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_member_access_results_response_array.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.delete_member_access_result import DeleteMemberAccessResult + globals()['DeleteMemberAccessResult'] = DeleteMemberAccessResult + + +class DeleteMemberAccessResultsResponseArray(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([DeleteMemberAccessResult],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeleteMemberAccessResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([DeleteMemberAccessResult]): List of member asset permissions that were deleted.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeleteMemberAccessResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([DeleteMemberAccessResult]): List of member asset permissions that were deleted.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_partner_asset_access_body.py b/openapi_generated/pinterest_client/model/delete_partner_asset_access_body.py new file mode 100644 index 0000000..ddea952 --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_partner_asset_access_body.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.delete_partner_asset_access_body_accesses import DeletePartnerAssetAccessBodyAccesses + globals()['DeletePartnerAssetAccessBodyAccesses'] = DeletePartnerAssetAccessBodyAccesses + + +class DeletePartnerAssetAccessBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('accesses',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'accesses': ([DeletePartnerAssetAccessBodyAccesses],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'accesses': 'accesses', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, accesses, *args, **kwargs): # noqa: E501 + """DeletePartnerAssetAccessBody - a model defined in OpenAPI + + Args: + accesses ([DeletePartnerAssetAccessBodyAccesses]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.accesses = accesses + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, accesses, *args, **kwargs): # noqa: E501 + """DeletePartnerAssetAccessBody - a model defined in OpenAPI + + Args: + accesses ([DeletePartnerAssetAccessBodyAccesses]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.accesses = accesses + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_partner_asset_access_body_accesses.py b/openapi_generated/pinterest_client/model/delete_partner_asset_access_body_accesses.py new file mode 100644 index 0000000..5104beb --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_partner_asset_access_body_accesses.py @@ -0,0 +1,288 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class DeletePartnerAssetAccessBodyAccesses(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('partner_type',): { + 'INTERNAL': "INTERNAL", + 'EXTERNAL': "EXTERNAL", + }, + } + + validations = { + ('partner_id',): { + 'max_length': 25, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('asset_id',): { + 'max_length': 25, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'partner_id': (str,), # noqa: E501 + 'asset_id': (str,), # noqa: E501 + 'partner_type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'partner_id': 'partner_id', # noqa: E501 + 'asset_id': 'asset_id', # noqa: E501 + 'partner_type': 'partner_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, partner_id, asset_id, *args, **kwargs): # noqa: E501 + """DeletePartnerAssetAccessBodyAccesses - a model defined in OpenAPI + + Args: + partner_id (str): Unique identifier of a business partner to update asset access to. + asset_id (str): Unique identifier of the business asset. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + partner_type (str): If partner_type=INTERNAL, the deleted asset access is for the access the partner has to your business asset.
    If partner_type=EXTERNAL, the deleted asset access is for the access you have to the partner's business asset.. [optional] if omitted the server will use the default value of "INTERNAL" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.partner_id = partner_id + self.asset_id = asset_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, partner_id, asset_id, *args, **kwargs): # noqa: E501 + """DeletePartnerAssetAccessBodyAccesses - a model defined in OpenAPI + + Args: + partner_id (str): Unique identifier of a business partner to update asset access to. + asset_id (str): Unique identifier of the business asset. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + partner_type (str): If partner_type=INTERNAL, the deleted asset access is for the access the partner has to your business asset.
    If partner_type=EXTERNAL, the deleted asset access is for the access you have to the partner's business asset.. [optional] if omitted the server will use the default value of "INTERNAL" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.partner_id = partner_id + self.asset_id = asset_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_partner_assets_result.py b/openapi_generated/pinterest_client/model/delete_partner_assets_result.py new file mode 100644 index 0000000..106beae --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_partner_assets_result.py @@ -0,0 +1,288 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.permissions_response import PermissionsResponse + globals()['PermissionsResponse'] = PermissionsResponse + + +class DeletePartnerAssetsResult(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('partner_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_id': (str,), # noqa: E501 + 'asset_type': (str,), # noqa: E501 + 'permissions': (PermissionsResponse,), # noqa: E501 + 'is_shared_partner': (bool,), # noqa: E501 + 'partner_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_id': 'asset_id', # noqa: E501 + 'asset_type': 'asset_type', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + 'is_shared_partner': 'is_shared_partner', # noqa: E501 + 'partner_id': 'partner_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeletePartnerAssetsResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + asset_type (str): Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + is_shared_partner (bool): If is_shared_partner=FALSE, you terminated a partner's asset access to your business asset.
    If is_shared_partner=TRUE, you terminated your asset access to your partner's business asset.. [optional] # noqa: E501 + partner_id (str): Unique identifier of a business partner.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeletePartnerAssetsResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + asset_type (str): Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + is_shared_partner (bool): If is_shared_partner=FALSE, you terminated a partner's asset access to your business asset.
    If is_shared_partner=TRUE, you terminated your asset access to your partner's business asset.. [optional] # noqa: E501 + partner_id (str): Unique identifier of a business partner.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_partner_assets_results_response_array.py b/openapi_generated/pinterest_client/model/delete_partner_assets_results_response_array.py new file mode 100644 index 0000000..ef592db --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_partner_assets_results_response_array.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.delete_partner_assets_result import DeletePartnerAssetsResult + globals()['DeletePartnerAssetsResult'] = DeletePartnerAssetsResult + + +class DeletePartnerAssetsResultsResponseArray(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([DeletePartnerAssetsResult],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeletePartnerAssetsResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([DeletePartnerAssetsResult]): List of terminated asset access.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeletePartnerAssetsResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([DeletePartnerAssetsResult]): List of terminated asset access.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_partners_request.py b/openapi_generated/pinterest_client/model/delete_partners_request.py new file mode 100644 index 0000000..fc82e19 --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_partners_request.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_role_check_mode import BusinessRoleCheckMode + globals()['BusinessRoleCheckMode'] = BusinessRoleCheckMode + + +class DeletePartnersRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('partner_ids',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'partner_ids': ([str],), # noqa: E501 + 'partner_type': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'partner_ids': 'partner_ids', # noqa: E501 + 'partner_type': 'partner_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, partner_ids, *args, **kwargs): # noqa: E501 + """DeletePartnersRequest - a model defined in OpenAPI + + Args: + partner_ids ([str]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + partner_type (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.partner_ids = partner_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, partner_ids, *args, **kwargs): # noqa: E501 + """DeletePartnersRequest - a model defined in OpenAPI + + Args: + partner_ids ([str]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + partner_type (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.partner_ids = partner_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delete_partners_response.py b/openapi_generated/pinterest_client/model/delete_partners_response.py new file mode 100644 index 0000000..77c98eb --- /dev/null +++ b/openapi_generated/pinterest_client/model/delete_partners_response.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class DeletePartnersResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'deleted_partners': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'deleted_partners': 'deleted_partners', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeletePartnersResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + deleted_partners ([str]): List of partners whose business partnership have been terminated.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeletePartnersResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + deleted_partners ([str]): List of partners whose business partnership have been terminated.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/deleted_members_response.py b/openapi_generated/pinterest_client/model/deleted_members_response.py new file mode 100644 index 0000000..0a26837 --- /dev/null +++ b/openapi_generated/pinterest_client/model/deleted_members_response.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class DeletedMembersResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'deleted_members': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'deleted_members': 'deleted_members', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DeletedMembersResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + deleted_members ([str]): List of members whose business membership have been terminated.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DeletedMembersResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + deleted_members ([str]): List of members whose business membership have been terminated.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/delivery_metrics_response.py b/openapi_generated/pinterest_client/model/delivery_metrics_response.py index 59558aa..8cf95c8 100644 --- a/openapi_generated/pinterest_client/model/delivery_metrics_response.py +++ b/openapi_generated/pinterest_client/model/delivery_metrics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/delivery_metrics_response_items.py b/openapi_generated/pinterest_client/model/delivery_metrics_response_items.py index 0674106..3ab2eeb 100644 --- a/openapi_generated/pinterest_client/model/delivery_metrics_response_items.py +++ b/openapi_generated/pinterest_client/model/delivery_metrics_response_items.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/detailed_error.py b/openapi_generated/pinterest_client/model/detailed_error.py new file mode 100644 index 0000000..1ebfd3c --- /dev/null +++ b/openapi_generated/pinterest_client/model/detailed_error.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class DetailedError(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'details': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'code': 'code', # noqa: E501 + 'message': 'message', # noqa: E501 + 'details': 'details', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, code, message, details, *args, **kwargs): # noqa: E501 + """DetailedError - a model defined in OpenAPI + + Args: + code (int): + message (str): + details ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.code = code + self.message = message + self.details = details + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, code, message, details, *args, **kwargs): # noqa: E501 + """DetailedError - a model defined in OpenAPI + + Args: + code (int): + message (str): + details ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.code = code + self.message = message + self.details = details + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/enhanced_match_status_type.py b/openapi_generated/pinterest_client/model/enhanced_match_status_type.py index f175402..aa5b0a8 100644 --- a/openapi_generated/pinterest_client/model/enhanced_match_status_type.py +++ b/openapi_generated/pinterest_client/model/enhanced_match_status_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/entity_status.py b/openapi_generated/pinterest_client/model/entity_status.py index 4f0fbd1..e73d387 100644 --- a/openapi_generated/pinterest_client/model/entity_status.py +++ b/openapi_generated/pinterest_client/model/entity_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -56,6 +56,8 @@ class EntityStatus(ModelSimple): 'ACTIVE': "ACTIVE", 'PAUSED': "PAUSED", 'ARCHIVED': "ARCHIVED", + 'DRAFT': "DRAFT", + 'DELETED_DRAFT': "DELETED_DRAFT", }, } @@ -107,10 +109,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Entity status., must be one of ["ACTIVE", "PAUSED", "ARCHIVED", ] # noqa: E501 + args[0] (str): Entity status., must be one of ["ACTIVE", "PAUSED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 Keyword Args: - value (str): Entity status., must be one of ["ACTIVE", "PAUSED", "ARCHIVED", ] # noqa: E501 + value (str): Entity status., must be one of ["ACTIVE", "PAUSED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -197,10 +199,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Entity status., must be one of ["ACTIVE", "PAUSED", "ARCHIVED", ] # noqa: E501 + args[0] (str): Entity status., must be one of ["ACTIVE", "PAUSED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 Keyword Args: - value (str): Entity status., must be one of ["ACTIVE", "PAUSED", "ARCHIVED", ] # noqa: E501 + value (str): Entity status., must be one of ["ACTIVE", "PAUSED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/error.py b/openapi_generated/pinterest_client/model/error.py index 9e687d8..3c2fa6d 100644 --- a/openapi_generated/pinterest_client/model/error.py +++ b/openapi_generated/pinterest_client/model/error.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/exception.py b/openapi_generated/pinterest_client/model/exception.py index 4125f04..9b3d1a5 100644 --- a/openapi_generated/pinterest_client/model/exception.py +++ b/openapi_generated/pinterest_client/model/exception.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/feed_fields.py b/openapi_generated/pinterest_client/model/feed_fields.py index d500c65..5ac6a3a 100644 --- a/openapi_generated/pinterest_client/model/feed_fields.py +++ b/openapi_generated/pinterest_client/model/feed_fields.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -35,16 +35,16 @@ def lazy_import(): from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType from openapi_generated.pinterest_client.model.country import Country from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency - from openapi_generated.pinterest_client.model.product_availability_type import ProductAvailabilityType globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule globals()['CatalogsFormat'] = CatalogsFormat globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType globals()['Country'] = Country globals()['NullableCurrency'] = NullableCurrency - globals()['ProductAvailabilityType'] = ProductAvailabilityType class FeedFields(ModelNormal): @@ -75,6 +75,11 @@ class FeedFields(ModelNormal): } validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, } @cached_property @@ -100,16 +105,17 @@ def openapi_types(): """ lazy_import() return { - 'default_country': (Country,), # noqa: E501 - 'default_availability': (ProductAvailabilityType,), # noqa: E501 - 'default_currency': (NullableCurrency,), # noqa: E501 'name': (str, none_type,), # noqa: E501 'format': (CatalogsFormat,), # noqa: E501 - 'default_locale': (str,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 'credentials': (CatalogsFeedCredentials,), # noqa: E501 'location': (str,), # noqa: E501 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 'status': (CatalogsStatus,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'default_locale': (str,), # noqa: E501 + 'default_country': (Country,), # noqa: E501 + 'catalog_id': (str, none_type,), # noqa: E501 } @cached_property @@ -118,16 +124,17 @@ def discriminator(): attribute_map = { - 'default_country': 'default_country', # noqa: E501 - 'default_availability': 'default_availability', # noqa: E501 - 'default_currency': 'default_currency', # noqa: E501 'name': 'name', # noqa: E501 'format': 'format', # noqa: E501 - 'default_locale': 'default_locale', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 'credentials': 'credentials', # noqa: E501 'location': 'location', # noqa: E501 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 'status': 'status', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'default_country': 'default_country', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 } read_only_vars = { @@ -137,20 +144,21 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, default_country, default_availability, default_currency, name, format, default_locale, credentials, location, preferred_processing_schedule, status, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, name, format, catalog_type, credentials, location, preferred_processing_schedule, status, default_currency, default_locale, default_country, catalog_id, *args, **kwargs): # noqa: E501 """FeedFields - a model defined in OpenAPI Args: - default_country (Country): - default_availability (ProductAvailabilityType): - default_currency (NullableCurrency): name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. format (CatalogsFormat): - default_locale (str): The locale used within a feed for product descriptions. + catalog_type (CatalogsType): credentials (CatalogsFeedCredentials): location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. preferred_processing_schedule (CatalogsFeedProcessingSchedule): status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + default_country (Country): + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -210,16 +218,17 @@ def _from_openapi_data(cls, default_country, default_availability, default_curre self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.default_country = default_country - self.default_availability = default_availability - self.default_currency = default_currency self.name = name self.format = format - self.default_locale = default_locale + self.catalog_type = catalog_type self.credentials = credentials self.location = location self.preferred_processing_schedule = preferred_processing_schedule self.status = status + self.default_currency = default_currency + self.default_locale = default_locale + self.default_country = default_country + self.catalog_id = catalog_id for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -240,20 +249,21 @@ def _from_openapi_data(cls, default_country, default_availability, default_curre ]) @convert_js_args_to_python_args - def __init__(self, default_country, default_availability, default_currency, name, format, default_locale, credentials, location, preferred_processing_schedule, status, *args, **kwargs): # noqa: E501 + def __init__(self, name, format, catalog_type, credentials, location, preferred_processing_schedule, status, default_currency, default_locale, default_country, catalog_id, *args, **kwargs): # noqa: E501 """FeedFields - a model defined in OpenAPI Args: - default_country (Country): - default_availability (ProductAvailabilityType): - default_currency (NullableCurrency): name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. format (CatalogsFormat): - default_locale (str): The locale used within a feed for product descriptions. + catalog_type (CatalogsType): credentials (CatalogsFeedCredentials): location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. preferred_processing_schedule (CatalogsFeedProcessingSchedule): status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + default_country (Country): + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -311,16 +321,17 @@ def __init__(self, default_country, default_availability, default_currency, name self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.default_country = default_country - self.default_availability = default_availability - self.default_currency = default_currency self.name = name self.format = format - self.default_locale = default_locale + self.catalog_type = catalog_type self.credentials = credentials self.location = location self.preferred_processing_schedule = preferred_processing_schedule self.status = status + self.default_currency = default_currency + self.default_locale = default_locale + self.default_country = default_country + self.catalog_id = catalog_id for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/openapi_generated/pinterest_client/model/feed_fields1.py b/openapi_generated/pinterest_client/model/feed_fields1.py new file mode 100644 index 0000000..28ed038 --- /dev/null +++ b/openapi_generated/pinterest_client/model/feed_fields1.py @@ -0,0 +1,337 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['NullableCurrency'] = NullableCurrency + + +class FeedFields1(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('catalog_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str, none_type,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'status': (CatalogsStatus,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'default_locale': (str,), # noqa: E501 + 'catalog_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'location': 'location', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'status': 'status', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'catalog_id': 'catalog_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, format, catalog_type, credentials, location, preferred_processing_schedule, status, default_currency, default_locale, catalog_id, *args, **kwargs): # noqa: E501 + """FeedFields1 - a model defined in OpenAPI + + Args: + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. + format (CatalogsFormat): + catalog_type (CatalogsType): + credentials (CatalogsFeedCredentials): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + preferred_processing_schedule (CatalogsFeedProcessingSchedule): + status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.format = format + self.catalog_type = catalog_type + self.credentials = credentials + self.location = location + self.preferred_processing_schedule = preferred_processing_schedule + self.status = status + self.default_currency = default_currency + self.default_locale = default_locale + self.catalog_id = catalog_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, format, catalog_type, credentials, location, preferred_processing_schedule, status, default_currency, default_locale, catalog_id, *args, **kwargs): # noqa: E501 + """FeedFields1 - a model defined in OpenAPI + + Args: + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. + format (CatalogsFormat): + catalog_type (CatalogsType): + credentials (CatalogsFeedCredentials): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + preferred_processing_schedule (CatalogsFeedProcessingSchedule): + status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + catalog_id (str, none_type): Catalog id pertaining to the feed. If not provided, feed will use a default catalog based on type. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.format = format + self.catalog_type = catalog_type + self.credentials = credentials + self.location = location + self.preferred_processing_schedule = preferred_processing_schedule + self.status = status + self.default_currency = default_currency + self.default_locale = default_locale + self.catalog_id = catalog_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/feed_fields2.py b/openapi_generated/pinterest_client/model/feed_fields2.py new file mode 100644 index 0000000..ceb63d0 --- /dev/null +++ b/openapi_generated/pinterest_client/model/feed_fields2.py @@ -0,0 +1,342 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials + from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule + from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat + from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + from openapi_generated.pinterest_client.model.country import Country + from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency + from openapi_generated.pinterest_client.model.product_availability_type import ProductAvailabilityType + globals()['CatalogsFeedCredentials'] = CatalogsFeedCredentials + globals()['CatalogsFeedProcessingSchedule'] = CatalogsFeedProcessingSchedule + globals()['CatalogsFormat'] = CatalogsFormat + globals()['CatalogsStatus'] = CatalogsStatus + globals()['CatalogsType'] = CatalogsType + globals()['Country'] = Country + globals()['NullableCurrency'] = NullableCurrency + globals()['ProductAvailabilityType'] = ProductAvailabilityType + + +class FeedFields2(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str, none_type,), # noqa: E501 + 'format': (CatalogsFormat,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 + 'credentials': (CatalogsFeedCredentials,), # noqa: E501 + 'location': (str,), # noqa: E501 + 'preferred_processing_schedule': (CatalogsFeedProcessingSchedule,), # noqa: E501 + 'status': (CatalogsStatus,), # noqa: E501 + 'default_currency': (NullableCurrency,), # noqa: E501 + 'default_locale': (str,), # noqa: E501 + 'default_country': (Country,), # noqa: E501 + 'default_availability': (ProductAvailabilityType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'format': 'format', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 + 'credentials': 'credentials', # noqa: E501 + 'location': 'location', # noqa: E501 + 'preferred_processing_schedule': 'preferred_processing_schedule', # noqa: E501 + 'status': 'status', # noqa: E501 + 'default_currency': 'default_currency', # noqa: E501 + 'default_locale': 'default_locale', # noqa: E501 + 'default_country': 'default_country', # noqa: E501 + 'default_availability': 'default_availability', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, format, catalog_type, credentials, location, preferred_processing_schedule, status, default_currency, default_locale, default_country, default_availability, *args, **kwargs): # noqa: E501 + """FeedFields2 - a model defined in OpenAPI + + Args: + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. + format (CatalogsFormat): + catalog_type (CatalogsType): + credentials (CatalogsFeedCredentials): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + preferred_processing_schedule (CatalogsFeedProcessingSchedule): + status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + default_country (Country): + default_availability (ProductAvailabilityType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.format = format + self.catalog_type = catalog_type + self.credentials = credentials + self.location = location + self.preferred_processing_schedule = preferred_processing_schedule + self.status = status + self.default_currency = default_currency + self.default_locale = default_locale + self.default_country = default_country + self.default_availability = default_availability + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, format, catalog_type, credentials, location, preferred_processing_schedule, status, default_currency, default_locale, default_country, default_availability, *args, **kwargs): # noqa: E501 + """FeedFields2 - a model defined in OpenAPI + + Args: + name (str, none_type): A human-friendly name associated to a given feed. This value is currently nullable due to historical reasons. It is expected to become non-nullable in the future. + format (CatalogsFormat): + catalog_type (CatalogsType): + credentials (CatalogsFeedCredentials): + location (str): The URL where a feed is available for download. This URL is what Pinterest will use to download a feed for processing. + preferred_processing_schedule (CatalogsFeedProcessingSchedule): + status (CatalogsStatus): + default_currency (NullableCurrency): + default_locale (str): The locale used within a feed for product descriptions. + default_country (Country): + default_availability (ProductAvailabilityType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.format = format + self.catalog_type = catalog_type + self.credentials = credentials + self.location = location + self.preferred_processing_schedule = preferred_processing_schedule + self.status = status + self.default_currency = default_currency + self.default_locale = default_locale + self.default_country = default_country + self.default_availability = default_availability + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/follow_user_request.py b/openapi_generated/pinterest_client/model/follow_user_request.py index 88be6ef..c7805e7 100644 --- a/openapi_generated/pinterest_client/model/follow_user_request.py +++ b/openapi_generated/pinterest_client/model/follow_user_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/gender.py b/openapi_generated/pinterest_client/model/gender.py index 610cc71..01c59cc 100644 --- a/openapi_generated/pinterest_client/model/gender.py +++ b/openapi_generated/pinterest_client/model/gender.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/gender_filter.py b/openapi_generated/pinterest_client/model/gender_filter.py index 86410f0..1336f2e 100644 --- a/openapi_generated/pinterest_client/model/gender_filter.py +++ b/openapi_generated/pinterest_client/model/gender_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/gender_list.py b/openapi_generated/pinterest_client/model/gender_list.py index 1ae143a..15f5379 100644 --- a/openapi_generated/pinterest_client/model/gender_list.py +++ b/openapi_generated/pinterest_client/model/gender_list.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/get_audiences_order_by.py b/openapi_generated/pinterest_client/model/get_audiences_order_by.py index 585ac53..c9c6acc 100644 --- a/openapi_generated/pinterest_client/model/get_audiences_order_by.py +++ b/openapi_generated/pinterest_client/model/get_audiences_order_by.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/get_business_asset_type_response.py b/openapi_generated/pinterest_client/model/get_business_asset_type_response.py new file mode 100644 index 0000000..2a14a59 --- /dev/null +++ b/openapi_generated/pinterest_client/model/get_business_asset_type_response.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class GetBusinessAssetTypeResponse(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'AD_ACCOUNT': "AD_ACCOUNT", + 'PROFILE': "PROFILE", + 'ASSET_GROUP': "ASSET_GROUP", + 'CONVERSION_TAG': "CONVERSION_TAG", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """GetBusinessAssetTypeResponse - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Type of asset.., must be one of ["AD_ACCOUNT", "PROFILE", "ASSET_GROUP", "CONVERSION_TAG", ] # noqa: E501 + + Keyword Args: + value (str): Type of asset.., must be one of ["AD_ACCOUNT", "PROFILE", "ASSET_GROUP", "CONVERSION_TAG", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """GetBusinessAssetTypeResponse - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Type of asset.., must be one of ["AD_ACCOUNT", "PROFILE", "ASSET_GROUP", "CONVERSION_TAG", ] # noqa: E501 + + Keyword Args: + value (str): Type of asset.., must be one of ["AD_ACCOUNT", "PROFILE", "ASSET_GROUP", "CONVERSION_TAG", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/get_business_assets_response.py b/openapi_generated/pinterest_client/model/get_business_assets_response.py new file mode 100644 index 0000000..b0d88da --- /dev/null +++ b/openapi_generated/pinterest_client/model/get_business_assets_response.py @@ -0,0 +1,277 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_group_binding import AssetGroupBinding + globals()['AssetGroupBinding'] = AssetGroupBinding + + +class GetBusinessAssetsResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_id': (str,), # noqa: E501 + 'asset_type': (str,), # noqa: E501 + 'asset_group_info': (AssetGroupBinding,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_id': 'asset_id', # noqa: E501 + 'asset_type': 'asset_type', # noqa: E501 + 'asset_group_info': 'asset_group_info', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GetBusinessAssetsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + asset_type (str): Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP.. [optional] # noqa: E501 + asset_group_info (AssetGroupBinding): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """GetBusinessAssetsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + asset_type (str): Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP.. [optional] # noqa: E501 + asset_group_info (AssetGroupBinding): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/get_mmm_report_response.py b/openapi_generated/pinterest_client/model/get_mmm_report_response.py index 532b54e..e9e29f8 100644 --- a/openapi_generated/pinterest_client/model/get_mmm_report_response.py +++ b/openapi_generated/pinterest_client/model/get_mmm_report_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/get_mmm_report_response_data.py b/openapi_generated/pinterest_client/model/get_mmm_report_response_data.py index a54eaf6..fb49c4d 100644 --- a/openapi_generated/pinterest_client/model/get_mmm_report_response_data.py +++ b/openapi_generated/pinterest_client/model/get_mmm_report_response_data.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/get_partner_assets_response.py b/openapi_generated/pinterest_client/model/get_partner_assets_response.py new file mode 100644 index 0000000..e07fc44 --- /dev/null +++ b/openapi_generated/pinterest_client/model/get_partner_assets_response.py @@ -0,0 +1,281 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_group_binding import AssetGroupBinding + globals()['AssetGroupBinding'] = AssetGroupBinding + + +class GetPartnerAssetsResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_id',): { + 'max_length': 20, + 'min_length': 1, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_id': (str,), # noqa: E501 + 'asset_type': (str,), # noqa: E501 + 'permissions': ([str],), # noqa: E501 + 'asset_group_info': (AssetGroupBinding,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_id': 'asset_id', # noqa: E501 + 'asset_type': 'asset_type', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + 'asset_group_info': 'asset_group_info', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GetPartnerAssetsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + asset_type (str): Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP.. [optional] # noqa: E501 + permissions ([str]): The permissions you or your partner has on the asset. If partner_type=INTERNAL, the permission levels are for the access the partner has to your business asset.
    If partner_type=EXTERNAL, the permission levels are for the access you have to the partner's business asset.. [optional] # noqa: E501 + asset_group_info (AssetGroupBinding): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """GetPartnerAssetsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + asset_type (str): Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP.. [optional] # noqa: E501 + permissions ([str]): The permissions you or your partner has on the asset. If partner_type=INTERNAL, the permission levels are for the access the partner has to your business asset.
    If partner_type=EXTERNAL, the permission levels are for the access you have to the partner's business asset.. [optional] # noqa: E501 + asset_group_info (AssetGroupBinding): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/google_product_category0_filter.py b/openapi_generated/pinterest_client/model/google_product_category0_filter.py index 8e4cebd..3776008 100644 --- a/openapi_generated/pinterest_client/model/google_product_category0_filter.py +++ b/openapi_generated/pinterest_client/model/google_product_category0_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/google_product_category1_filter.py b/openapi_generated/pinterest_client/model/google_product_category1_filter.py index bf12a1c..1ea3606 100644 --- a/openapi_generated/pinterest_client/model/google_product_category1_filter.py +++ b/openapi_generated/pinterest_client/model/google_product_category1_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/google_product_category2_filter.py b/openapi_generated/pinterest_client/model/google_product_category2_filter.py index b0e74ab..a4fe603 100644 --- a/openapi_generated/pinterest_client/model/google_product_category2_filter.py +++ b/openapi_generated/pinterest_client/model/google_product_category2_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/google_product_category3_filter.py b/openapi_generated/pinterest_client/model/google_product_category3_filter.py index 5b2118a..f527f5b 100644 --- a/openapi_generated/pinterest_client/model/google_product_category3_filter.py +++ b/openapi_generated/pinterest_client/model/google_product_category3_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/google_product_category4_filter.py b/openapi_generated/pinterest_client/model/google_product_category4_filter.py index 579de63..535c63c 100644 --- a/openapi_generated/pinterest_client/model/google_product_category4_filter.py +++ b/openapi_generated/pinterest_client/model/google_product_category4_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/google_product_category5_filter.py b/openapi_generated/pinterest_client/model/google_product_category5_filter.py index f089515..6e040ae 100644 --- a/openapi_generated/pinterest_client/model/google_product_category5_filter.py +++ b/openapi_generated/pinterest_client/model/google_product_category5_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/google_product_category6_filter.py b/openapi_generated/pinterest_client/model/google_product_category6_filter.py index 9f72288..0a6cace 100644 --- a/openapi_generated/pinterest_client/model/google_product_category6_filter.py +++ b/openapi_generated/pinterest_client/model/google_product_category6_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/granularity.py b/openapi_generated/pinterest_client/model/granularity.py index 57a9c1d..68c845b 100644 --- a/openapi_generated/pinterest_client/model/granularity.py +++ b/openapi_generated/pinterest_client/model/granularity.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/grid_click_type.py b/openapi_generated/pinterest_client/model/grid_click_type.py new file mode 100644 index 0000000..6be6183 --- /dev/null +++ b/openapi_generated/pinterest_client/model/grid_click_type.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class GridClickType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'None': None, + 'CLOSEUP': "CLOSEUP", + 'DIRECT_TO_DESTINATION': "DIRECT_TO_DESTINATION", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """GridClickType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Where a user is taken after clicking on an ad in grid.

    Note: This parameter is read-only and is set to DIRECT_TO_DESTINATION by default for direct links supported ads. grid_click_type values provided will be ignored.., must be one of ["CLOSEUP", "DIRECT_TO_DESTINATION", ] # noqa: E501 + + Keyword Args: + value (str): Where a user is taken after clicking on an ad in grid.

    Note: This parameter is read-only and is set to DIRECT_TO_DESTINATION by default for direct links supported ads. grid_click_type values provided will be ignored.., must be one of ["CLOSEUP", "DIRECT_TO_DESTINATION", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """GridClickType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Where a user is taken after clicking on an ad in grid.

    Note: This parameter is read-only and is set to DIRECT_TO_DESTINATION by default for direct links supported ads. grid_click_type values provided will be ignored.., must be one of ["CLOSEUP", "DIRECT_TO_DESTINATION", ] # noqa: E501 + + Keyword Args: + value (str): Where a user is taken after clicking on an ad in grid.

    Note: This parameter is read-only and is set to DIRECT_TO_DESTINATION by default for direct links supported ads. grid_click_type values provided will be ignored.., must be one of ["CLOSEUP", "DIRECT_TO_DESTINATION", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/hotel_id_filter.py b/openapi_generated/pinterest_client/model/hotel_id_filter.py new file mode 100644 index 0000000..e85e250 --- /dev/null +++ b/openapi_generated/pinterest_client/model/hotel_id_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_string_criteria import CatalogsProductGroupMultipleStringCriteria + globals()['CatalogsProductGroupMultipleStringCriteria'] = CatalogsProductGroupMultipleStringCriteria + + +class HotelIdFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'hotel_id': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'hotel_id': 'HOTEL_ID', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, hotel_id, *args, **kwargs): # noqa: E501 + """HotelIdFilter - a model defined in OpenAPI + + Args: + hotel_id (CatalogsProductGroupMultipleStringCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, hotel_id, *args, **kwargs): # noqa: E501 + """HotelIdFilter - a model defined in OpenAPI + + Args: + hotel_id (CatalogsProductGroupMultipleStringCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hotel_id = hotel_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/hotel_processing_record.py b/openapi_generated/pinterest_client/model/hotel_processing_record.py new file mode 100644 index 0000000..4f29607 --- /dev/null +++ b/openapi_generated/pinterest_client/model/hotel_processing_record.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.item_processing_status import ItemProcessingStatus + from openapi_generated.pinterest_client.model.item_validation_event import ItemValidationEvent + globals()['ItemProcessingStatus'] = ItemProcessingStatus + globals()['ItemValidationEvent'] = ItemValidationEvent + + +class HotelProcessingRecord(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'hotel_id': (str,), # noqa: E501 + 'errors': ([ItemValidationEvent],), # noqa: E501 + 'warnings': ([ItemValidationEvent],), # noqa: E501 + 'status': (ItemProcessingStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'hotel_id': 'hotel_id', # noqa: E501 + 'errors': 'errors', # noqa: E501 + 'warnings': 'warnings', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """HotelProcessingRecord - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + hotel_id (str): The catalog hotel id in the merchant namespace. [optional] # noqa: E501 + errors ([ItemValidationEvent]): Array with the validation errors for the item processing record. A non empty errors list causes the item processing to fail.. [optional] # noqa: E501 + warnings ([ItemValidationEvent]): Array with the validation warnings for the item processing record. [optional] # noqa: E501 + status (ItemProcessingStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """HotelProcessingRecord - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + hotel_id (str): The catalog hotel id in the merchant namespace. [optional] # noqa: E501 + errors ([ItemValidationEvent]): Array with the validation errors for the item processing record. A non empty errors list causes the item processing to fail.. [optional] # noqa: E501 + warnings ([ItemValidationEvent]): Array with the validation warnings for the item processing record. [optional] # noqa: E501 + status (ItemProcessingStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/image_details.py b/openapi_generated/pinterest_client/model/image_details.py index 451d629..3177d57 100644 --- a/openapi_generated/pinterest_client/model/image_details.py +++ b/openapi_generated/pinterest_client/model/image_details.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/image_metadata.py b/openapi_generated/pinterest_client/model/image_metadata.py index 8e3300b..294e326 100644 --- a/openapi_generated/pinterest_client/model/image_metadata.py +++ b/openapi_generated/pinterest_client/model/image_metadata.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.image_details import ImageDetails - globals()['ImageDetails'] = ImageDetails + from openapi_generated.pinterest_client.model.image_metadata_images import ImageMetadataImages + globals()['ImageMetadataImages'] = ImageMetadataImages class ImageMetadata(ModelNormal): @@ -92,7 +92,7 @@ def openapi_types(): 'title': (str, none_type,), # noqa: E501 'description': (str, none_type,), # noqa: E501 'link': (str, none_type,), # noqa: E501 - 'images': ({str: (ImageDetails,)},), # noqa: E501 + 'images': (ImageMetadataImages,), # noqa: E501 } @cached_property @@ -153,7 +153,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 title (str, none_type): [optional] # noqa: E501 description (str, none_type): [optional] # noqa: E501 link (str, none_type): [optional] # noqa: E501 - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -239,7 +239,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 title (str, none_type): [optional] # noqa: E501 description (str, none_type): [optional] # noqa: E501 link (str, none_type): [optional] # noqa: E501 - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/image_metadata_images.py b/openapi_generated/pinterest_client/model/image_metadata_images.py new file mode 100644 index 0000000..345ae6d --- /dev/null +++ b/openapi_generated/pinterest_client/model/image_metadata_images.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.image_details import ImageDetails + globals()['ImageDetails'] = ImageDetails + + +class ImageMetadataImages(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + '_150x150': (ImageDetails,), # noqa: E501 + '_400x300': (ImageDetails,), # noqa: E501 + '_600x': (ImageDetails,), # noqa: E501 + '_1200x': (ImageDetails,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '_150x150': '150x150', # noqa: E501 + '_400x300': '400x300', # noqa: E501 + '_600x': '600x', # noqa: E501 + '_1200x': '1200x', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ImageMetadataImages - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + _150x150 (ImageDetails): [optional] # noqa: E501 + _400x300 (ImageDetails): [optional] # noqa: E501 + _600x (ImageDetails): [optional] # noqa: E501 + _1200x (ImageDetails): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ImageMetadataImages - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + _150x150 (ImageDetails): [optional] # noqa: E501 + _400x300 (ImageDetails): [optional] # noqa: E501 + _600x (ImageDetails): [optional] # noqa: E501 + _1200x (ImageDetails): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/inline_object.py b/openapi_generated/pinterest_client/model/inline_object.py index a3269b4..21623c4 100644 --- a/openapi_generated/pinterest_client/model/inline_object.py +++ b/openapi_generated/pinterest_client/model/inline_object.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -30,6 +30,10 @@ from openapi_generated.pinterest_client.exceptions import ApiAttributeError +def lazy_import(): + from openapi_generated.pinterest_client.model.businesses_business_id_members_assets_access_accesses import BusinessesBusinessIdMembersAssetsAccessAccesses + globals()['BusinessesBusinessIdMembersAssetsAccessAccesses'] = BusinessesBusinessIdMembersAssetsAccessAccesses + class InlineObject(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -59,15 +63,9 @@ class InlineObject(ModelNormal): } validations = { - ('board_id',): { - 'regex': { - 'pattern': r'^\d+$', # noqa: E501 - }, - }, - ('board_section_id',): { - 'regex': { - 'pattern': r'^\d+$', # noqa: E501 - }, + ('accesses',): { + 'max_items': 100, + 'min_items': 1, }, } @@ -77,6 +75,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ + lazy_import() return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -91,9 +90,9 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ + lazy_import() return { - 'board_id': (str,), # noqa: E501 - 'board_section_id': (str, none_type,), # noqa: E501 + 'accesses': ([BusinessesBusinessIdMembersAssetsAccessAccesses],), # noqa: E501 } @cached_property @@ -102,8 +101,7 @@ def discriminator(): attribute_map = { - 'board_id': 'board_id', # noqa: E501 - 'board_section_id': 'board_section_id', # noqa: E501 + 'accesses': 'accesses', # noqa: E501 } read_only_vars = { @@ -113,9 +111,12 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, accesses, *args, **kwargs): # noqa: E501 """InlineObject - a model defined in OpenAPI + Args: + accesses ([BusinessesBusinessIdMembersAssetsAccessAccesses]): List of members asset access to be deleted + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -147,8 +148,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - board_id (str): Unique identifier of the board to which the pin will be saved.. [optional] # noqa: E501 - board_section_id (str, none_type): Unique identifier of the board section to which the pin will be saved.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -176,6 +175,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.accesses = accesses for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -196,9 +196,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, accesses, *args, **kwargs): # noqa: E501 """InlineObject - a model defined in OpenAPI + Args: + accesses ([BusinessesBusinessIdMembersAssetsAccessAccesses]): List of members asset access to be deleted + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -230,8 +233,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - board_id (str): Unique identifier of the board to which the pin will be saved.. [optional] # noqa: E501 - board_section_id (str, none_type): Unique identifier of the board section to which the pin will be saved.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -257,6 +258,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.accesses = accesses for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/openapi_generated/pinterest_client/model/inline_object1.py b/openapi_generated/pinterest_client/model/inline_object1.py new file mode 100644 index 0000000..5c08971 --- /dev/null +++ b/openapi_generated/pinterest_client/model/inline_object1.py @@ -0,0 +1,270 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class InlineObject1(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('board_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('board_section_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'board_id': (str, none_type,), # noqa: E501 + 'board_section_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'board_id': 'board_id', # noqa: E501 + 'board_section_id': 'board_section_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InlineObject1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + board_id (str, none_type): Unique identifier of the board to which the pin will be saved.. [optional] # noqa: E501 + board_section_id (str, none_type): Unique identifier of the board section to which the pin will be saved.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """InlineObject1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + board_id (str, none_type): Unique identifier of the board to which the pin will be saved.. [optional] # noqa: E501 + board_section_id (str, none_type): Unique identifier of the board section to which the pin will be saved.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/integration_log.py b/openapi_generated/pinterest_client/model/integration_log.py new file mode 100644 index 0000000..ce9624b --- /dev/null +++ b/openapi_generated/pinterest_client/model/integration_log.py @@ -0,0 +1,348 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.integration_log_client_error import IntegrationLogClientError + from openapi_generated.pinterest_client.model.integration_log_client_request import IntegrationLogClientRequest + globals()['IntegrationLogClientError'] = IntegrationLogClientError + globals()['IntegrationLogClientRequest'] = IntegrationLogClientRequest + + +class IntegrationLog(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('event_type',): { + 'APP': "APP", + 'API': "API", + }, + ('log_level',): { + 'INFO': "INFO", + 'WARN': "WARN", + 'ERROR': "ERROR", + }, + } + + validations = { + ('external_business_id',): { + 'max_length': 2048, + }, + ('advertiser_id',): { + 'max_length': 128, + }, + ('merchant_id',): { + 'max_length': 128, + }, + ('tag_id',): { + 'max_length': 128, + }, + ('feed_profile_id',): { + 'max_length': 128, + }, + ('message',): { + 'max_length': 2048, + }, + ('app_version_number',): { + 'max_length': 20, + }, + ('platform_version_number',): { + 'max_length': 20, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'client_timestamp': (int,), # noqa: E501 + 'event_type': (str,), # noqa: E501 + 'log_level': (str,), # noqa: E501 + 'external_business_id': (str, none_type,), # noqa: E501 + 'advertiser_id': (str, none_type,), # noqa: E501 + 'merchant_id': (str, none_type,), # noqa: E501 + 'tag_id': (str, none_type,), # noqa: E501 + 'feed_profile_id': (str, none_type,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'app_version_number': (str,), # noqa: E501 + 'platform_version_number': (str,), # noqa: E501 + 'error': (IntegrationLogClientError,), # noqa: E501 + 'request': (IntegrationLogClientRequest,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'client_timestamp': 'client_timestamp', # noqa: E501 + 'event_type': 'event_type', # noqa: E501 + 'log_level': 'log_level', # noqa: E501 + 'external_business_id': 'external_business_id', # noqa: E501 + 'advertiser_id': 'advertiser_id', # noqa: E501 + 'merchant_id': 'merchant_id', # noqa: E501 + 'tag_id': 'tag_id', # noqa: E501 + 'feed_profile_id': 'feed_profile_id', # noqa: E501 + 'message': 'message', # noqa: E501 + 'app_version_number': 'app_version_number', # noqa: E501 + 'platform_version_number': 'platform_version_number', # noqa: E501 + 'error': 'error', # noqa: E501 + 'request': 'request', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, client_timestamp, event_type, log_level, *args, **kwargs): # noqa: E501 + """IntegrationLog - a model defined in OpenAPI + + Args: + client_timestamp (int): Timestamp in milliseconds of when the log was executed at the client. + event_type (str): Log event type + log_level (str): Log level type + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + external_business_id (str, none_type): [optional] # noqa: E501 + advertiser_id (str, none_type): [optional] # noqa: E501 + merchant_id (str, none_type): [optional] # noqa: E501 + tag_id (str, none_type): [optional] # noqa: E501 + feed_profile_id (str, none_type): [optional] # noqa: E501 + message (str): Explanation of the event that occured.. [optional] # noqa: E501 + app_version_number (str): Version number of the integration application.. [optional] # noqa: E501 + platform_version_number (str): Version number of the platform the integration application is running on.. [optional] # noqa: E501 + error (IntegrationLogClientError): [optional] # noqa: E501 + request (IntegrationLogClientRequest): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.client_timestamp = client_timestamp + self.event_type = event_type + self.log_level = log_level + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, client_timestamp, event_type, log_level, *args, **kwargs): # noqa: E501 + """IntegrationLog - a model defined in OpenAPI + + Args: + client_timestamp (int): Timestamp in milliseconds of when the log was executed at the client. + event_type (str): Log event type + log_level (str): Log level type + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + external_business_id (str, none_type): [optional] # noqa: E501 + advertiser_id (str, none_type): [optional] # noqa: E501 + merchant_id (str, none_type): [optional] # noqa: E501 + tag_id (str, none_type): [optional] # noqa: E501 + feed_profile_id (str, none_type): [optional] # noqa: E501 + message (str): Explanation of the event that occured.. [optional] # noqa: E501 + app_version_number (str): Version number of the integration application.. [optional] # noqa: E501 + platform_version_number (str): Version number of the platform the integration application is running on.. [optional] # noqa: E501 + error (IntegrationLogClientError): [optional] # noqa: E501 + request (IntegrationLogClientRequest): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.client_timestamp = client_timestamp + self.event_type = event_type + self.log_level = log_level + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/integration_log_client_error.py b/openapi_generated/pinterest_client/model/integration_log_client_error.py new file mode 100644 index 0000000..cacc3c8 --- /dev/null +++ b/openapi_generated/pinterest_client/model/integration_log_client_error.py @@ -0,0 +1,297 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class IntegrationLogClientError(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('cause',): { + 'max_length': 512, + }, + ('file_name',): { + 'max_length': 256, + }, + ('message',): { + 'max_length': 512, + }, + ('message_detail',): { + 'max_length': 1024, + }, + ('name',): { + 'max_length': 256, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'cause': (str,), # noqa: E501 + 'column_number': (int,), # noqa: E501 + 'file_name': (str,), # noqa: E501 + 'line_number': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'message_detail': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'number': (int,), # noqa: E501 + 'stack_trace': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'cause': 'cause', # noqa: E501 + 'column_number': 'column_number', # noqa: E501 + 'file_name': 'file_name', # noqa: E501 + 'line_number': 'line_number', # noqa: E501 + 'message': 'message', # noqa: E501 + 'message_detail': 'message_detail', # noqa: E501 + 'name': 'name', # noqa: E501 + 'number': 'number', # noqa: E501 + 'stack_trace': 'stack_trace', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """IntegrationLogClientError - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cause (str): Original cause of the error.. [optional] # noqa: E501 + column_number (int): Column number in the line of the file that raised the error.. [optional] # noqa: E501 + file_name (str): Filename where the error happened.. [optional] # noqa: E501 + line_number (int): Line number where the error happened.. [optional] # noqa: E501 + message (str): Human-readable description of the error.. [optional] # noqa: E501 + message_detail (str): More detail about the message.. [optional] # noqa: E501 + name (str): Filename where the error happened.. [optional] # noqa: E501 + number (int): Integer that specifies the error code.. [optional] # noqa: E501 + stack_trace (str): Stack trace of where the error happened.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """IntegrationLogClientError - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cause (str): Original cause of the error.. [optional] # noqa: E501 + column_number (int): Column number in the line of the file that raised the error.. [optional] # noqa: E501 + file_name (str): Filename where the error happened.. [optional] # noqa: E501 + line_number (int): Line number where the error happened.. [optional] # noqa: E501 + message (str): Human-readable description of the error.. [optional] # noqa: E501 + message_detail (str): More detail about the message.. [optional] # noqa: E501 + name (str): Filename where the error happened.. [optional] # noqa: E501 + number (int): Integer that specifies the error code.. [optional] # noqa: E501 + stack_trace (str): Stack trace of where the error happened.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/integration_log_client_request.py b/openapi_generated/pinterest_client/model/integration_log_client_request.py new file mode 100644 index 0000000..f9251ff --- /dev/null +++ b/openapi_generated/pinterest_client/model/integration_log_client_request.py @@ -0,0 +1,291 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class IntegrationLogClientRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('method',): { + 'GET': "GET", + 'HEAD': "HEAD", + 'POST': "POST", + 'PUT': "PUT", + 'DELETE': "DELETE", + 'CONNECT': "CONNECT", + 'OPTIONS': "OPTIONS", + 'TRACE': "TRACE", + 'PATCH': "PATCH", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'method': (str,), # noqa: E501 + 'host': (str,), # noqa: E501 + 'path': (str,), # noqa: E501 + 'request_headers': ({str: (str,)},), # noqa: E501 + 'response_headers': ({str: (str,)},), # noqa: E501 + 'response_status_code': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'method': 'method', # noqa: E501 + 'host': 'host', # noqa: E501 + 'path': 'path', # noqa: E501 + 'request_headers': 'request_headers', # noqa: E501 + 'response_headers': 'response_headers', # noqa: E501 + 'response_status_code': 'response_status_code', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, method, host, path, *args, **kwargs): # noqa: E501 + """IntegrationLogClientRequest - a model defined in OpenAPI + + Args: + method (str): + host (str): HTTP request host from host header. + path (str): HTTP request path. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + request_headers ({str: (str,)}): HTTP request headers as key-value pairs.. [optional] # noqa: E501 + response_headers ({str: (str,)}): HTTP response headers as key-value pairs.. [optional] # noqa: E501 + response_status_code (int): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.method = method + self.host = host + self.path = path + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, method, host, path, *args, **kwargs): # noqa: E501 + """IntegrationLogClientRequest - a model defined in OpenAPI + + Args: + method (str): + host (str): HTTP request host from host header. + path (str): HTTP request path. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + request_headers ({str: (str,)}): HTTP request headers as key-value pairs.. [optional] # noqa: E501 + response_headers ({str: (str,)}): HTTP response headers as key-value pairs.. [optional] # noqa: E501 + response_status_code (int): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.method = method + self.host = host + self.path = path + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/integration_logs_invalid_log_response.py b/openapi_generated/pinterest_client/model/integration_logs_invalid_log_response.py new file mode 100644 index 0000000..ca0c818 --- /dev/null +++ b/openapi_generated/pinterest_client/model/integration_logs_invalid_log_response.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.integration_logs_invalid_log_response_rejected_logs import IntegrationLogsInvalidLogResponseRejectedLogs + globals()['IntegrationLogsInvalidLogResponseRejectedLogs'] = IntegrationLogsInvalidLogResponseRejectedLogs + + +class IntegrationLogsInvalidLogResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'rejected_logs': ([IntegrationLogsInvalidLogResponseRejectedLogs],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'rejected_logs': 'rejected_logs', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """IntegrationLogsInvalidLogResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + rejected_logs ([IntegrationLogsInvalidLogResponseRejectedLogs]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """IntegrationLogsInvalidLogResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + rejected_logs ([IntegrationLogsInvalidLogResponseRejectedLogs]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/integration_logs_invalid_log_response_rejected_logs.py b/openapi_generated/pinterest_client/model/integration_logs_invalid_log_response_rejected_logs.py new file mode 100644 index 0000000..f18e3ba --- /dev/null +++ b/openapi_generated/pinterest_client/model/integration_logs_invalid_log_response_rejected_logs.py @@ -0,0 +1,278 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class IntegrationLogsInvalidLogResponseRejectedLogs(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'field': (str,), # noqa: E501 + 'value': (str,), # noqa: E501 + 'reason': (str,), # noqa: E501 + 'log_index': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'field': 'field', # noqa: E501 + 'value': 'value', # noqa: E501 + 'reason': 'reason', # noqa: E501 + 'log_index': 'log_index', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, field, value, reason, *args, **kwargs): # noqa: E501 + """IntegrationLogsInvalidLogResponseRejectedLogs - a model defined in OpenAPI + + Args: + field (str): The field name containing an invalid value. + value (str): The value that is invalid. + reason (str): The reason the value is invalid. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + log_index (int): Index of the log in the batch.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.field = field + self.value = value + self.reason = reason + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, field, value, reason, *args, **kwargs): # noqa: E501 + """IntegrationLogsInvalidLogResponseRejectedLogs - a model defined in OpenAPI + + Args: + field (str): The field name containing an invalid value. + value (str): The value that is invalid. + reason (str): The reason the value is invalid. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + log_index (int): Index of the log in the batch.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.field = field + self.value = value + self.reason = reason + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/integration_logs_request.py b/openapi_generated/pinterest_client/model/integration_logs_request.py new file mode 100644 index 0000000..d97149c --- /dev/null +++ b/openapi_generated/pinterest_client/model/integration_logs_request.py @@ -0,0 +1,265 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.integration_log import IntegrationLog + globals()['IntegrationLog'] = IntegrationLog + + +class IntegrationLogsRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('logs',): { + 'max_items': 250, + 'min_items': 1, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'logs': ([IntegrationLog],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'logs': 'logs', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, logs, *args, **kwargs): # noqa: E501 + """IntegrationLogsRequest - a model defined in OpenAPI + + Args: + logs ([IntegrationLog]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.logs = logs + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, logs, *args, **kwargs): # noqa: E501 + """IntegrationLogsRequest - a model defined in OpenAPI + + Args: + logs ([IntegrationLog]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.logs = logs + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/integration_logs_success_response.py b/openapi_generated/pinterest_client/model/integration_logs_success_response.py new file mode 100644 index 0000000..03cfa28 --- /dev/null +++ b/openapi_generated/pinterest_client/model/integration_logs_success_response.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class IntegrationLogsSuccessResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'message': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'message': 'message', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """IntegrationLogsSuccessResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + message (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """IntegrationLogsSuccessResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + message (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/integration_metadata.py b/openapi_generated/pinterest_client/model/integration_metadata.py index 6a3da03..47a1295 100644 --- a/openapi_generated/pinterest_client/model/integration_metadata.py +++ b/openapi_generated/pinterest_client/model/integration_metadata.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/integration_record.py b/openapi_generated/pinterest_client/model/integration_record.py index f2af348..9648ede 100644 --- a/openapi_generated/pinterest_client/model/integration_record.py +++ b/openapi_generated/pinterest_client/model/integration_record.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/integration_request.py b/openapi_generated/pinterest_client/model/integration_request.py index decc6d2..511679c 100644 --- a/openapi_generated/pinterest_client/model/integration_request.py +++ b/openapi_generated/pinterest_client/model/integration_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -90,8 +90,8 @@ def openapi_types(): 'partner_access_token': (str,), # noqa: E501 'partner_refresh_token': (str,), # noqa: E501 'partner_primary_email': (str,), # noqa: E501 - 'partner_access_token_expiry': (float,), # noqa: E501 - 'partner_refresh_token_expiry': (float,), # noqa: E501 + 'partner_access_token_expiry': (int,), # noqa: E501 + 'partner_refresh_token_expiry': (int,), # noqa: E501 'scopes': (str,), # noqa: E501 'additional_id_1': (str,), # noqa: E501 'partner_metadata': (str,), # noqa: E501 @@ -167,8 +167,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 partner_access_token (str): [optional] # noqa: E501 partner_refresh_token (str): [optional] # noqa: E501 partner_primary_email (str): [optional] # noqa: E501 - partner_access_token_expiry (float): [optional] # noqa: E501 - partner_refresh_token_expiry (float): [optional] # noqa: E501 + partner_access_token_expiry (int): [optional] # noqa: E501 + partner_refresh_token_expiry (int): [optional] # noqa: E501 scopes (str): [optional] # noqa: E501 additional_id_1 (str): [optional] # noqa: E501 partner_metadata (str): [optional] # noqa: E501 @@ -261,8 +261,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 partner_access_token (str): [optional] # noqa: E501 partner_refresh_token (str): [optional] # noqa: E501 partner_primary_email (str): [optional] # noqa: E501 - partner_access_token_expiry (float): [optional] # noqa: E501 - partner_refresh_token_expiry (float): [optional] # noqa: E501 + partner_access_token_expiry (int): [optional] # noqa: E501 + partner_refresh_token_expiry (int): [optional] # noqa: E501 scopes (str): [optional] # noqa: E501 additional_id_1 (str): [optional] # noqa: E501 partner_metadata (str): [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/integration_request_patch.py b/openapi_generated/pinterest_client/model/integration_request_patch.py index 29bb323..c7d054e 100644 --- a/openapi_generated/pinterest_client/model/integration_request_patch.py +++ b/openapi_generated/pinterest_client/model/integration_request_patch.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/interest.py b/openapi_generated/pinterest_client/model/interest.py index ef2fb20..68ee89e 100644 --- a/openapi_generated/pinterest_client/model/interest.py +++ b/openapi_generated/pinterest_client/model/interest.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/invite_assets_summary.py b/openapi_generated/pinterest_client/model/invite_assets_summary.py new file mode 100644 index 0000000..ec50758 --- /dev/null +++ b/openapi_generated/pinterest_client/model/invite_assets_summary.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.invite_assets_summary_ad_accounts import InviteAssetsSummaryAdAccounts + from openapi_generated.pinterest_client.model.invite_assets_summary_profiles import InviteAssetsSummaryProfiles + globals()['InviteAssetsSummaryAdAccounts'] = InviteAssetsSummaryAdAccounts + globals()['InviteAssetsSummaryProfiles'] = InviteAssetsSummaryProfiles + + +class InviteAssetsSummary(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'ad_accounts': ([InviteAssetsSummaryAdAccounts],), # noqa: E501 + 'profiles': ([InviteAssetsSummaryProfiles],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ad_accounts': 'ad_accounts', # noqa: E501 + 'profiles': 'profiles', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InviteAssetsSummary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + ad_accounts ([InviteAssetsSummaryAdAccounts]): List of ad account IDs and respective permission levels that will be assigned.. [optional] # noqa: E501 + profiles ([InviteAssetsSummaryProfiles]): List of profile IDs and respective permission levels that will be assigned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """InviteAssetsSummary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + ad_accounts ([InviteAssetsSummaryAdAccounts]): List of ad account IDs and respective permission levels that will be assigned.. [optional] # noqa: E501 + profiles ([InviteAssetsSummaryProfiles]): List of profile IDs and respective permission levels that will be assigned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/invite_assets_summary_ad_accounts.py b/openapi_generated/pinterest_client/model/invite_assets_summary_ad_accounts.py new file mode 100644 index 0000000..29b86ed --- /dev/null +++ b/openapi_generated/pinterest_client/model/invite_assets_summary_ad_accounts.py @@ -0,0 +1,271 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.permissions_response import PermissionsResponse + globals()['PermissionsResponse'] = PermissionsResponse + + +class InviteAssetsSummaryAdAccounts(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'permissions': (PermissionsResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InviteAssetsSummaryAdAccounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of a business ad account.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """InviteAssetsSummaryAdAccounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of a business ad account.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/invite_assets_summary_profiles.py b/openapi_generated/pinterest_client/model/invite_assets_summary_profiles.py new file mode 100644 index 0000000..478e09b --- /dev/null +++ b/openapi_generated/pinterest_client/model/invite_assets_summary_profiles.py @@ -0,0 +1,271 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.permissions_response import PermissionsResponse + globals()['PermissionsResponse'] = PermissionsResponse + + +class InviteAssetsSummaryProfiles(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'permissions': (PermissionsResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InviteAssetsSummaryProfiles - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of a business profile.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """InviteAssetsSummaryProfiles - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of a business profile.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/invite_business_role_binding.py b/openapi_generated/pinterest_client/model/invite_business_role_binding.py new file mode 100644 index 0000000..76db2d2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/invite_business_role_binding.py @@ -0,0 +1,341 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.base_invite_data_response import BaseInviteDataResponse + from openapi_generated.pinterest_client.model.base_invite_data_response_invite_data import BaseInviteDataResponseInviteData + from openapi_generated.pinterest_client.model.business_access_user_summary import BusinessAccessUserSummary + globals()['BaseInviteDataResponse'] = BaseInviteDataResponse + globals()['BaseInviteDataResponseInviteData'] = BaseInviteDataResponseInviteData + globals()['BusinessAccessUserSummary'] = BusinessAccessUserSummary + + +class InviteBusinessRoleBinding(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'created_by_business_id': (str,), # noqa: E501 + 'created_by_user_id': (str,), # noqa: E501 + 'user': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'id': (str,), # noqa: E501 + 'invite_data': (BaseInviteDataResponseInviteData,), # noqa: E501 + 'is_received_invite': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'created_by_business_id': 'created_by_business_id', # noqa: E501 + 'created_by_user_id': 'created_by_user_id', # noqa: E501 + 'user': 'user', # noqa: E501 + 'id': 'id', # noqa: E501 + 'invite_data': 'invite_data', # noqa: E501 + 'is_received_invite': 'is_received_invite', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InviteBusinessRoleBinding - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + created_by_business_id (str): Unique identifier for the business that created the invite/request.. [optional] # noqa: E501 + created_by_user_id (str): Unique identifier for the user that created the invite/request.. [optional] # noqa: E501 + user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Metadata for the user that updated the invite/request.. [optional] # noqa: E501 + id (str): Unique identifier of the invite/request.. [optional] # noqa: E501 + invite_data (BaseInviteDataResponseInviteData): [optional] # noqa: E501 + is_received_invite (bool): Indicates whether the invite/request was received.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """InviteBusinessRoleBinding - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + created_by_business_id (str): Unique identifier for the business that created the invite/request.. [optional] # noqa: E501 + created_by_user_id (str): Unique identifier for the user that created the invite/request.. [optional] # noqa: E501 + user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Metadata for the user that updated the invite/request.. [optional] # noqa: E501 + id (str): Unique identifier of the invite/request.. [optional] # noqa: E501 + invite_data (BaseInviteDataResponseInviteData): [optional] # noqa: E501 + is_received_invite (bool): Indicates whether the invite/request was received.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/invite_exception_response.py b/openapi_generated/pinterest_client/model/invite_exception_response.py new file mode 100644 index 0000000..fed661e --- /dev/null +++ b/openapi_generated/pinterest_client/model/invite_exception_response.py @@ -0,0 +1,273 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class InviteExceptionResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('invite_or_request_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'invite_or_request_id': (str, none_type,), # noqa: E501 + 'code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'users_or_partner_ids': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'invite_or_request_id': 'invite_or_request_id', # noqa: E501 + 'code': 'code', # noqa: E501 + 'message': 'message', # noqa: E501 + 'users_or_partner_ids': 'users_or_partner_ids', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InviteExceptionResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invite_or_request_id (str, none_type): Unique identifier of the invite/request.. [optional] # noqa: E501 + code (int): Error code associated with the error in performing the action on the invite/request.. [optional] # noqa: E501 + message (str): Error message associated with the error in performing the action on the invite/request.. [optional] # noqa: E501 + users_or_partner_ids ([str], none_type): A list of users' usernames or emails OR a list of partner ids that caused the error.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """InviteExceptionResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invite_or_request_id (str, none_type): Unique identifier of the invite/request.. [optional] # noqa: E501 + code (int): Error code associated with the error in performing the action on the invite/request.. [optional] # noqa: E501 + message (str): Error message associated with the error in performing the action on the invite/request.. [optional] # noqa: E501 + users_or_partner_ids ([str], none_type): A list of users' usernames or emails OR a list of partner ids that caused the error.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/invite_response.py b/openapi_generated/pinterest_client/model/invite_response.py new file mode 100644 index 0000000..149d0ab --- /dev/null +++ b/openapi_generated/pinterest_client/model/invite_response.py @@ -0,0 +1,355 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.base_invite_data_response import BaseInviteDataResponse + from openapi_generated.pinterest_client.model.base_invite_data_response_invite_data import BaseInviteDataResponseInviteData + from openapi_generated.pinterest_client.model.business_access_user_summary import BusinessAccessUserSummary + from openapi_generated.pinterest_client.model.invite_assets_summary import InviteAssetsSummary + globals()['BaseInviteDataResponse'] = BaseInviteDataResponse + globals()['BaseInviteDataResponseInviteData'] = BaseInviteDataResponseInviteData + globals()['BusinessAccessUserSummary'] = BusinessAccessUserSummary + globals()['InviteAssetsSummary'] = InviteAssetsSummary + + +class InviteResponse(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'assets_summary': (InviteAssetsSummary,), # noqa: E501 + 'business_roles': ([str],), # noqa: E501 + 'created_by_business': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'created_by_user': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'created_time': (int,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'invite_data': (BaseInviteDataResponseInviteData,), # noqa: E501 + 'is_received_invite': (bool,), # noqa: E501 + 'user': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'assets_summary': 'assets_summary', # noqa: E501 + 'business_roles': 'business_roles', # noqa: E501 + 'created_by_business': 'created_by_business', # noqa: E501 + 'created_by_user': 'created_by_user', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + 'id': 'id', # noqa: E501 + 'invite_data': 'invite_data', # noqa: E501 + 'is_received_invite': 'is_received_invite', # noqa: E501 + 'user': 'user', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InviteResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + assets_summary (InviteAssetsSummary): [optional] # noqa: E501 + business_roles ([str]): The access level a user would be granted on the business if the invite/request is accepted. This can be EMPLOYEE, BIZ_ADMIN, or PARTNER.. [optional] # noqa: E501 + created_by_business ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata for the business that created the invite/request.. [optional] # noqa: E501 + created_by_user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata for the user that created the invite/request.. [optional] # noqa: E501 + created_time (int): The time the invite/request was created. Returned in milliseconds.. [optional] # noqa: E501 + id (str): Unique identifier of the invite/request.. [optional] # noqa: E501 + invite_data (BaseInviteDataResponseInviteData): [optional] # noqa: E501 + is_received_invite (bool): Indicates whether the invite/request was received.. [optional] # noqa: E501 + user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Metadata for the member/partner that was sent the invite/request.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """InviteResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + assets_summary (InviteAssetsSummary): [optional] # noqa: E501 + business_roles ([str]): The access level a user would be granted on the business if the invite/request is accepted. This can be EMPLOYEE, BIZ_ADMIN, or PARTNER.. [optional] # noqa: E501 + created_by_business ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata for the business that created the invite/request.. [optional] # noqa: E501 + created_by_user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata for the user that created the invite/request.. [optional] # noqa: E501 + created_time (int): The time the invite/request was created. Returned in milliseconds.. [optional] # noqa: E501 + id (str): Unique identifier of the invite/request.. [optional] # noqa: E501 + invite_data (BaseInviteDataResponseInviteData): [optional] # noqa: E501 + is_received_invite (bool): Indicates whether the invite/request was received.. [optional] # noqa: E501 + user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Metadata for the member/partner that was sent the invite/request.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/invite_status.py b/openapi_generated/pinterest_client/model/invite_status.py new file mode 100644 index 0000000..e22f060 --- /dev/null +++ b/openapi_generated/pinterest_client/model/invite_status.py @@ -0,0 +1,286 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class InviteStatus(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'PENDING': "PENDING", + 'ACCEPTED': "ACCEPTED", + 'DECLINED': "DECLINED", + 'CANCELLED': "CANCELLED", + 'EXPIRED': "EXPIRED", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """InviteStatus - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The current status of the invite.., must be one of ["PENDING", "ACCEPTED", "DECLINED", "CANCELLED", "EXPIRED", ] # noqa: E501 + + Keyword Args: + value (str): The current status of the invite.., must be one of ["PENDING", "ACCEPTED", "DECLINED", "CANCELLED", "EXPIRED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """InviteStatus - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The current status of the invite.., must be one of ["PENDING", "ACCEPTED", "DECLINED", "CANCELLED", "EXPIRED", ] # noqa: E501 + + Keyword Args: + value (str): The current status of the invite.., must be one of ["PENDING", "ACCEPTED", "DECLINED", "CANCELLED", "EXPIRED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/invite_type.py b/openapi_generated/pinterest_client/model/invite_type.py new file mode 100644 index 0000000..4941674 --- /dev/null +++ b/openapi_generated/pinterest_client/model/invite_type.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class InviteType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'MEMBER_INVITE': "MEMBER_INVITE", + 'PARTNER_INVITE': "PARTNER_INVITE", + 'PARTNER_REQUEST': "PARTNER_REQUEST", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """InviteType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The type of invite.
    'MEMBER_INVITE' is to invite a member to access your business assets.
    'PARTNER INVITE' is to invite a partner to access your business assets.
    'PARTNER_REQUEST' is to request access a partner's business assets.., must be one of ["MEMBER_INVITE", "PARTNER_INVITE", "PARTNER_REQUEST", ] # noqa: E501 + + Keyword Args: + value (str): The type of invite.
    'MEMBER_INVITE' is to invite a member to access your business assets.
    'PARTNER INVITE' is to invite a partner to access your business assets.
    'PARTNER_REQUEST' is to request access a partner's business assets.., must be one of ["MEMBER_INVITE", "PARTNER_INVITE", "PARTNER_REQUEST", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """InviteType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The type of invite.
    'MEMBER_INVITE' is to invite a member to access your business assets.
    'PARTNER INVITE' is to invite a partner to access your business assets.
    'PARTNER_REQUEST' is to request access a partner's business assets.., must be one of ["MEMBER_INVITE", "PARTNER_INVITE", "PARTNER_REQUEST", ] # noqa: E501 + + Keyword Args: + value (str): The type of invite.
    'MEMBER_INVITE' is to invite a member to access your business assets.
    'PARTNER INVITE' is to invite a partner to access your business assets.
    'PARTNER_REQUEST' is to request access a partner's business assets.., must be one of ["MEMBER_INVITE", "PARTNER_INVITE", "PARTNER_REQUEST", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/item_attributes.py b/openapi_generated/pinterest_client/model/item_attributes.py index 100213e..6a44b78 100644 --- a/openapi_generated/pinterest_client/model/item_attributes.py +++ b/openapi_generated/pinterest_client/model/item_attributes.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -95,6 +95,7 @@ def openapi_types(): return { 'additional_image_link': ([str], none_type,), # noqa: E501 'image_link': ([str],), # noqa: E501 + 'video_link': (str, none_type,), # noqa: E501 'ad_link': (str, none_type,), # noqa: E501 'adult': (bool, none_type,), # noqa: E501 'age_group': (str, none_type,), # noqa: E501 @@ -150,6 +151,7 @@ def discriminator(): attribute_map = { 'additional_image_link': 'additional_image_link', # noqa: E501 'image_link': 'image_link', # noqa: E501 + 'video_link': 'video_link', # noqa: E501 'ad_link': 'ad_link', # noqa: E501 'adult': 'adult', # noqa: E501 'age_group': 'age_group', # noqa: E501 @@ -238,13 +240,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) additional_image_link ([str], none_type):

    <= 2000 characters

    The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.

    . [optional] # noqa: E501 image_link ([str]):

    <= 2000 characters

    The link to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.

    . [optional] # noqa: E501 + video_link (str, none_type):

    <= 2,000 characters

    Hosted link to the product video.

    File types for linked videos must be .mp4, .mov or .m4v.

    File size cannot exceed 2GB.

    . [optional] # noqa: E501 ad_link (str, none_type): Allows advertisers to specify a separate URL that can be used to track traffic coming from Pinterest shopping ads. Must send full URL including tracking—do not send tracking parameters only. At this time we do not support impression tracking. Must begin with http:// or https://.. [optional] # noqa: E501 adult (bool, none_type): Set this attribute to TRUE if you're submitting items that are considered “adult”. These will not be shown on Pinterest.. [optional] # noqa: E501 age_group (str, none_type): The age group to apply a demographic range to the product. Must be one of the following values (upper or lowercased): ‘newborn’ , ‘infant’, ‘toddler’, ‘kids’, or ‘adult’.. [optional] # noqa: E501 availability (str): The availability of the product. Must be one of the following values (upper or lowercased): ‘in stock’, ‘out of stock’ , ‘preorder’.. [optional] # noqa: E501 average_review_rating (float, none_type): Average reviews for the item. Can be a number from 1-5.. [optional] # noqa: E501 brand (str, none_type): The brand of the product.. [optional] # noqa: E501 - checkout_enabled (bool, none_type): Set this attribute to FALSE to indicate items that should be excluded from the Pinterest Checkout program. Note, this product is currently being tested and your account must be enrolled. Please contact your Account Manager or contact us for more information.. [optional] # noqa: E501 + checkout_enabled (bool, none_type): This attribute is not supported anymore.. [optional] # noqa: E501 color (str, none_type): The primary color of the product.. [optional] # noqa: E501 condition (str, none_type): The condition of the product. Must be one of the following values (upper or lowercased): ‘new’, ‘used’, or ‘refurbished’.. [optional] # noqa: E501 custom_label_0 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 @@ -384,13 +387,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) additional_image_link ([str], none_type):

    <= 2000 characters

    The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.

    . [optional] # noqa: E501 image_link ([str]):

    <= 2000 characters

    The link to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.

    . [optional] # noqa: E501 + video_link (str, none_type):

    <= 2,000 characters

    Hosted link to the product video.

    File types for linked videos must be .mp4, .mov or .m4v.

    File size cannot exceed 2GB.

    . [optional] # noqa: E501 ad_link (str, none_type): Allows advertisers to specify a separate URL that can be used to track traffic coming from Pinterest shopping ads. Must send full URL including tracking—do not send tracking parameters only. At this time we do not support impression tracking. Must begin with http:// or https://.. [optional] # noqa: E501 adult (bool, none_type): Set this attribute to TRUE if you're submitting items that are considered “adult”. These will not be shown on Pinterest.. [optional] # noqa: E501 age_group (str, none_type): The age group to apply a demographic range to the product. Must be one of the following values (upper or lowercased): ‘newborn’ , ‘infant’, ‘toddler’, ‘kids’, or ‘adult’.. [optional] # noqa: E501 availability (str): The availability of the product. Must be one of the following values (upper or lowercased): ‘in stock’, ‘out of stock’ , ‘preorder’.. [optional] # noqa: E501 average_review_rating (float, none_type): Average reviews for the item. Can be a number from 1-5.. [optional] # noqa: E501 brand (str, none_type): The brand of the product.. [optional] # noqa: E501 - checkout_enabled (bool, none_type): Set this attribute to FALSE to indicate items that should be excluded from the Pinterest Checkout program. Note, this product is currently being tested and your account must be enrolled. Please contact your Account Manager or contact us for more information.. [optional] # noqa: E501 + checkout_enabled (bool, none_type): This attribute is not supported anymore.. [optional] # noqa: E501 color (str, none_type): The primary color of the product.. [optional] # noqa: E501 condition (str, none_type): The condition of the product. Must be one of the following values (upper or lowercased): ‘new’, ‘used’, or ‘refurbished’.. [optional] # noqa: E501 custom_label_0 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/item_attributes_all_of.py b/openapi_generated/pinterest_client/model/item_attributes_all_of.py index 43dcb7b..986fca1 100644 --- a/openapi_generated/pinterest_client/model/item_attributes_all_of.py +++ b/openapi_generated/pinterest_client/model/item_attributes_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -87,6 +87,7 @@ def openapi_types(): return { 'additional_image_link': ([str], none_type,), # noqa: E501 'image_link': ([str],), # noqa: E501 + 'video_link': (str, none_type,), # noqa: E501 } @cached_property @@ -97,6 +98,7 @@ def discriminator(): attribute_map = { 'additional_image_link': 'additional_image_link', # noqa: E501 'image_link': 'image_link', # noqa: E501 + 'video_link': 'video_link', # noqa: E501 } read_only_vars = { @@ -142,6 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) additional_image_link ([str], none_type):

    <= 2000 characters

    The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.

    . [optional] # noqa: E501 image_link ([str]):

    <= 2000 characters

    The link to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.

    . [optional] # noqa: E501 + video_link (str, none_type):

    <= 2,000 characters

    Hosted link to the product video.

    File types for linked videos must be .mp4, .mov or .m4v.

    File size cannot exceed 2GB.

    . [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -225,6 +228,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) additional_image_link ([str], none_type):

    <= 2000 characters

    The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.

    . [optional] # noqa: E501 image_link ([str]):

    <= 2000 characters

    The link to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.

    . [optional] # noqa: E501 + video_link (str, none_type):

    <= 2,000 characters

    Hosted link to the product video.

    File types for linked videos must be .mp4, .mov or .m4v.

    File size cannot exceed 2GB.

    . [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/item_attributes_request.py b/openapi_generated/pinterest_client/model/item_attributes_request.py new file mode 100644 index 0000000..81770b3 --- /dev/null +++ b/openapi_generated/pinterest_client/model/item_attributes_request.py @@ -0,0 +1,502 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.item_attributes_request_all_of import ItemAttributesRequestAllOf + from openapi_generated.pinterest_client.model.updatable_item_attributes import UpdatableItemAttributes + globals()['ItemAttributesRequestAllOf'] = ItemAttributesRequestAllOf + globals()['UpdatableItemAttributes'] = UpdatableItemAttributes + + +class ItemAttributesRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'additional_image_link': ([str], none_type,), # noqa: E501 + 'image_link': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'video_link': (str, none_type,), # noqa: E501 + 'ad_link': (str, none_type,), # noqa: E501 + 'adult': (bool, none_type,), # noqa: E501 + 'age_group': (str, none_type,), # noqa: E501 + 'availability': (str,), # noqa: E501 + 'average_review_rating': (float, none_type,), # noqa: E501 + 'brand': (str, none_type,), # noqa: E501 + 'checkout_enabled': (bool, none_type,), # noqa: E501 + 'color': (str, none_type,), # noqa: E501 + 'condition': (str, none_type,), # noqa: E501 + 'custom_label_0': (str, none_type,), # noqa: E501 + 'custom_label_1': (str, none_type,), # noqa: E501 + 'custom_label_2': (str, none_type,), # noqa: E501 + 'custom_label_3': (str, none_type,), # noqa: E501 + 'custom_label_4': (str, none_type,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'free_shipping_label': (bool, none_type,), # noqa: E501 + 'free_shipping_limit': (str, none_type,), # noqa: E501 + 'gender': (str, none_type,), # noqa: E501 + 'google_product_category': (str, none_type,), # noqa: E501 + 'gtin': (int, none_type,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'item_group_id': (str, none_type,), # noqa: E501 + 'last_updated_time': (int, none_type,), # noqa: E501 + 'link': (str,), # noqa: E501 + 'material': (str, none_type,), # noqa: E501 + 'min_ad_price': (str, none_type,), # noqa: E501 + 'mobile_link': (str, none_type,), # noqa: E501 + 'mpn': (str, none_type,), # noqa: E501 + 'number_of_ratings': (int, none_type,), # noqa: E501 + 'number_of_reviews': (int, none_type,), # noqa: E501 + 'pattern': (str, none_type,), # noqa: E501 + 'price': (str,), # noqa: E501 + 'product_type': (str, none_type,), # noqa: E501 + 'sale_price': (str, none_type,), # noqa: E501 + 'shipping': (str, none_type,), # noqa: E501 + 'shipping_height': (str, none_type,), # noqa: E501 + 'shipping_weight': (str, none_type,), # noqa: E501 + 'shipping_width': (str, none_type,), # noqa: E501 + 'size': (str, none_type,), # noqa: E501 + 'size_system': (str, none_type,), # noqa: E501 + 'size_type': (str, none_type,), # noqa: E501 + 'tax': (str, none_type,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'variant_names': ([str], none_type,), # noqa: E501 + 'variant_values': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'additional_image_link': 'additional_image_link', # noqa: E501 + 'image_link': 'image_link', # noqa: E501 + 'video_link': 'video_link', # noqa: E501 + 'ad_link': 'ad_link', # noqa: E501 + 'adult': 'adult', # noqa: E501 + 'age_group': 'age_group', # noqa: E501 + 'availability': 'availability', # noqa: E501 + 'average_review_rating': 'average_review_rating', # noqa: E501 + 'brand': 'brand', # noqa: E501 + 'checkout_enabled': 'checkout_enabled', # noqa: E501 + 'color': 'color', # noqa: E501 + 'condition': 'condition', # noqa: E501 + 'custom_label_0': 'custom_label_0', # noqa: E501 + 'custom_label_1': 'custom_label_1', # noqa: E501 + 'custom_label_2': 'custom_label_2', # noqa: E501 + 'custom_label_3': 'custom_label_3', # noqa: E501 + 'custom_label_4': 'custom_label_4', # noqa: E501 + 'description': 'description', # noqa: E501 + 'free_shipping_label': 'free_shipping_label', # noqa: E501 + 'free_shipping_limit': 'free_shipping_limit', # noqa: E501 + 'gender': 'gender', # noqa: E501 + 'google_product_category': 'google_product_category', # noqa: E501 + 'gtin': 'gtin', # noqa: E501 + 'id': 'id', # noqa: E501 + 'item_group_id': 'item_group_id', # noqa: E501 + 'last_updated_time': 'last_updated_time', # noqa: E501 + 'link': 'link', # noqa: E501 + 'material': 'material', # noqa: E501 + 'min_ad_price': 'min_ad_price', # noqa: E501 + 'mobile_link': 'mobile_link', # noqa: E501 + 'mpn': 'mpn', # noqa: E501 + 'number_of_ratings': 'number_of_ratings', # noqa: E501 + 'number_of_reviews': 'number_of_reviews', # noqa: E501 + 'pattern': 'pattern', # noqa: E501 + 'price': 'price', # noqa: E501 + 'product_type': 'product_type', # noqa: E501 + 'sale_price': 'sale_price', # noqa: E501 + 'shipping': 'shipping', # noqa: E501 + 'shipping_height': 'shipping_height', # noqa: E501 + 'shipping_weight': 'shipping_weight', # noqa: E501 + 'shipping_width': 'shipping_width', # noqa: E501 + 'size': 'size', # noqa: E501 + 'size_system': 'size_system', # noqa: E501 + 'size_type': 'size_type', # noqa: E501 + 'tax': 'tax', # noqa: E501 + 'title': 'title', # noqa: E501 + 'variant_names': 'variant_names', # noqa: E501 + 'variant_values': 'variant_values', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ItemAttributesRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + additional_image_link ([str], none_type):

    <= 2000 characters

    The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.

    . [optional] # noqa: E501 + image_link (bool, date, datetime, dict, float, int, list, str, none_type):

    <= 2000 characters

    The links to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.

    . [optional] # noqa: E501 + video_link (str, none_type):

    <= 2,000 characters

    Hosted link to the product video.

    File types for linked videos must be .mp4, .mov or .m4v.

    File size cannot exceed 2GB.

    . [optional] # noqa: E501 + ad_link (str, none_type): Allows advertisers to specify a separate URL that can be used to track traffic coming from Pinterest shopping ads. Must send full URL including tracking—do not send tracking parameters only. At this time we do not support impression tracking. Must begin with http:// or https://.. [optional] # noqa: E501 + adult (bool, none_type): Set this attribute to TRUE if you're submitting items that are considered “adult”. These will not be shown on Pinterest.. [optional] # noqa: E501 + age_group (str, none_type): The age group to apply a demographic range to the product. Must be one of the following values (upper or lowercased): ‘newborn’ , ‘infant’, ‘toddler’, ‘kids’, or ‘adult’.. [optional] # noqa: E501 + availability (str): The availability of the product. Must be one of the following values (upper or lowercased): ‘in stock’, ‘out of stock’ , ‘preorder’.. [optional] # noqa: E501 + average_review_rating (float, none_type): Average reviews for the item. Can be a number from 1-5.. [optional] # noqa: E501 + brand (str, none_type): The brand of the product.. [optional] # noqa: E501 + checkout_enabled (bool, none_type): This attribute is not supported anymore.. [optional] # noqa: E501 + color (str, none_type): The primary color of the product.. [optional] # noqa: E501 + condition (str, none_type): The condition of the product. Must be one of the following values (upper or lowercased): ‘new’, ‘used’, or ‘refurbished’.. [optional] # noqa: E501 + custom_label_0 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 + custom_label_1 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 + custom_label_2 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 + custom_label_3 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 + custom_label_4 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 + description (str):

    <= 10000 characters

    The description of the product.

    . [optional] # noqa: E501 + free_shipping_label (bool, none_type): The item is free to ship.. [optional] # noqa: E501 + free_shipping_limit (str, none_type): The minimum order purchase necessary for the customer to get free shipping. Only relevant if free shipping is offered.. [optional] # noqa: E501 + gender (str, none_type): The gender associated with the product. Must be one of the following values (upper or lowercased): ‘male’, ‘female’ , or ‘unisex’.. [optional] # noqa: E501 + google_product_category (str, none_type): The categorization of the product based on the standardized Google Product Taxonomy. This is a set taxonomy. Both the text values and numeric codes are accepted.. [optional] # noqa: E501 + gtin (int, none_type): The unique universal product identifier.. [optional] # noqa: E501 + id (str):

    <= 127 characters

    The user-created unique ID that represents the product. Only Unicode characters are accepted.

    . [optional] # noqa: E501 + item_group_id (str, none_type):

    <= 127 characters

    The parent ID of the product.

    . [optional] # noqa: E501 + last_updated_time (int, none_type): The millisecond timestamp when the item was lastly modified by the merchant.. [optional] # noqa: E501 + link (str):

    <= 511 characters

    The landing page for the product.

    . [optional] # noqa: E501 + material (str, none_type): The material used to make the product.. [optional] # noqa: E501 + min_ad_price (str, none_type): The minimum advertised price of the product. It supports the following formats, \"19.99 USD\", \"19.99USD\" and \"19.99\". If the currency is not included, we default to US dollars.. [optional] # noqa: E501 + mobile_link (str, none_type): The mobile-optimized version of your landing page. Must begin with http:// or https://.. [optional] # noqa: E501 + mpn (str, none_type): Manufacturer Part Number are alpha-numeric codes created by the manufacturer of a product to uniquely identify it among all products from the same manufacturer.. [optional] # noqa: E501 + number_of_ratings (int, none_type): The number of ratings for the item.. [optional] # noqa: E501 + number_of_reviews (int, none_type): The number of reviews available for the item.. [optional] # noqa: E501 + pattern (str, none_type): The description of the pattern used for the product.. [optional] # noqa: E501 + price (str): The price of the product. It supports the following formats, \"24.99 USD\", \"24.99USD\" and \"24.99\". If the currency is not included, we default to US dollars.. [optional] # noqa: E501 + product_type (str, none_type):

    <= 1000 characters

    The categorization of your product based on your custom product taxonomy. Subcategories must be sent separated by “ > “. The > must be wrapped by spaces. We do not recognize any other delimiters such as comma or pipe.

    . [optional] # noqa: E501 + sale_price (str, none_type): The discounted price of the product. The sale_price must be lower than the price. It supports the following formats, \"14.99 USD\", \"14.99USD\" and \"14.99\". If the currency is not included, we default to US dollars.. [optional] # noqa: E501 + shipping (str, none_type): Shipping consists of one group of up to four elements, country, region, service (all optional) and price (required). All colons, even for blank values, are required.. [optional] # noqa: E501 + shipping_height (str, none_type): The height of the package needed to ship the product. Ensure there is a space between the numeric string and the metric.. [optional] # noqa: E501 + shipping_weight (str, none_type): The weight of the product. Ensure there is a space between the numeric string and the metric.. [optional] # noqa: E501 + shipping_width (str, none_type): The width of the package needed to ship the product. Ensure there is a space between the numeric string and the metric.. [optional] # noqa: E501 + size (str, none_type): The size of the product.. [optional] # noqa: E501 + size_system (str, none_type): Indicates the country’s sizing system in which you are submitting your product. Must be one of the following values (upper or lowercased): ‘US’, ‘UK’, ‘EU’, ‘DE’ , ‘FR’, ‘JP’, ‘CN’, ‘IT’, ‘ BR’, ‘MEX’, or ‘AU’.. [optional] # noqa: E501 + size_type (str, none_type): Additional description for the size. Must be one of the following values (upper or lowercased): ‘regular’, ‘petite’ , ‘plus’, ‘big_and_tall’, or ‘maternity’.. [optional] # noqa: E501 + tax (str, none_type): Tax consists of one group of up to four elements, country, region, rate (all required) and tax_ship (optional). All colons, even for blank values, are required.. [optional] # noqa: E501 + title (str):

    <= 500 characters

    The name of the product.

    . [optional] # noqa: E501 + variant_names ([str], none_type): Options for this variant. People will see these options next to your Pin and can select the one they want. List them in the order you want them displayed.. [optional] # noqa: E501 + variant_values ([str], none_type): Option values for this variant. People will see these options next to your Pin and can select the one they want. List them in the order you want them displayed. The order of the variant values must be consistent with the order of the variant names.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ItemAttributesRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + additional_image_link ([str], none_type):

    <= 2000 characters

    The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.

    . [optional] # noqa: E501 + image_link (bool, date, datetime, dict, float, int, list, str, none_type):

    <= 2000 characters

    The links to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.

    . [optional] # noqa: E501 + video_link (str, none_type):

    <= 2,000 characters

    Hosted link to the product video.

    File types for linked videos must be .mp4, .mov or .m4v.

    File size cannot exceed 2GB.

    . [optional] # noqa: E501 + ad_link (str, none_type): Allows advertisers to specify a separate URL that can be used to track traffic coming from Pinterest shopping ads. Must send full URL including tracking—do not send tracking parameters only. At this time we do not support impression tracking. Must begin with http:// or https://.. [optional] # noqa: E501 + adult (bool, none_type): Set this attribute to TRUE if you're submitting items that are considered “adult”. These will not be shown on Pinterest.. [optional] # noqa: E501 + age_group (str, none_type): The age group to apply a demographic range to the product. Must be one of the following values (upper or lowercased): ‘newborn’ , ‘infant’, ‘toddler’, ‘kids’, or ‘adult’.. [optional] # noqa: E501 + availability (str): The availability of the product. Must be one of the following values (upper or lowercased): ‘in stock’, ‘out of stock’ , ‘preorder’.. [optional] # noqa: E501 + average_review_rating (float, none_type): Average reviews for the item. Can be a number from 1-5.. [optional] # noqa: E501 + brand (str, none_type): The brand of the product.. [optional] # noqa: E501 + checkout_enabled (bool, none_type): This attribute is not supported anymore.. [optional] # noqa: E501 + color (str, none_type): The primary color of the product.. [optional] # noqa: E501 + condition (str, none_type): The condition of the product. Must be one of the following values (upper or lowercased): ‘new’, ‘used’, or ‘refurbished’.. [optional] # noqa: E501 + custom_label_0 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 + custom_label_1 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 + custom_label_2 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 + custom_label_3 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 + custom_label_4 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 + description (str):

    <= 10000 characters

    The description of the product.

    . [optional] # noqa: E501 + free_shipping_label (bool, none_type): The item is free to ship.. [optional] # noqa: E501 + free_shipping_limit (str, none_type): The minimum order purchase necessary for the customer to get free shipping. Only relevant if free shipping is offered.. [optional] # noqa: E501 + gender (str, none_type): The gender associated with the product. Must be one of the following values (upper or lowercased): ‘male’, ‘female’ , or ‘unisex’.. [optional] # noqa: E501 + google_product_category (str, none_type): The categorization of the product based on the standardized Google Product Taxonomy. This is a set taxonomy. Both the text values and numeric codes are accepted.. [optional] # noqa: E501 + gtin (int, none_type): The unique universal product identifier.. [optional] # noqa: E501 + id (str):

    <= 127 characters

    The user-created unique ID that represents the product. Only Unicode characters are accepted.

    . [optional] # noqa: E501 + item_group_id (str, none_type):

    <= 127 characters

    The parent ID of the product.

    . [optional] # noqa: E501 + last_updated_time (int, none_type): The millisecond timestamp when the item was lastly modified by the merchant.. [optional] # noqa: E501 + link (str):

    <= 511 characters

    The landing page for the product.

    . [optional] # noqa: E501 + material (str, none_type): The material used to make the product.. [optional] # noqa: E501 + min_ad_price (str, none_type): The minimum advertised price of the product. It supports the following formats, \"19.99 USD\", \"19.99USD\" and \"19.99\". If the currency is not included, we default to US dollars.. [optional] # noqa: E501 + mobile_link (str, none_type): The mobile-optimized version of your landing page. Must begin with http:// or https://.. [optional] # noqa: E501 + mpn (str, none_type): Manufacturer Part Number are alpha-numeric codes created by the manufacturer of a product to uniquely identify it among all products from the same manufacturer.. [optional] # noqa: E501 + number_of_ratings (int, none_type): The number of ratings for the item.. [optional] # noqa: E501 + number_of_reviews (int, none_type): The number of reviews available for the item.. [optional] # noqa: E501 + pattern (str, none_type): The description of the pattern used for the product.. [optional] # noqa: E501 + price (str): The price of the product. It supports the following formats, \"24.99 USD\", \"24.99USD\" and \"24.99\". If the currency is not included, we default to US dollars.. [optional] # noqa: E501 + product_type (str, none_type):

    <= 1000 characters

    The categorization of your product based on your custom product taxonomy. Subcategories must be sent separated by “ > “. The > must be wrapped by spaces. We do not recognize any other delimiters such as comma or pipe.

    . [optional] # noqa: E501 + sale_price (str, none_type): The discounted price of the product. The sale_price must be lower than the price. It supports the following formats, \"14.99 USD\", \"14.99USD\" and \"14.99\". If the currency is not included, we default to US dollars.. [optional] # noqa: E501 + shipping (str, none_type): Shipping consists of one group of up to four elements, country, region, service (all optional) and price (required). All colons, even for blank values, are required.. [optional] # noqa: E501 + shipping_height (str, none_type): The height of the package needed to ship the product. Ensure there is a space between the numeric string and the metric.. [optional] # noqa: E501 + shipping_weight (str, none_type): The weight of the product. Ensure there is a space between the numeric string and the metric.. [optional] # noqa: E501 + shipping_width (str, none_type): The width of the package needed to ship the product. Ensure there is a space between the numeric string and the metric.. [optional] # noqa: E501 + size (str, none_type): The size of the product.. [optional] # noqa: E501 + size_system (str, none_type): Indicates the country’s sizing system in which you are submitting your product. Must be one of the following values (upper or lowercased): ‘US’, ‘UK’, ‘EU’, ‘DE’ , ‘FR’, ‘JP’, ‘CN’, ‘IT’, ‘ BR’, ‘MEX’, or ‘AU’.. [optional] # noqa: E501 + size_type (str, none_type): Additional description for the size. Must be one of the following values (upper or lowercased): ‘regular’, ‘petite’ , ‘plus’, ‘big_and_tall’, or ‘maternity’.. [optional] # noqa: E501 + tax (str, none_type): Tax consists of one group of up to four elements, country, region, rate (all required) and tax_ship (optional). All colons, even for blank values, are required.. [optional] # noqa: E501 + title (str):

    <= 500 characters

    The name of the product.

    . [optional] # noqa: E501 + variant_names ([str], none_type): Options for this variant. People will see these options next to your Pin and can select the one they want. List them in the order you want them displayed.. [optional] # noqa: E501 + variant_values ([str], none_type): Option values for this variant. People will see these options next to your Pin and can select the one they want. List them in the order you want them displayed. The order of the variant values must be consistent with the order of the variant names.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/item_attributes_request_all_of.py b/openapi_generated/pinterest_client/model/item_attributes_request_all_of.py new file mode 100644 index 0000000..9a90f67 --- /dev/null +++ b/openapi_generated/pinterest_client/model/item_attributes_request_all_of.py @@ -0,0 +1,264 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class ItemAttributesRequestAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'additional_image_link': ([str], none_type,), # noqa: E501 + 'image_link': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'video_link': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'additional_image_link': 'additional_image_link', # noqa: E501 + 'image_link': 'image_link', # noqa: E501 + 'video_link': 'video_link', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ItemAttributesRequestAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + additional_image_link ([str], none_type):

    <= 2000 characters

    The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.

    . [optional] # noqa: E501 + image_link (bool, date, datetime, dict, float, int, list, str, none_type):

    <= 2000 characters

    The links to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.

    . [optional] # noqa: E501 + video_link (str, none_type):

    <= 2,000 characters

    Hosted link to the product video.

    File types for linked videos must be .mp4, .mov or .m4v.

    File size cannot exceed 2GB.

    . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ItemAttributesRequestAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + additional_image_link ([str], none_type):

    <= 2000 characters

    The links to additional images for your product. Up to ten additional images can be used to show a product from different angles or to show different stages. Must begin with http:// or https://.

    . [optional] # noqa: E501 + image_link (bool, date, datetime, dict, float, int, list, str, none_type):

    <= 2000 characters

    The links to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://.

    . [optional] # noqa: E501 + video_link (str, none_type):

    <= 2,000 characters

    Hosted link to the product video.

    File types for linked videos must be .mp4, .mov or .m4v.

    File size cannot exceed 2GB.

    . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/item_batch_record.py b/openapi_generated/pinterest_client/model/item_batch_record.py index 3a94bb6..d472589 100644 --- a/openapi_generated/pinterest_client/model/item_batch_record.py +++ b/openapi_generated/pinterest_client/model/item_batch_record.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,16 +31,20 @@ def lazy_import(): + from openapi_generated.pinterest_client.model.item_attributes_request import ItemAttributesRequest from openapi_generated.pinterest_client.model.item_create_batch_record import ItemCreateBatchRecord from openapi_generated.pinterest_client.model.item_delete_batch_record import ItemDeleteBatchRecord from openapi_generated.pinterest_client.model.item_delete_discontinued_batch_record import ItemDeleteDiscontinuedBatchRecord from openapi_generated.pinterest_client.model.item_update_batch_record import ItemUpdateBatchRecord - from openapi_generated.pinterest_client.model.updatable_item_attributes import UpdatableItemAttributes + from openapi_generated.pinterest_client.model.item_upsert_batch_record import ItemUpsertBatchRecord + from openapi_generated.pinterest_client.model.update_mask_field_type import UpdateMaskFieldType + globals()['ItemAttributesRequest'] = ItemAttributesRequest globals()['ItemCreateBatchRecord'] = ItemCreateBatchRecord globals()['ItemDeleteBatchRecord'] = ItemDeleteBatchRecord globals()['ItemDeleteDiscontinuedBatchRecord'] = ItemDeleteDiscontinuedBatchRecord globals()['ItemUpdateBatchRecord'] = ItemUpdateBatchRecord - globals()['UpdatableItemAttributes'] = UpdatableItemAttributes + globals()['ItemUpsertBatchRecord'] = ItemUpsertBatchRecord + globals()['UpdateMaskFieldType'] = UpdateMaskFieldType class ItemBatchRecord(ModelComposed): @@ -68,52 +72,6 @@ class ItemBatchRecord(ModelComposed): """ allowed_values = { - ('update_mask',): { - 'None': None, - 'AD_LINK': "ad_link", - 'ADULT': "adult", - 'AGE_GROUP': "age_group", - 'AVAILABILITY': "availability", - 'AVERAGE_REVIEW_RATING': "average_review_rating", - 'BRAND': "brand", - 'CHECKOUT_ENABLED': "checkout_enabled", - 'COLOR': "color", - 'CONDITION': "condition", - 'CUSTOM_LABEL_0': "custom_label_0", - 'CUSTOM_LABEL_1': "custom_label_1", - 'CUSTOM_LABEL_2': "custom_label_2", - 'CUSTOM_LABEL_3': "custom_label_3", - 'CUSTOM_LABEL_4': "custom_label_4", - 'DESCRIPTION': "description", - 'FREE_SHIPPING_LABEL': "free_shipping_label", - 'FREE_SHIPPING_LIMIT': "free_shipping_limit", - 'GENDER': "gender", - 'GOOGLE_PRODUCT_CATEGORY': "google_product_category", - 'GTIN': "gtin", - 'ITEM_GROUP_ID': "item_group_id", - 'LAST_UPDATED_TIME': "last_updated_time", - 'LINK': "link", - 'MATERIAL': "material", - 'MIN_AD_PRICE': "min_ad_price", - 'MPN': "mpn", - 'NUMBER_OF_RATINGS': "number_of_ratings", - 'NUMBER_OF_REVIEWS': "number_of_reviews", - 'PATTERN': "pattern", - 'PRICE': "price", - 'PRODUCT_TYPE': "product_type", - 'SALE_PRICE': "sale_price", - 'SHIPPING': "shipping", - 'SHIPPING_HEIGHT': "shipping_height", - 'SHIPPING_WEIGHT': "shipping_weight", - 'SHIPPING_WIDTH': "shipping_width", - 'SIZE': "size", - 'SIZE_SYSTEM': "size_system", - 'SIZE_TYPE': "size_type", - 'TAX': "tax", - 'TITLE': "title", - 'VARIANT_NAMES': "variant_names", - 'VARIANT_VALUES': "variant_values", - }, } validations = { @@ -143,8 +101,8 @@ def openapi_types(): lazy_import() return { 'item_id': (str,), # noqa: E501 - 'attributes': (UpdatableItemAttributes,), # noqa: E501 - 'update_mask': ([str], none_type,), # noqa: E501 + 'attributes': (ItemAttributesRequest,), # noqa: E501 + 'update_mask': ([UpdateMaskFieldType], none_type,), # noqa: E501 } @cached_property @@ -198,8 +156,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 - attributes (UpdatableItemAttributes): [optional] # noqa: E501 - update_mask ([str], none_type): The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item.. [optional] # noqa: E501 + attributes (ItemAttributesRequest): [optional] # noqa: E501 + update_mask ([UpdateMaskFieldType], none_type): The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -300,8 +258,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 - attributes (UpdatableItemAttributes): [optional] # noqa: E501 - update_mask ([str], none_type): The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item.. [optional] # noqa: E501 + attributes (ItemAttributesRequest): [optional] # noqa: E501 + update_mask ([UpdateMaskFieldType], none_type): The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -374,5 +332,6 @@ def _composed_schemas(): ItemDeleteBatchRecord, ItemDeleteDiscontinuedBatchRecord, ItemUpdateBatchRecord, + ItemUpsertBatchRecord, ], } diff --git a/openapi_generated/pinterest_client/model/item_create_batch_record.py b/openapi_generated/pinterest_client/model/item_create_batch_record.py index bbe348c..0be5867 100644 --- a/openapi_generated/pinterest_client/model/item_create_batch_record.py +++ b/openapi_generated/pinterest_client/model/item_create_batch_record.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.item_attributes import ItemAttributes - globals()['ItemAttributes'] = ItemAttributes + from openapi_generated.pinterest_client.model.item_attributes_request import ItemAttributesRequest + globals()['ItemAttributesRequest'] = ItemAttributesRequest class ItemCreateBatchRecord(ModelNormal): @@ -89,7 +89,7 @@ def openapi_types(): lazy_import() return { 'item_id': (str,), # noqa: E501 - 'attributes': (ItemAttributes,), # noqa: E501 + 'attributes': (ItemAttributesRequest,), # noqa: E501 } @cached_property @@ -144,7 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 - attributes (ItemAttributes): [optional] # noqa: E501 + attributes (ItemAttributesRequest): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -227,7 +227,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 - attributes (ItemAttributes): [optional] # noqa: E501 + attributes (ItemAttributesRequest): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/item_delete_batch_record.py b/openapi_generated/pinterest_client/model/item_delete_batch_record.py index 22449db..b630b04 100644 --- a/openapi_generated/pinterest_client/model/item_delete_batch_record.py +++ b/openapi_generated/pinterest_client/model/item_delete_batch_record.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/item_delete_discontinued_batch_record.py b/openapi_generated/pinterest_client/model/item_delete_discontinued_batch_record.py index fe7f971..ed519c4 100644 --- a/openapi_generated/pinterest_client/model/item_delete_discontinued_batch_record.py +++ b/openapi_generated/pinterest_client/model/item_delete_discontinued_batch_record.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/item_group_id_filter.py b/openapi_generated/pinterest_client/model/item_group_id_filter.py index e0ed460..79ba7c6 100644 --- a/openapi_generated/pinterest_client/model/item_group_id_filter.py +++ b/openapi_generated/pinterest_client/model/item_group_id_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/item_id_filter.py b/openapi_generated/pinterest_client/model/item_id_filter.py index 88b8632..01fcd14 100644 --- a/openapi_generated/pinterest_client/model/item_id_filter.py +++ b/openapi_generated/pinterest_client/model/item_id_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/item_processing_record.py b/openapi_generated/pinterest_client/model/item_processing_record.py index 23d5145..5aee352 100644 --- a/openapi_generated/pinterest_client/model/item_processing_record.py +++ b/openapi_generated/pinterest_client/model/item_processing_record.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/item_processing_status.py b/openapi_generated/pinterest_client/model/item_processing_status.py index 5164f86..1493bfb 100644 --- a/openapi_generated/pinterest_client/model/item_processing_status.py +++ b/openapi_generated/pinterest_client/model/item_processing_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/item_response.py b/openapi_generated/pinterest_client/model/item_response.py index bc38a81..0c84dc2 100644 --- a/openapi_generated/pinterest_client/model/item_response.py +++ b/openapi_generated/pinterest_client/model/item_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,16 +31,18 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.item_attributes import ItemAttributes + from openapi_generated.pinterest_client.model.catalogs_creative_assets_item_error_response import CatalogsCreativeAssetsItemErrorResponse + from openapi_generated.pinterest_client.model.catalogs_hotel_item_error_response import CatalogsHotelItemErrorResponse + from openapi_generated.pinterest_client.model.catalogs_retail_item_error_response import CatalogsRetailItemErrorResponse + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType from openapi_generated.pinterest_client.model.item_response_any_of import ItemResponseAnyOf from openapi_generated.pinterest_client.model.item_response_any_of1 import ItemResponseAnyOf1 - from openapi_generated.pinterest_client.model.item_validation_event import ItemValidationEvent - from openapi_generated.pinterest_client.model.pin import Pin - globals()['ItemAttributes'] = ItemAttributes + globals()['CatalogsCreativeAssetsItemErrorResponse'] = CatalogsCreativeAssetsItemErrorResponse + globals()['CatalogsHotelItemErrorResponse'] = CatalogsHotelItemErrorResponse + globals()['CatalogsRetailItemErrorResponse'] = CatalogsRetailItemErrorResponse + globals()['CatalogsType'] = CatalogsType globals()['ItemResponseAnyOf'] = ItemResponseAnyOf globals()['ItemResponseAnyOf1'] = ItemResponseAnyOf1 - globals()['ItemValidationEvent'] = ItemValidationEvent - globals()['Pin'] = Pin class ItemResponse(ModelComposed): @@ -71,9 +73,6 @@ class ItemResponse(ModelComposed): } validations = { - ('pins',): { - 'max_items': 11, - }, } @cached_property @@ -99,22 +98,25 @@ def openapi_types(): """ lazy_import() return { - 'item_id': (str,), # noqa: E501 - 'pins': ([Pin], none_type,), # noqa: E501 - 'attributes': (ItemAttributes,), # noqa: E501 - 'errors': ([ItemValidationEvent],), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 } @cached_property def discriminator(): - return None - + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsItemErrorResponse, + 'HOTEL': CatalogsHotelItemErrorResponse, + 'ItemResponse_anyOf': ItemResponseAnyOf, + 'ItemResponse_anyOf_1': ItemResponseAnyOf1, + 'RETAIL': CatalogsRetailItemErrorResponse, + } + if not val: + return None + return {'catalog_type': val} attribute_map = { - 'item_id': 'item_id', # noqa: E501 - 'pins': 'pins', # noqa: E501 - 'attributes': 'attributes', # noqa: E501 - 'errors': 'errors', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 } read_only_vars = { @@ -126,6 +128,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ItemResponse - a model defined in OpenAPI Keyword Args: + catalog_type (CatalogsType): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -156,10 +159,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 - pins ([Pin], none_type):

    <= 2000 characters

    The pins mapped to the item

    . [optional] # noqa: E501 - attributes (ItemAttributes): [optional] # noqa: E501 - errors ([ItemValidationEvent]): Array with the errors for the item id requested. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -229,6 +228,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 """ItemResponse - a model defined in OpenAPI Keyword Args: + catalog_type (CatalogsType): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -259,10 +259,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 - pins ([Pin], none_type):

    <= 2000 characters

    The pins mapped to the item

    . [optional] # noqa: E501 - attributes (ItemAttributes): [optional] # noqa: E501 - errors ([ItemValidationEvent]): Array with the errors for the item id requested. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/item_response_any_of.py b/openapi_generated/pinterest_client/model/item_response_any_of.py index 15d147d..71ab0fd 100644 --- a/openapi_generated/pinterest_client/model/item_response_any_of.py +++ b/openapi_generated/pinterest_client/model/item_response_any_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,10 +31,14 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.item_attributes import ItemAttributes - from openapi_generated.pinterest_client.model.pin import Pin - globals()['ItemAttributes'] = ItemAttributes - globals()['Pin'] = Pin + from openapi_generated.pinterest_client.model.catalogs_creative_assets_item_response import CatalogsCreativeAssetsItemResponse + from openapi_generated.pinterest_client.model.catalogs_hotel_item_response import CatalogsHotelItemResponse + from openapi_generated.pinterest_client.model.catalogs_retail_item_response import CatalogsRetailItemResponse + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + globals()['CatalogsCreativeAssetsItemResponse'] = CatalogsCreativeAssetsItemResponse + globals()['CatalogsHotelItemResponse'] = CatalogsHotelItemResponse + globals()['CatalogsRetailItemResponse'] = CatalogsRetailItemResponse + globals()['CatalogsType'] = CatalogsType class ItemResponseAnyOf(ModelNormal): @@ -65,9 +69,6 @@ class ItemResponseAnyOf(ModelNormal): } validations = { - ('pins',): { - 'max_items': 11, - }, } @cached_property @@ -93,20 +94,23 @@ def openapi_types(): """ lazy_import() return { - 'item_id': (str,), # noqa: E501 - 'pins': ([Pin], none_type,), # noqa: E501 - 'attributes': (ItemAttributes,), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 } @cached_property def discriminator(): - return None - + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsItemResponse, + 'HOTEL': CatalogsHotelItemResponse, + 'RETAIL': CatalogsRetailItemResponse, + } + if not val: + return None + return {'catalog_type': val} attribute_map = { - 'item_id': 'item_id', # noqa: E501 - 'pins': 'pins', # noqa: E501 - 'attributes': 'attributes', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 } read_only_vars = { @@ -116,9 +120,12 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 """ItemResponseAnyOf - a model defined in OpenAPI + Args: + catalog_type (CatalogsType): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -150,9 +157,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 - pins ([Pin], none_type):

    <= 2000 characters

    The pins mapped to the item

    . [optional] # noqa: E501 - attributes (ItemAttributes): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -180,6 +184,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.catalog_type = catalog_type for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -200,9 +205,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 """ItemResponseAnyOf - a model defined in OpenAPI + Args: + catalog_type (CatalogsType): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -234,9 +242,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 - pins ([Pin], none_type):

    <= 2000 characters

    The pins mapped to the item

    . [optional] # noqa: E501 - attributes (ItemAttributes): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -262,6 +267,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.catalog_type = catalog_type for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/openapi_generated/pinterest_client/model/item_response_any_of1.py b/openapi_generated/pinterest_client/model/item_response_any_of1.py index 3bd274b..de3317a 100644 --- a/openapi_generated/pinterest_client/model/item_response_any_of1.py +++ b/openapi_generated/pinterest_client/model/item_response_any_of1.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,14 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.item_validation_event import ItemValidationEvent - globals()['ItemValidationEvent'] = ItemValidationEvent + from openapi_generated.pinterest_client.model.catalogs_creative_assets_item_error_response import CatalogsCreativeAssetsItemErrorResponse + from openapi_generated.pinterest_client.model.catalogs_hotel_item_error_response import CatalogsHotelItemErrorResponse + from openapi_generated.pinterest_client.model.catalogs_retail_item_error_response import CatalogsRetailItemErrorResponse + from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType + globals()['CatalogsCreativeAssetsItemErrorResponse'] = CatalogsCreativeAssetsItemErrorResponse + globals()['CatalogsHotelItemErrorResponse'] = CatalogsHotelItemErrorResponse + globals()['CatalogsRetailItemErrorResponse'] = CatalogsRetailItemErrorResponse + globals()['CatalogsType'] = CatalogsType class ItemResponseAnyOf1(ModelNormal): @@ -88,18 +94,23 @@ def openapi_types(): """ lazy_import() return { - 'item_id': (str,), # noqa: E501 - 'errors': ([ItemValidationEvent],), # noqa: E501 + 'catalog_type': (CatalogsType,), # noqa: E501 } @cached_property def discriminator(): - return None - + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsItemErrorResponse, + 'HOTEL': CatalogsHotelItemErrorResponse, + 'RETAIL': CatalogsRetailItemErrorResponse, + } + if not val: + return None + return {'catalog_type': val} attribute_map = { - 'item_id': 'item_id', # noqa: E501 - 'errors': 'errors', # noqa: E501 + 'catalog_type': 'catalog_type', # noqa: E501 } read_only_vars = { @@ -109,9 +120,12 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, catalog_type, *args, **kwargs): # noqa: E501 """ItemResponseAnyOf1 - a model defined in OpenAPI + Args: + catalog_type (CatalogsType): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -143,8 +157,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 - errors ([ItemValidationEvent]): Array with the errors for the item id requested. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -172,6 +184,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.catalog_type = catalog_type for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -192,9 +205,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, catalog_type, *args, **kwargs): # noqa: E501 """ItemResponseAnyOf1 - a model defined in OpenAPI + Args: + catalog_type (CatalogsType): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -226,8 +242,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 - errors ([ItemValidationEvent]): Array with the errors for the item id requested. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -253,6 +267,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.catalog_type = catalog_type for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/openapi_generated/pinterest_client/model/item_update_batch_record.py b/openapi_generated/pinterest_client/model/item_update_batch_record.py index b8f4a25..4e69333 100644 --- a/openapi_generated/pinterest_client/model/item_update_batch_record.py +++ b/openapi_generated/pinterest_client/model/item_update_batch_record.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -32,7 +32,9 @@ def lazy_import(): from openapi_generated.pinterest_client.model.updatable_item_attributes import UpdatableItemAttributes + from openapi_generated.pinterest_client.model.update_mask_field_type import UpdateMaskFieldType globals()['UpdatableItemAttributes'] = UpdatableItemAttributes + globals()['UpdateMaskFieldType'] = UpdateMaskFieldType class ItemUpdateBatchRecord(ModelNormal): @@ -60,52 +62,6 @@ class ItemUpdateBatchRecord(ModelNormal): """ allowed_values = { - ('update_mask',): { - 'None': None, - 'AD_LINK': "ad_link", - 'ADULT': "adult", - 'AGE_GROUP': "age_group", - 'AVAILABILITY': "availability", - 'AVERAGE_REVIEW_RATING': "average_review_rating", - 'BRAND': "brand", - 'CHECKOUT_ENABLED': "checkout_enabled", - 'COLOR': "color", - 'CONDITION': "condition", - 'CUSTOM_LABEL_0': "custom_label_0", - 'CUSTOM_LABEL_1': "custom_label_1", - 'CUSTOM_LABEL_2': "custom_label_2", - 'CUSTOM_LABEL_3': "custom_label_3", - 'CUSTOM_LABEL_4': "custom_label_4", - 'DESCRIPTION': "description", - 'FREE_SHIPPING_LABEL': "free_shipping_label", - 'FREE_SHIPPING_LIMIT': "free_shipping_limit", - 'GENDER': "gender", - 'GOOGLE_PRODUCT_CATEGORY': "google_product_category", - 'GTIN': "gtin", - 'ITEM_GROUP_ID': "item_group_id", - 'LAST_UPDATED_TIME': "last_updated_time", - 'LINK': "link", - 'MATERIAL': "material", - 'MIN_AD_PRICE': "min_ad_price", - 'MPN': "mpn", - 'NUMBER_OF_RATINGS': "number_of_ratings", - 'NUMBER_OF_REVIEWS': "number_of_reviews", - 'PATTERN': "pattern", - 'PRICE': "price", - 'PRODUCT_TYPE': "product_type", - 'SALE_PRICE': "sale_price", - 'SHIPPING': "shipping", - 'SHIPPING_HEIGHT': "shipping_height", - 'SHIPPING_WEIGHT': "shipping_weight", - 'SHIPPING_WIDTH': "shipping_width", - 'SIZE': "size", - 'SIZE_SYSTEM': "size_system", - 'SIZE_TYPE': "size_type", - 'TAX': "tax", - 'TITLE': "title", - 'VARIANT_NAMES': "variant_names", - 'VARIANT_VALUES': "variant_values", - }, } validations = { @@ -136,7 +92,7 @@ def openapi_types(): return { 'item_id': (str,), # noqa: E501 'attributes': (UpdatableItemAttributes,), # noqa: E501 - 'update_mask': ([str], none_type,), # noqa: E501 + 'update_mask': ([UpdateMaskFieldType], none_type,), # noqa: E501 } @cached_property @@ -193,7 +149,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 attributes (UpdatableItemAttributes): [optional] # noqa: E501 - update_mask ([str], none_type): The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item.. [optional] # noqa: E501 + update_mask ([UpdateMaskFieldType], none_type): The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -277,7 +233,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 attributes (UpdatableItemAttributes): [optional] # noqa: E501 - update_mask ([str], none_type): The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item.. [optional] # noqa: E501 + update_mask ([UpdateMaskFieldType], none_type): The list of product attributes to be updated. Attributes specified in the update mask without a value specified in the body will be deleted from the product item.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/item_upsert_batch_record.py b/openapi_generated/pinterest_client/model/item_upsert_batch_record.py new file mode 100644 index 0000000..948ed17 --- /dev/null +++ b/openapi_generated/pinterest_client/model/item_upsert_batch_record.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.item_attributes_request import ItemAttributesRequest + globals()['ItemAttributesRequest'] = ItemAttributesRequest + + +class ItemUpsertBatchRecord(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'item_id': (str,), # noqa: E501 + 'attributes': (ItemAttributesRequest,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_id': 'item_id', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ItemUpsertBatchRecord - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 + attributes (ItemAttributesRequest): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ItemUpsertBatchRecord - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + item_id (str): The catalog item id in the merchant namespace. [optional] # noqa: E501 + attributes (ItemAttributesRequest): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/item_validation_event.py b/openapi_generated/pinterest_client/model/item_validation_event.py index 6bd03e8..e20d8e6 100644 --- a/openapi_generated/pinterest_client/model/item_validation_event.py +++ b/openapi_generated/pinterest_client/model/item_validation_event.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/keyword.py b/openapi_generated/pinterest_client/model/keyword.py index ae8b7c7..287ea0b 100644 --- a/openapi_generated/pinterest_client/model/keyword.py +++ b/openapi_generated/pinterest_client/model/keyword.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,10 @@ def lazy_import(): + from openapi_generated.pinterest_client.model.keyword_all_of import KeywordAllOf from openapi_generated.pinterest_client.model.keywords_common import KeywordsCommon from openapi_generated.pinterest_client.model.match_type_response import MatchTypeResponse + globals()['KeywordAllOf'] = KeywordAllOf globals()['KeywordsCommon'] = KeywordsCommon globals()['MatchTypeResponse'] = MatchTypeResponse @@ -102,12 +104,12 @@ def openapi_types(): return { 'match_type': (MatchTypeResponse,), # noqa: E501 'value': (str,), # noqa: E501 + 'bid': (int, none_type,), # noqa: E501 'archived': (bool,), # noqa: E501 'id': (str,), # noqa: E501 'parent_id': (str,), # noqa: E501 'parent_type': (str,), # noqa: E501 'type': (str,), # noqa: E501 - 'bid': (int, none_type,), # noqa: E501 } @cached_property @@ -118,12 +120,12 @@ def discriminator(): attribute_map = { 'match_type': 'match_type', # noqa: E501 'value': 'value', # noqa: E501 + 'bid': 'bid', # noqa: E501 'archived': 'archived', # noqa: E501 'id': 'id', # noqa: E501 'parent_id': 'parent_id', # noqa: E501 'parent_type': 'parent_type', # noqa: E501 'type': 'type', # noqa: E501 - 'bid': 'bid', # noqa: E501 } read_only_vars = { @@ -167,12 +169,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + bid (int, none_type):

    Note: bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 archived (bool): [optional] # noqa: E501 id (str): Keyword ID .. [optional] # noqa: E501 parent_id (str): Keyword parent entity ID (advertiser, campaign, ad group).. [optional] # noqa: E501 parent_type (str): Parent entity type. [optional] # noqa: E501 type (str): Always keyword. [optional] # noqa: E501 - bid (int, none_type): Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -274,12 +276,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + bid (int, none_type):

    Note: bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 archived (bool): [optional] # noqa: E501 id (str): Keyword ID .. [optional] # noqa: E501 parent_id (str): Keyword parent entity ID (advertiser, campaign, ad group).. [optional] # noqa: E501 parent_type (str): Parent entity type. [optional] # noqa: E501 type (str): Always keyword. [optional] # noqa: E501 - bid (int, none_type): Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/keyword_all_of.py b/openapi_generated/pinterest_client/model/keyword_all_of.py new file mode 100644 index 0000000..0297473 --- /dev/null +++ b/openapi_generated/pinterest_client/model/keyword_all_of.py @@ -0,0 +1,282 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class KeywordAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('parent_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'archived': (bool,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'parent_id': (str,), # noqa: E501 + 'parent_type': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'archived': 'archived', # noqa: E501 + 'id': 'id', # noqa: E501 + 'parent_id': 'parent_id', # noqa: E501 + 'parent_type': 'parent_type', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """KeywordAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + archived (bool): [optional] # noqa: E501 + id (str): Keyword ID .. [optional] # noqa: E501 + parent_id (str): Keyword parent entity ID (advertiser, campaign, ad group).. [optional] # noqa: E501 + parent_type (str): Parent entity type. [optional] # noqa: E501 + type (str): Always keyword. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """KeywordAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + archived (bool): [optional] # noqa: E501 + id (str): Keyword ID .. [optional] # noqa: E501 + parent_id (str): Keyword parent entity ID (advertiser, campaign, ad group).. [optional] # noqa: E501 + parent_type (str): Parent entity type. [optional] # noqa: E501 + type (str): Always keyword. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/keyword_error.py b/openapi_generated/pinterest_client/model/keyword_error.py index 0444e06..2b09269 100644 --- a/openapi_generated/pinterest_client/model/keyword_error.py +++ b/openapi_generated/pinterest_client/model/keyword_error.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/keyword_list.py b/openapi_generated/pinterest_client/model/keyword_list.py new file mode 100644 index 0000000..a4fcfc2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/keyword_list.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class KeywordList(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('value',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': ([str],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """KeywordList - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): # noqa: E501 + + Keyword Args: + value ([str]): # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """KeywordList - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): # noqa: E501 + + Keyword Args: + value ([str]): # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/keyword_metrics.py b/openapi_generated/pinterest_client/model/keyword_metrics.py index c098373..39aa088 100644 --- a/openapi_generated/pinterest_client/model/keyword_metrics.py +++ b/openapi_generated/pinterest_client/model/keyword_metrics.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/keyword_metrics_response.py b/openapi_generated/pinterest_client/model/keyword_metrics_response.py index 90e5d22..2fc4854 100644 --- a/openapi_generated/pinterest_client/model/keyword_metrics_response.py +++ b/openapi_generated/pinterest_client/model/keyword_metrics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/keyword_update.py b/openapi_generated/pinterest_client/model/keyword_update.py index cd33608..1cd236f 100644 --- a/openapi_generated/pinterest_client/model/keyword_update.py +++ b/openapi_generated/pinterest_client/model/keyword_update.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -64,9 +64,6 @@ class KeywordUpdate(ModelNormal): 'pattern': r'^\d+$', # noqa: E501 }, }, - ('bid',): { - 'inclusive_minimum': 1, - }, } @cached_property @@ -151,7 +148,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) archived (bool): Is keyword archived?. [optional] # noqa: E501 - bid (int, none_type): Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 + bid (int, none_type):

    Note: bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -238,7 +235,7 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) archived (bool): Is keyword archived?. [optional] # noqa: E501 - bid (int, none_type): Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 + bid (int, none_type):

    Note: bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/keyword_update_body.py b/openapi_generated/pinterest_client/model/keyword_update_body.py index ad3e600..56584b9 100644 --- a/openapi_generated/pinterest_client/model/keyword_update_body.py +++ b/openapi_generated/pinterest_client/model/keyword_update_body.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -111,7 +111,7 @@ def _from_openapi_data(cls, keywords, *args, **kwargs): # noqa: E501 """KeywordUpdateBody - a model defined in OpenAPI Args: - keywords ([KeywordUpdate]): Keywords to update. Object array. Each object has 3 possible fields:
    1. \"id\": (required) keyword ID
    2. \"archived\": boolean. Should keyword be archived?
    3. \"bid\": number
    For example: [{\"id\":\"2886610576653\", \"archived\": false, \"bid\": 20000}, {\"id\":\"2886610576654\", \"archived\": true, \"bid\": 20000}, ...] + keywords ([KeywordUpdate]): Keywords to update. Object array. Each object has 2 possible fields:
    1. \"id\": (required) keyword ID
    2. \"archived\": boolean. Should keyword be archived?
    For example: [{\"id\":\"2886610576653\", \"archived\": false}, {\"id\":\"2886610576654\", \"archived\": true}, ...] Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -196,7 +196,7 @@ def __init__(self, keywords, *args, **kwargs): # noqa: E501 """KeywordUpdateBody - a model defined in OpenAPI Args: - keywords ([KeywordUpdate]): Keywords to update. Object array. Each object has 3 possible fields:
    1. \"id\": (required) keyword ID
    2. \"archived\": boolean. Should keyword be archived?
    3. \"bid\": number
    For example: [{\"id\":\"2886610576653\", \"archived\": false, \"bid\": 20000}, {\"id\":\"2886610576654\", \"archived\": true, \"bid\": 20000}, ...] + keywords ([KeywordUpdate]): Keywords to update. Object array. Each object has 2 possible fields:
    1. \"id\": (required) keyword ID
    2. \"archived\": boolean. Should keyword be archived?
    For example: [{\"id\":\"2886610576653\", \"archived\": false}, {\"id\":\"2886610576654\", \"archived\": true}, ...] Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/openapi_generated/pinterest_client/model/keywords_common.py b/openapi_generated/pinterest_client/model/keywords_common.py index efdf3ea..fc610e0 100644 --- a/openapi_generated/pinterest_client/model/keywords_common.py +++ b/openapi_generated/pinterest_client/model/keywords_common.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -149,7 +149,7 @@ def _from_openapi_data(cls, match_type, value, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - bid (int, none_type): Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 + bid (int, none_type):

    Note: bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -237,7 +237,7 @@ def __init__(self, match_type, value, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - bid (int, none_type): Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 + bid (int, none_type):

    Note: bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/keywords_metrics_array_response.py b/openapi_generated/pinterest_client/model/keywords_metrics_array_response.py index 10a4e2d..5892932 100644 --- a/openapi_generated/pinterest_client/model/keywords_metrics_array_response.py +++ b/openapi_generated/pinterest_client/model/keywords_metrics_array_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/keywords_request.py b/openapi_generated/pinterest_client/model/keywords_request.py index 9689fd1..37a9bfb 100644 --- a/openapi_generated/pinterest_client/model/keywords_request.py +++ b/openapi_generated/pinterest_client/model/keywords_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/keywords_response.py b/openapi_generated/pinterest_client/model/keywords_response.py index 1b9e480..37863f1 100644 --- a/openapi_generated/pinterest_client/model/keywords_response.py +++ b/openapi_generated/pinterest_client/model/keywords_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/l1_interest_list.py b/openapi_generated/pinterest_client/model/l1_interest_list.py index 71a4772..ad4959c 100644 --- a/openapi_generated/pinterest_client/model/l1_interest_list.py +++ b/openapi_generated/pinterest_client/model/l1_interest_list.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/language.py b/openapi_generated/pinterest_client/model/language.py index d3f34f5..6485086 100644 --- a/openapi_generated/pinterest_client/model/language.py +++ b/openapi_generated/pinterest_client/model/language.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/lead_form_array_response.py b/openapi_generated/pinterest_client/model/lead_form_array_response.py new file mode 100644 index 0000000..c2e6e78 --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_form_array_response.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.lead_form_array_response_items import LeadFormArrayResponseItems + globals()['LeadFormArrayResponseItems'] = LeadFormArrayResponseItems + + +class LeadFormArrayResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([LeadFormArrayResponseItems],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LeadFormArrayResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([LeadFormArrayResponseItems]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LeadFormArrayResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([LeadFormArrayResponseItems]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/lead_form_array_response_items.py b/openapi_generated/pinterest_client/model/lead_form_array_response_items.py new file mode 100644 index 0000000..01904bc --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_form_array_response_items.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.exception import Exception + from openapi_generated.pinterest_client.model.lead_form_response import LeadFormResponse + globals()['Exception'] = Exception + globals()['LeadFormResponse'] = LeadFormResponse + + +class LeadFormArrayResponseItems(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (LeadFormResponse,), # noqa: E501 + 'exceptions': ([Exception],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'exceptions': 'exceptions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LeadFormArrayResponseItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data (LeadFormResponse): [optional] # noqa: E501 + exceptions ([Exception]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LeadFormArrayResponseItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data (LeadFormResponse): [optional] # noqa: E501 + exceptions ([Exception]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/lead_form_common.py b/openapi_generated/pinterest_client/model/lead_form_common.py index e725b2c..1d81c1a 100644 --- a/openapi_generated/pinterest_client/model/lead_form_common.py +++ b/openapi_generated/pinterest_client/model/lead_form_common.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,10 @@ def lazy_import(): + from openapi_generated.pinterest_client.model.lead_form_common_policy_links import LeadFormCommonPolicyLinks from openapi_generated.pinterest_client.model.lead_form_question import LeadFormQuestion from openapi_generated.pinterest_client.model.lead_form_status import LeadFormStatus + globals()['LeadFormCommonPolicyLinks'] = LeadFormCommonPolicyLinks globals()['LeadFormQuestion'] = LeadFormQuestion globals()['LeadFormStatus'] = LeadFormStatus @@ -69,6 +71,10 @@ class LeadFormCommon(ModelNormal): 'max_items': 10, 'min_items': 0, }, + ('policy_links',): { + 'max_items': 3, + 'min_items': 0, + }, } @cached_property @@ -101,6 +107,7 @@ def openapi_types(): 'status': (LeadFormStatus,), # noqa: E501 'disclosure_language': (str, none_type,), # noqa: E501 'questions': ([LeadFormQuestion],), # noqa: E501 + 'policy_links': ([LeadFormCommonPolicyLinks],), # noqa: E501 } @cached_property @@ -116,6 +123,7 @@ def discriminator(): 'status': 'status', # noqa: E501 'disclosure_language': 'disclosure_language', # noqa: E501 'questions': 'questions', # noqa: E501 + 'policy_links': 'policy_links', # noqa: E501 } read_only_vars = { @@ -161,11 +169,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) name (str, none_type): Internal name of the lead form.. [optional] # noqa: E501 privacy_policy_link (str, none_type): A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language.. [optional] # noqa: E501 - has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad.. [optional] # noqa: E501 + has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's Lead Ad Terms. As a reminder, all advertising on Pinterest is subject to the Pinterest Advertising Services Agreement or an equivalent agreement as set forth on an IO. [optional] # noqa: E501 completion_message (str, none_type): A message for people who complete the form to let them know what happens next.. [optional] # noqa: E501 status (LeadFormStatus): [optional] # noqa: E501 disclosure_language (str, none_type): Additional disclosure language to be included in the lead form.. [optional] # noqa: E501 questions ([LeadFormQuestion]): List of questions to be displayed on the lead form.. [optional] # noqa: E501 + policy_links ([LeadFormCommonPolicyLinks]): List of additional policy links to be displayed on the lead form.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -249,11 +258,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) name (str, none_type): Internal name of the lead form.. [optional] # noqa: E501 privacy_policy_link (str, none_type): A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language.. [optional] # noqa: E501 - has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad.. [optional] # noqa: E501 + has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's Lead Ad Terms. As a reminder, all advertising on Pinterest is subject to the Pinterest Advertising Services Agreement or an equivalent agreement as set forth on an IO. [optional] # noqa: E501 completion_message (str, none_type): A message for people who complete the form to let them know what happens next.. [optional] # noqa: E501 status (LeadFormStatus): [optional] # noqa: E501 disclosure_language (str, none_type): Additional disclosure language to be included in the lead form.. [optional] # noqa: E501 questions ([LeadFormQuestion]): List of questions to be displayed on the lead form.. [optional] # noqa: E501 + policy_links ([LeadFormCommonPolicyLinks]): List of additional policy links to be displayed on the lead form.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/lead_form_common_policy_links.py b/openapi_generated/pinterest_client/model/lead_form_common_policy_links.py new file mode 100644 index 0000000..47a2bbc --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_form_common_policy_links.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class LeadFormCommonPolicyLinks(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'label': (str,), # noqa: E501 + 'link': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'label': 'label', # noqa: E501 + 'link': 'link', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LeadFormCommonPolicyLinks - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + label (str): Policy label for an additional policy link.. [optional] # noqa: E501 + link (str): Policy link for an additional policy link.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LeadFormCommonPolicyLinks - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + label (str): Policy label for an additional policy link.. [optional] # noqa: E501 + link (str): Policy link for an additional policy link.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/lead_form_create_request.py b/openapi_generated/pinterest_client/model/lead_form_create_request.py new file mode 100644 index 0000000..3cad0f7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_form_create_request.py @@ -0,0 +1,354 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.lead_form_common import LeadFormCommon + from openapi_generated.pinterest_client.model.lead_form_common_policy_links import LeadFormCommonPolicyLinks + from openapi_generated.pinterest_client.model.lead_form_question import LeadFormQuestion + from openapi_generated.pinterest_client.model.lead_form_status import LeadFormStatus + globals()['LeadFormCommon'] = LeadFormCommon + globals()['LeadFormCommonPolicyLinks'] = LeadFormCommonPolicyLinks + globals()['LeadFormQuestion'] = LeadFormQuestion + globals()['LeadFormStatus'] = LeadFormStatus + + +class LeadFormCreateRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('questions',): { + 'max_items': 10, + 'min_items': 0, + }, + ('policy_links',): { + 'max_items': 3, + 'min_items': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str, none_type,), # noqa: E501 + 'privacy_policy_link': (str, none_type,), # noqa: E501 + 'has_accepted_terms': (bool,), # noqa: E501 + 'completion_message': (str, none_type,), # noqa: E501 + 'questions': ([LeadFormQuestion],), # noqa: E501 + 'status': (LeadFormStatus,), # noqa: E501 + 'disclosure_language': (str, none_type,), # noqa: E501 + 'policy_links': ([LeadFormCommonPolicyLinks],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'privacy_policy_link': 'privacy_policy_link', # noqa: E501 + 'has_accepted_terms': 'has_accepted_terms', # noqa: E501 + 'completion_message': 'completion_message', # noqa: E501 + 'questions': 'questions', # noqa: E501 + 'status': 'status', # noqa: E501 + 'disclosure_language': 'disclosure_language', # noqa: E501 + 'policy_links': 'policy_links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LeadFormCreateRequest - a model defined in OpenAPI + + Keyword Args: + name (str, none_type): Internal name of the lead form. + privacy_policy_link (str, none_type): A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language. + has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's Lead Ad Terms. As a reminder, all advertising on Pinterest is subject to the Pinterest Advertising Services Agreement or an equivalent agreement as set forth on an IO + completion_message (str, none_type): A message for people who complete the form to let them know what happens next. + questions ([LeadFormQuestion]): List of questions to be displayed on the lead form. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + status (LeadFormStatus): [optional] # noqa: E501 + disclosure_language (str, none_type): Additional disclosure language to be included in the lead form.. [optional] # noqa: E501 + policy_links ([LeadFormCommonPolicyLinks]): List of additional policy links to be displayed on the lead form.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LeadFormCreateRequest - a model defined in OpenAPI + + Keyword Args: + name (str, none_type): Internal name of the lead form. + privacy_policy_link (str, none_type): A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language. + has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's Lead Ad Terms. As a reminder, all advertising on Pinterest is subject to the Pinterest Advertising Services Agreement or an equivalent agreement as set forth on an IO + completion_message (str, none_type): A message for people who complete the form to let them know what happens next. + questions ([LeadFormQuestion]): List of questions to be displayed on the lead form. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + status (LeadFormStatus): [optional] # noqa: E501 + disclosure_language (str, none_type): Additional disclosure language to be included in the lead form.. [optional] # noqa: E501 + policy_links ([LeadFormCommonPolicyLinks]): List of additional policy links to be displayed on the lead form.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/lead_form_question.py b/openapi_generated/pinterest_client/model/lead_form_question.py index 1c7d3e8..ea43c52 100644 --- a/openapi_generated/pinterest_client/model/lead_form_question.py +++ b/openapi_generated/pinterest_client/model/lead_form_question.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/lead_form_question_field_type.py b/openapi_generated/pinterest_client/model/lead_form_question_field_type.py index 076c89d..ef95ade 100644 --- a/openapi_generated/pinterest_client/model/lead_form_question_field_type.py +++ b/openapi_generated/pinterest_client/model/lead_form_question_field_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -58,7 +58,6 @@ class LeadFormQuestionFieldType(ModelSimple): 'TEXT_AREA': "TEXT_AREA", 'RADIO_LIST': "RADIO_LIST", 'CHECKBOX': "CHECKBOX", - 'DROPDOWN': "DROPDOWN", 'NULL': "null", }, } @@ -111,10 +110,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Lead form question field type., must be one of ["TEXT_FIELD", "TEXT_AREA", "RADIO_LIST", "CHECKBOX", "DROPDOWN", "null", ] # noqa: E501 + args[0] (str): Lead form question field type., must be one of ["TEXT_FIELD", "TEXT_AREA", "RADIO_LIST", "CHECKBOX", "null", ] # noqa: E501 Keyword Args: - value (str): Lead form question field type., must be one of ["TEXT_FIELD", "TEXT_AREA", "RADIO_LIST", "CHECKBOX", "DROPDOWN", "null", ] # noqa: E501 + value (str): Lead form question field type., must be one of ["TEXT_FIELD", "TEXT_AREA", "RADIO_LIST", "CHECKBOX", "null", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -201,10 +200,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Lead form question field type., must be one of ["TEXT_FIELD", "TEXT_AREA", "RADIO_LIST", "CHECKBOX", "DROPDOWN", "null", ] # noqa: E501 + args[0] (str): Lead form question field type., must be one of ["TEXT_FIELD", "TEXT_AREA", "RADIO_LIST", "CHECKBOX", "null", ] # noqa: E501 Keyword Args: - value (str): Lead form question field type., must be one of ["TEXT_FIELD", "TEXT_AREA", "RADIO_LIST", "CHECKBOX", "DROPDOWN", "null", ] # noqa: E501 + value (str): Lead form question field type., must be one of ["TEXT_FIELD", "TEXT_AREA", "RADIO_LIST", "CHECKBOX", "null", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/lead_form_question_type.py b/openapi_generated/pinterest_client/model/lead_form_question_type.py index 5aaa6bf..7ac8950 100644 --- a/openapi_generated/pinterest_client/model/lead_form_question_type.py +++ b/openapi_generated/pinterest_client/model/lead_form_question_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -60,12 +60,13 @@ class LeadFormQuestionType(ModelSimple): 'EMAIL': "EMAIL", 'PHONE_NUMBER': "PHONE_NUMBER", 'ZIP_CODE': "ZIP_CODE", - 'AGE': "AGE", 'GENDER': "GENDER", 'CITY': "CITY", 'COUNTRY': "COUNTRY", - 'PREFERRED_CONTACT_METHOD': "PREFERRED_CONTACT_METHOD", 'STATE_PROVINCE': "STATE_PROVINCE", + 'ADDRESS': "ADDRESS", + 'DATE_OF_BIRTH': "DATE_OF_BIRTH", + 'AGE': "AGE", }, } @@ -117,10 +118,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Lead form question type., must be one of ["CUSTOM", "FULL_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "ZIP_CODE", "AGE", "GENDER", "CITY", "COUNTRY", "PREFERRED_CONTACT_METHOD", "STATE_PROVINCE", ] # noqa: E501 + args[0] (str): Lead form question type., must be one of ["CUSTOM", "FULL_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "ZIP_CODE", "GENDER", "CITY", "COUNTRY", "STATE_PROVINCE", "ADDRESS", "DATE_OF_BIRTH", "AGE", ] # noqa: E501 Keyword Args: - value (str): Lead form question type., must be one of ["CUSTOM", "FULL_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "ZIP_CODE", "AGE", "GENDER", "CITY", "COUNTRY", "PREFERRED_CONTACT_METHOD", "STATE_PROVINCE", ] # noqa: E501 + value (str): Lead form question type., must be one of ["CUSTOM", "FULL_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "ZIP_CODE", "GENDER", "CITY", "COUNTRY", "STATE_PROVINCE", "ADDRESS", "DATE_OF_BIRTH", "AGE", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -207,10 +208,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Lead form question type., must be one of ["CUSTOM", "FULL_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "ZIP_CODE", "AGE", "GENDER", "CITY", "COUNTRY", "PREFERRED_CONTACT_METHOD", "STATE_PROVINCE", ] # noqa: E501 + args[0] (str): Lead form question type., must be one of ["CUSTOM", "FULL_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "ZIP_CODE", "GENDER", "CITY", "COUNTRY", "STATE_PROVINCE", "ADDRESS", "DATE_OF_BIRTH", "AGE", ] # noqa: E501 Keyword Args: - value (str): Lead form question type., must be one of ["CUSTOM", "FULL_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "ZIP_CODE", "AGE", "GENDER", "CITY", "COUNTRY", "PREFERRED_CONTACT_METHOD", "STATE_PROVINCE", ] # noqa: E501 + value (str): Lead form question type., must be one of ["CUSTOM", "FULL_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "ZIP_CODE", "GENDER", "CITY", "COUNTRY", "STATE_PROVINCE", "ADDRESS", "DATE_OF_BIRTH", "AGE", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/lead_form_response.py b/openapi_generated/pinterest_client/model/lead_form_response.py index f0cb9ec..1189e90 100644 --- a/openapi_generated/pinterest_client/model/lead_form_response.py +++ b/openapi_generated/pinterest_client/model/lead_form_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -32,10 +32,12 @@ def lazy_import(): from openapi_generated.pinterest_client.model.lead_form_common import LeadFormCommon + from openapi_generated.pinterest_client.model.lead_form_common_policy_links import LeadFormCommonPolicyLinks from openapi_generated.pinterest_client.model.lead_form_question import LeadFormQuestion from openapi_generated.pinterest_client.model.lead_form_response_all_of import LeadFormResponseAllOf from openapi_generated.pinterest_client.model.lead_form_status import LeadFormStatus globals()['LeadFormCommon'] = LeadFormCommon + globals()['LeadFormCommonPolicyLinks'] = LeadFormCommonPolicyLinks globals()['LeadFormQuestion'] = LeadFormQuestion globals()['LeadFormResponseAllOf'] = LeadFormResponseAllOf globals()['LeadFormStatus'] = LeadFormStatus @@ -73,6 +75,10 @@ class LeadFormResponse(ModelComposed): 'max_items': 10, 'min_items': 0, }, + ('policy_links',): { + 'max_items': 3, + 'min_items': 0, + }, ('id',): { 'regex': { 'pattern': r'^\d+$', # noqa: E501 @@ -115,6 +121,7 @@ def openapi_types(): 'status': (LeadFormStatus,), # noqa: E501 'disclosure_language': (str, none_type,), # noqa: E501 'questions': ([LeadFormQuestion],), # noqa: E501 + 'policy_links': ([LeadFormCommonPolicyLinks],), # noqa: E501 'id': (str,), # noqa: E501 'ad_account_id': (str,), # noqa: E501 'created_time': (int,), # noqa: E501 @@ -134,6 +141,7 @@ def discriminator(): 'status': 'status', # noqa: E501 'disclosure_language': 'disclosure_language', # noqa: E501 'questions': 'questions', # noqa: E501 + 'policy_links': 'policy_links', # noqa: E501 'id': 'id', # noqa: E501 'ad_account_id': 'ad_account_id', # noqa: E501 'created_time': 'created_time', # noqa: E501 @@ -181,11 +189,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) name (str, none_type): Internal name of the lead form.. [optional] # noqa: E501 privacy_policy_link (str, none_type): A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language.. [optional] # noqa: E501 - has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad.. [optional] # noqa: E501 + has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's Lead Ad Terms. As a reminder, all advertising on Pinterest is subject to the Pinterest Advertising Services Agreement or an equivalent agreement as set forth on an IO. [optional] # noqa: E501 completion_message (str, none_type): A message for people who complete the form to let them know what happens next.. [optional] # noqa: E501 status (LeadFormStatus): [optional] # noqa: E501 disclosure_language (str, none_type): Additional disclosure language to be included in the lead form.. [optional] # noqa: E501 questions ([LeadFormQuestion]): List of questions to be displayed on the lead form.. [optional] # noqa: E501 + policy_links ([LeadFormCommonPolicyLinks]): List of additional policy links to be displayed on the lead form.. [optional] # noqa: E501 id (str): The ID of this lead form. [optional] # noqa: E501 ad_account_id (str): The Ad Account ID that this lead form belongs to.. [optional] # noqa: E501 created_time (int): Lead form creation time. Unix timestamp in seconds.. [optional] # noqa: E501 @@ -291,11 +300,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) name (str, none_type): Internal name of the lead form.. [optional] # noqa: E501 privacy_policy_link (str, none_type): A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language.. [optional] # noqa: E501 - has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad.. [optional] # noqa: E501 + has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's Lead Ad Terms. As a reminder, all advertising on Pinterest is subject to the Pinterest Advertising Services Agreement or an equivalent agreement as set forth on an IO. [optional] # noqa: E501 completion_message (str, none_type): A message for people who complete the form to let them know what happens next.. [optional] # noqa: E501 status (LeadFormStatus): [optional] # noqa: E501 disclosure_language (str, none_type): Additional disclosure language to be included in the lead form.. [optional] # noqa: E501 questions ([LeadFormQuestion]): List of questions to be displayed on the lead form.. [optional] # noqa: E501 + policy_links ([LeadFormCommonPolicyLinks]): List of additional policy links to be displayed on the lead form.. [optional] # noqa: E501 id (str): The ID of this lead form. [optional] # noqa: E501 ad_account_id (str): The Ad Account ID that this lead form belongs to.. [optional] # noqa: E501 created_time (int): Lead form creation time. Unix timestamp in seconds.. [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/lead_form_response_all_of.py b/openapi_generated/pinterest_client/model/lead_form_response_all_of.py index a1f238e..090c3de 100644 --- a/openapi_generated/pinterest_client/model/lead_form_response_all_of.py +++ b/openapi_generated/pinterest_client/model/lead_form_response_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/lead_form_status.py b/openapi_generated/pinterest_client/model/lead_form_status.py index ae51794..fe308f4 100644 --- a/openapi_generated/pinterest_client/model/lead_form_status.py +++ b/openapi_generated/pinterest_client/model/lead_form_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/lead_form_test_request.py b/openapi_generated/pinterest_client/model/lead_form_test_request.py new file mode 100644 index 0000000..dbc8932 --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_form_test_request.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class LeadFormTestRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'answers': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'answers': 'answers', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, answers, *args, **kwargs): # noqa: E501 + """LeadFormTestRequest - a model defined in OpenAPI + + Args: + answers ([str]): Test lead answers. Should follow the creation order. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.answers = answers + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, answers, *args, **kwargs): # noqa: E501 + """LeadFormTestRequest - a model defined in OpenAPI + + Args: + answers ([str]): Test lead answers. Should follow the creation order. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.answers = answers + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/lead_form_test_response.py b/openapi_generated/pinterest_client/model/lead_form_test_response.py new file mode 100644 index 0000000..1ad47b6 --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_form_test_response.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class LeadFormTestResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('subscription_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'subscription_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'subscription_id': 'subscription_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LeadFormTestResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + subscription_id (str): Subscription ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LeadFormTestResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + subscription_id (str): Subscription ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/lead_form_update_request.py b/openapi_generated/pinterest_client/model/lead_form_update_request.py new file mode 100644 index 0000000..dbcd42f --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_form_update_request.py @@ -0,0 +1,365 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.lead_form_common import LeadFormCommon + from openapi_generated.pinterest_client.model.lead_form_common_policy_links import LeadFormCommonPolicyLinks + from openapi_generated.pinterest_client.model.lead_form_question import LeadFormQuestion + from openapi_generated.pinterest_client.model.lead_form_status import LeadFormStatus + from openapi_generated.pinterest_client.model.lead_form_update_request_all_of import LeadFormUpdateRequestAllOf + globals()['LeadFormCommon'] = LeadFormCommon + globals()['LeadFormCommonPolicyLinks'] = LeadFormCommonPolicyLinks + globals()['LeadFormQuestion'] = LeadFormQuestion + globals()['LeadFormStatus'] = LeadFormStatus + globals()['LeadFormUpdateRequestAllOf'] = LeadFormUpdateRequestAllOf + + +class LeadFormUpdateRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('questions',): { + 'max_items': 10, + 'min_items': 0, + }, + ('policy_links',): { + 'max_items': 3, + 'min_items': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 + 'privacy_policy_link': (str, none_type,), # noqa: E501 + 'has_accepted_terms': (bool,), # noqa: E501 + 'completion_message': (str, none_type,), # noqa: E501 + 'status': (LeadFormStatus,), # noqa: E501 + 'disclosure_language': (str, none_type,), # noqa: E501 + 'questions': ([LeadFormQuestion],), # noqa: E501 + 'policy_links': ([LeadFormCommonPolicyLinks],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'privacy_policy_link': 'privacy_policy_link', # noqa: E501 + 'has_accepted_terms': 'has_accepted_terms', # noqa: E501 + 'completion_message': 'completion_message', # noqa: E501 + 'status': 'status', # noqa: E501 + 'disclosure_language': 'disclosure_language', # noqa: E501 + 'questions': 'questions', # noqa: E501 + 'policy_links': 'policy_links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LeadFormUpdateRequest - a model defined in OpenAPI + + Keyword Args: + id (str): The ID of this lead form to be updated + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): Internal name of the lead form.. [optional] # noqa: E501 + privacy_policy_link (str, none_type): A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language.. [optional] # noqa: E501 + has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's Lead Ad Terms. As a reminder, all advertising on Pinterest is subject to the Pinterest Advertising Services Agreement or an equivalent agreement as set forth on an IO. [optional] # noqa: E501 + completion_message (str, none_type): A message for people who complete the form to let them know what happens next.. [optional] # noqa: E501 + status (LeadFormStatus): [optional] # noqa: E501 + disclosure_language (str, none_type): Additional disclosure language to be included in the lead form.. [optional] # noqa: E501 + questions ([LeadFormQuestion]): List of questions to be displayed on the lead form.. [optional] # noqa: E501 + policy_links ([LeadFormCommonPolicyLinks]): List of additional policy links to be displayed on the lead form.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LeadFormUpdateRequest - a model defined in OpenAPI + + Keyword Args: + id (str): The ID of this lead form to be updated + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): Internal name of the lead form.. [optional] # noqa: E501 + privacy_policy_link (str, none_type): A link to the advertiser's privacy policy. This will be included in the lead form's disclosure language.. [optional] # noqa: E501 + has_accepted_terms (bool): Whether the advertiser has accepted Pinterest's terms of service for creating a lead ad. By sending us TRUE for this parameter, you agree that (i) you will use any personal information received in compliance with the privacy policy you share with Pinterest, and (ii) you will comply with Pinterest's Lead Ad Terms. As a reminder, all advertising on Pinterest is subject to the Pinterest Advertising Services Agreement or an equivalent agreement as set forth on an IO. [optional] # noqa: E501 + completion_message (str, none_type): A message for people who complete the form to let them know what happens next.. [optional] # noqa: E501 + status (LeadFormStatus): [optional] # noqa: E501 + disclosure_language (str, none_type): Additional disclosure language to be included in the lead form.. [optional] # noqa: E501 + questions ([LeadFormQuestion]): List of questions to be displayed on the lead form.. [optional] # noqa: E501 + policy_links ([LeadFormCommonPolicyLinks]): List of additional policy links to be displayed on the lead form.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/lead_form_update_request_all_of.py b/openapi_generated/pinterest_client/model/lead_form_update_request_all_of.py new file mode 100644 index 0000000..d30835f --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_form_update_request_all_of.py @@ -0,0 +1,267 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class LeadFormUpdateRequestAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """LeadFormUpdateRequestAllOf - a model defined in OpenAPI + + Args: + id (str): The ID of this lead form to be updated + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """LeadFormUpdateRequestAllOf - a model defined in OpenAPI + + Args: + id (str): The ID of this lead form to be updated + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/leads_export_create_request.py b/openapi_generated/pinterest_client/model/leads_export_create_request.py new file mode 100644 index 0000000..ad97b6b --- /dev/null +++ b/openapi_generated/pinterest_client/model/leads_export_create_request.py @@ -0,0 +1,289 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class LeadsExportCreateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('start_date',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 + }, + }, + ('end_date',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 + }, + }, + ('ad_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'start_date': (str,), # noqa: E501 + 'end_date': (str,), # noqa: E501 + 'ad_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'start_date': 'start_date', # noqa: E501 + 'end_date': 'end_date', # noqa: E501 + 'ad_id': 'ad_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, start_date, end_date, ad_id, *args, **kwargs): # noqa: E501 + """LeadsExportCreateRequest - a model defined in OpenAPI + + Args: + start_date (str): Export leads collected on and after start date (UTC). Format: YYYY-MM-DD + end_date (str): Export leads collected on and before end date (UTC). Format: YYYY-MM-DD + ad_id (str): ID for the ad collecting leads + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.start_date = start_date + self.end_date = end_date + self.ad_id = ad_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, start_date, end_date, ad_id, *args, **kwargs): # noqa: E501 + """LeadsExportCreateRequest - a model defined in OpenAPI + + Args: + start_date (str): Export leads collected on and after start date (UTC). Format: YYYY-MM-DD + end_date (str): Export leads collected on and before end date (UTC). Format: YYYY-MM-DD + ad_id (str): ID for the ad collecting leads + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.start_date = start_date + self.end_date = end_date + self.ad_id = ad_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/leads_export_create_response.py b/openapi_generated/pinterest_client/model/leads_export_create_response.py new file mode 100644 index 0000000..713079e --- /dev/null +++ b/openapi_generated/pinterest_client/model/leads_export_create_response.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class LeadsExportCreateResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('leads_export_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'leads_export_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'leads_export_id': 'leads_export_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LeadsExportCreateResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + leads_export_id (str): ID for the leads export job. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LeadsExportCreateResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + leads_export_id (str): ID for the leads export job. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/leads_export_response_data.py b/openapi_generated/pinterest_client/model/leads_export_response_data.py new file mode 100644 index 0000000..7fac77b --- /dev/null +++ b/openapi_generated/pinterest_client/model/leads_export_response_data.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.leads_export_status import LeadsExportStatus + globals()['LeadsExportStatus'] = LeadsExportStatus + + +class LeadsExportResponseData(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'export_status': (LeadsExportStatus,), # noqa: E501 + 'download_url': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'export_status': 'export_status', # noqa: E501 + 'download_url': 'download_url', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LeadsExportResponseData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + export_status (LeadsExportStatus): [optional] # noqa: E501 + download_url (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LeadsExportResponseData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + export_status (LeadsExportStatus): [optional] # noqa: E501 + download_url (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/leads_export_status.py b/openapi_generated/pinterest_client/model/leads_export_status.py new file mode 100644 index 0000000..702cfbe --- /dev/null +++ b/openapi_generated/pinterest_client/model/leads_export_status.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class LeadsExportStatus(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'IN_PROGRESS': "IN_PROGRESS", + 'FINISHED': "FINISHED", + 'FAILED': "FAILED", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """LeadsExportStatus - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Status of a leads export job., must be one of ["IN_PROGRESS", "FINISHED", "FAILED", ] # noqa: E501 + + Keyword Args: + value (str): Status of a leads export job., must be one of ["IN_PROGRESS", "FINISHED", "FAILED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """LeadsExportStatus - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Status of a leads export job., must be one of ["IN_PROGRESS", "FINISHED", "FAILED", ] # noqa: E501 + + Keyword Args: + value (str): Status of a leads export job., must be one of ["IN_PROGRESS", "FINISHED", "FAILED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/line_item.py b/openapi_generated/pinterest_client/model/line_item.py index 697b5c0..ba3db6f 100644 --- a/openapi_generated/pinterest_client/model/line_item.py +++ b/openapi_generated/pinterest_client/model/line_item.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/linked_business.py b/openapi_generated/pinterest_client/model/linked_business.py index 22fde86..3101d23 100644 --- a/openapi_generated/pinterest_client/model/linked_business.py +++ b/openapi_generated/pinterest_client/model/linked_business.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/match_type.py b/openapi_generated/pinterest_client/model/match_type.py index 3e5d481..81037d3 100644 --- a/openapi_generated/pinterest_client/model/match_type.py +++ b/openapi_generated/pinterest_client/model/match_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/match_type_response.py b/openapi_generated/pinterest_client/model/match_type_response.py index 4932e1f..a311c3e 100644 --- a/openapi_generated/pinterest_client/model/match_type_response.py +++ b/openapi_generated/pinterest_client/model/match_type_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/max_price_filter.py b/openapi_generated/pinterest_client/model/max_price_filter.py index 1217582..b01bd26 100644 --- a/openapi_generated/pinterest_client/model/max_price_filter.py +++ b/openapi_generated/pinterest_client/model/max_price_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/media_type.py b/openapi_generated/pinterest_client/model/media_type.py new file mode 100644 index 0000000..a49c099 --- /dev/null +++ b/openapi_generated/pinterest_client/model/media_type.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class MediaType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'IMAGE': "IMAGE", + 'VIDEO': "VIDEO", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """MediaType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["IMAGE", "VIDEO", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["IMAGE", "VIDEO", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """MediaType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["IMAGE", "VIDEO", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["IMAGE", "VIDEO", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/media_type_filter.py b/openapi_generated/pinterest_client/model/media_type_filter.py new file mode 100644 index 0000000..289e436 --- /dev/null +++ b/openapi_generated/pinterest_client/model/media_type_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_media_types_criteria import CatalogsProductGroupMultipleMediaTypesCriteria + globals()['CatalogsProductGroupMultipleMediaTypesCriteria'] = CatalogsProductGroupMultipleMediaTypesCriteria + + +class MediaTypeFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'media_type': (CatalogsProductGroupMultipleMediaTypesCriteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'media_type': 'MEDIA_TYPE', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, media_type, *args, **kwargs): # noqa: E501 + """MediaTypeFilter - a model defined in OpenAPI + + Args: + media_type (CatalogsProductGroupMultipleMediaTypesCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.media_type = media_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, media_type, *args, **kwargs): # noqa: E501 + """MediaTypeFilter - a model defined in OpenAPI + + Args: + media_type (CatalogsProductGroupMultipleMediaTypesCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.media_type = media_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/media_upload.py b/openapi_generated/pinterest_client/model/media_upload.py index 597904f..4d17590 100644 --- a/openapi_generated/pinterest_client/model/media_upload.py +++ b/openapi_generated/pinterest_client/model/media_upload.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/media_upload_all_of.py b/openapi_generated/pinterest_client/model/media_upload_all_of.py index c6ce7b2..9b3cead 100644 --- a/openapi_generated/pinterest_client/model/media_upload_all_of.py +++ b/openapi_generated/pinterest_client/model/media_upload_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/media_upload_all_of_upload_parameters.py b/openapi_generated/pinterest_client/model/media_upload_all_of_upload_parameters.py index 0023d9c..3647c39 100644 --- a/openapi_generated/pinterest_client/model/media_upload_all_of_upload_parameters.py +++ b/openapi_generated/pinterest_client/model/media_upload_all_of_upload_parameters.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/media_upload_details.py b/openapi_generated/pinterest_client/model/media_upload_details.py index 1992119..581f548 100644 --- a/openapi_generated/pinterest_client/model/media_upload_details.py +++ b/openapi_generated/pinterest_client/model/media_upload_details.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/media_upload_request.py b/openapi_generated/pinterest_client/model/media_upload_request.py index 3970d2e..b2fc16e 100644 --- a/openapi_generated/pinterest_client/model/media_upload_request.py +++ b/openapi_generated/pinterest_client/model/media_upload_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/media_upload_status.py b/openapi_generated/pinterest_client/model/media_upload_status.py index f73f53b..a934795 100644 --- a/openapi_generated/pinterest_client/model/media_upload_status.py +++ b/openapi_generated/pinterest_client/model/media_upload_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/media_upload_type.py b/openapi_generated/pinterest_client/model/media_upload_type.py index 89ddaf7..eaaaf71 100644 --- a/openapi_generated/pinterest_client/model/media_upload_type.py +++ b/openapi_generated/pinterest_client/model/media_upload_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/member_business_role.py b/openapi_generated/pinterest_client/model/member_business_role.py new file mode 100644 index 0000000..4a5411a --- /dev/null +++ b/openapi_generated/pinterest_client/model/member_business_role.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class MemberBusinessRole(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'EMPLOYEE': "EMPLOYEE", + 'BIZ_ADMIN': "BIZ_ADMIN", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """MemberBusinessRole - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The access level a member/partner has to the business. Values are case-sensitive.
    - EMPLOYEE: Can only view and access ad accounts you assign to them. They cannot see details about other employees, external partners or other ad accounts.
    - BIZ_ADMIN: Have full control of roles and can add employees, external partners as well as grant ad account access.., must be one of ["EMPLOYEE", "BIZ_ADMIN", ] # noqa: E501 + + Keyword Args: + value (str): The access level a member/partner has to the business. Values are case-sensitive.
    - EMPLOYEE: Can only view and access ad accounts you assign to them. They cannot see details about other employees, external partners or other ad accounts.
    - BIZ_ADMIN: Have full control of roles and can add employees, external partners as well as grant ad account access.., must be one of ["EMPLOYEE", "BIZ_ADMIN", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """MemberBusinessRole - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The access level a member/partner has to the business. Values are case-sensitive.
    - EMPLOYEE: Can only view and access ad accounts you assign to them. They cannot see details about other employees, external partners or other ad accounts.
    - BIZ_ADMIN: Have full control of roles and can add employees, external partners as well as grant ad account access.., must be one of ["EMPLOYEE", "BIZ_ADMIN", ] # noqa: E501 + + Keyword Args: + value (str): The access level a member/partner has to the business. Values are case-sensitive.
    - EMPLOYEE: Can only view and access ad accounts you assign to them. They cannot see details about other employees, external partners or other ad accounts.
    - BIZ_ADMIN: Have full control of roles and can add employees, external partners as well as grant ad account access.., must be one of ["EMPLOYEE", "BIZ_ADMIN", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/members_to_delete_body.py b/openapi_generated/pinterest_client/model/members_to_delete_body.py new file mode 100644 index 0000000..f8c362f --- /dev/null +++ b/openapi_generated/pinterest_client/model/members_to_delete_body.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.members_to_delete_body_members import MembersToDeleteBodyMembers + globals()['MembersToDeleteBodyMembers'] = MembersToDeleteBodyMembers + + +class MembersToDeleteBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('members',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'members': ([MembersToDeleteBodyMembers],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'members': 'members', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, members, *args, **kwargs): # noqa: E501 + """MembersToDeleteBody - a model defined in OpenAPI + + Args: + members ([MembersToDeleteBodyMembers]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.members = members + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, members, *args, **kwargs): # noqa: E501 + """MembersToDeleteBody - a model defined in OpenAPI + + Args: + members ([MembersToDeleteBodyMembers]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.members = members + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/members_to_delete_body_members.py b/openapi_generated/pinterest_client/model/members_to_delete_body_members.py new file mode 100644 index 0000000..2fd5aaf --- /dev/null +++ b/openapi_generated/pinterest_client/model/members_to_delete_body_members.py @@ -0,0 +1,280 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_role_for_members import BusinessRoleForMembers + globals()['BusinessRoleForMembers'] = BusinessRoleForMembers + + +class MembersToDeleteBodyMembers(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('member_id',): { + 'max_length': 25, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'member_id': (str,), # noqa: E501 + 'business_role': (BusinessRoleForMembers,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'member_id': 'member_id', # noqa: E501 + 'business_role': 'business_role', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, member_id, business_role, *args, **kwargs): # noqa: E501 + """MembersToDeleteBodyMembers - a model defined in OpenAPI + + Args: + member_id (str): Unique identifier of the member + business_role (BusinessRoleForMembers): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.member_id = member_id + self.business_role = business_role + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, member_id, business_role, *args, **kwargs): # noqa: E501 + """MembersToDeleteBodyMembers - a model defined in OpenAPI + + Args: + member_id (str): Unique identifier of the member + business_role (BusinessRoleForMembers): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.member_id = member_id + self.business_role = business_role + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/metrics.py b/openapi_generated/pinterest_client/model/metrics.py index 31c863d..64bcf3e 100644 --- a/openapi_generated/pinterest_client/model/metrics.py +++ b/openapi_generated/pinterest_client/model/metrics.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/metrics_reporting_level.py b/openapi_generated/pinterest_client/model/metrics_reporting_level.py index 5182b48..504f5aa 100644 --- a/openapi_generated/pinterest_client/model/metrics_reporting_level.py +++ b/openapi_generated/pinterest_client/model/metrics_reporting_level.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -65,6 +65,7 @@ class MetricsReportingLevel(ModelSimple): 'PRODUCT_GROUP': "PRODUCT_GROUP", 'PRODUCT_GROUP_TARGETING': "PRODUCT_GROUP_TARGETING", 'PRODUCT_ITEM': "PRODUCT_ITEM", + 'PRODUCT_ITEM_TARGETING': "PRODUCT_ITEM_TARGETING", }, } @@ -116,10 +117,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Level of the reporting request., must be one of ["ADVERTISER", "ADVERTISER_TARGETING", "CAMPAIGN", "CAMPAIGN_TARGETING", "AD_GROUP", "AD_GROUP_TARGETING", "PIN_PROMOTION", "PIN_PROMOTION_TARGETING", "KEYWORD", "PRODUCT_GROUP", "PRODUCT_GROUP_TARGETING", "PRODUCT_ITEM", ] # noqa: E501 + args[0] (str): Level of the reporting request., must be one of ["ADVERTISER", "ADVERTISER_TARGETING", "CAMPAIGN", "CAMPAIGN_TARGETING", "AD_GROUP", "AD_GROUP_TARGETING", "PIN_PROMOTION", "PIN_PROMOTION_TARGETING", "KEYWORD", "PRODUCT_GROUP", "PRODUCT_GROUP_TARGETING", "PRODUCT_ITEM", "PRODUCT_ITEM_TARGETING", ] # noqa: E501 Keyword Args: - value (str): Level of the reporting request., must be one of ["ADVERTISER", "ADVERTISER_TARGETING", "CAMPAIGN", "CAMPAIGN_TARGETING", "AD_GROUP", "AD_GROUP_TARGETING", "PIN_PROMOTION", "PIN_PROMOTION_TARGETING", "KEYWORD", "PRODUCT_GROUP", "PRODUCT_GROUP_TARGETING", "PRODUCT_ITEM", ] # noqa: E501 + value (str): Level of the reporting request., must be one of ["ADVERTISER", "ADVERTISER_TARGETING", "CAMPAIGN", "CAMPAIGN_TARGETING", "AD_GROUP", "AD_GROUP_TARGETING", "PIN_PROMOTION", "PIN_PROMOTION_TARGETING", "KEYWORD", "PRODUCT_GROUP", "PRODUCT_GROUP_TARGETING", "PRODUCT_ITEM", "PRODUCT_ITEM_TARGETING", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -206,10 +207,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Level of the reporting request., must be one of ["ADVERTISER", "ADVERTISER_TARGETING", "CAMPAIGN", "CAMPAIGN_TARGETING", "AD_GROUP", "AD_GROUP_TARGETING", "PIN_PROMOTION", "PIN_PROMOTION_TARGETING", "KEYWORD", "PRODUCT_GROUP", "PRODUCT_GROUP_TARGETING", "PRODUCT_ITEM", ] # noqa: E501 + args[0] (str): Level of the reporting request., must be one of ["ADVERTISER", "ADVERTISER_TARGETING", "CAMPAIGN", "CAMPAIGN_TARGETING", "AD_GROUP", "AD_GROUP_TARGETING", "PIN_PROMOTION", "PIN_PROMOTION_TARGETING", "KEYWORD", "PRODUCT_GROUP", "PRODUCT_GROUP_TARGETING", "PRODUCT_ITEM", "PRODUCT_ITEM_TARGETING", ] # noqa: E501 Keyword Args: - value (str): Level of the reporting request., must be one of ["ADVERTISER", "ADVERTISER_TARGETING", "CAMPAIGN", "CAMPAIGN_TARGETING", "AD_GROUP", "AD_GROUP_TARGETING", "PIN_PROMOTION", "PIN_PROMOTION_TARGETING", "KEYWORD", "PRODUCT_GROUP", "PRODUCT_GROUP_TARGETING", "PRODUCT_ITEM", ] # noqa: E501 + value (str): Level of the reporting request., must be one of ["ADVERTISER", "ADVERTISER_TARGETING", "CAMPAIGN", "CAMPAIGN_TARGETING", "AD_GROUP", "AD_GROUP_TARGETING", "PIN_PROMOTION", "PIN_PROMOTION_TARGETING", "KEYWORD", "PRODUCT_GROUP", "PRODUCT_GROUP_TARGETING", "PRODUCT_ITEM", "PRODUCT_ITEM_TARGETING", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/metrics_response.py b/openapi_generated/pinterest_client/model/metrics_response.py index 847c434..60bebbf 100644 --- a/openapi_generated/pinterest_client/model/metrics_response.py +++ b/openapi_generated/pinterest_client/model/metrics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/min_price_filter.py b/openapi_generated/pinterest_client/model/min_price_filter.py index 0337446..95665ba 100644 --- a/openapi_generated/pinterest_client/model/min_price_filter.py +++ b/openapi_generated/pinterest_client/model/min_price_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/mmm_reporting_column.py b/openapi_generated/pinterest_client/model/mmm_reporting_column.py new file mode 100644 index 0000000..ee5f866 --- /dev/null +++ b/openapi_generated/pinterest_client/model/mmm_reporting_column.py @@ -0,0 +1,301 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class MMMReportingColumn(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'SPEND_IN_DOLLAR': "SPEND_IN_DOLLAR", + 'SPEND_IN_MICRO_DOLLAR': "SPEND_IN_MICRO_DOLLAR", + 'ECPC_IN_DOLLAR': "ECPC_IN_DOLLAR", + 'ECTR': "ECTR", + 'CAMPAIGN_NAME': "CAMPAIGN_NAME", + 'TOTAL_ENGAGEMENT': "TOTAL_ENGAGEMENT", + 'EENGAGEMENT_RATE': "EENGAGEMENT_RATE", + 'ECPM_IN_DOLLAR': "ECPM_IN_DOLLAR", + 'CAMPAIGN_ID': "CAMPAIGN_ID", + 'ADVERTISER_ID': "ADVERTISER_ID", + 'AD_GROUP_ID': "AD_GROUP_ID", + 'AD_GROUP_NAME': "AD_GROUP_NAME", + 'CLICKTHROUGH_1': "CLICKTHROUGH_1", + 'IMPRESSION_1': "IMPRESSION_1", + 'CLICKTHROUGH_2': "CLICKTHROUGH_2", + 'IMPRESSION_2': "IMPRESSION_2", + 'TOTAL_CLICKTHROUGH': "TOTAL_CLICKTHROUGH", + 'TOTAL_IMPRESSION': "TOTAL_IMPRESSION", + 'ADVERTISER_NAME': "ADVERTISER_NAME", + 'SPEND_ORDER_LINE_PAID_TYPE': "SPEND_ORDER_LINE_PAID_TYPE", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """MMMReportingColumn - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Marketing Mix Modeling (MMM) Reporting Columns., must be one of ["SPEND_IN_DOLLAR", "SPEND_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "ECTR", "CAMPAIGN_NAME", "TOTAL_ENGAGEMENT", "EENGAGEMENT_RATE", "ECPM_IN_DOLLAR", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_GROUP_ID", "AD_GROUP_NAME", "CLICKTHROUGH_1", "IMPRESSION_1", "CLICKTHROUGH_2", "IMPRESSION_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "ADVERTISER_NAME", "SPEND_ORDER_LINE_PAID_TYPE", ] # noqa: E501 + + Keyword Args: + value (str): Marketing Mix Modeling (MMM) Reporting Columns., must be one of ["SPEND_IN_DOLLAR", "SPEND_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "ECTR", "CAMPAIGN_NAME", "TOTAL_ENGAGEMENT", "EENGAGEMENT_RATE", "ECPM_IN_DOLLAR", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_GROUP_ID", "AD_GROUP_NAME", "CLICKTHROUGH_1", "IMPRESSION_1", "CLICKTHROUGH_2", "IMPRESSION_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "ADVERTISER_NAME", "SPEND_ORDER_LINE_PAID_TYPE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """MMMReportingColumn - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Marketing Mix Modeling (MMM) Reporting Columns., must be one of ["SPEND_IN_DOLLAR", "SPEND_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "ECTR", "CAMPAIGN_NAME", "TOTAL_ENGAGEMENT", "EENGAGEMENT_RATE", "ECPM_IN_DOLLAR", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_GROUP_ID", "AD_GROUP_NAME", "CLICKTHROUGH_1", "IMPRESSION_1", "CLICKTHROUGH_2", "IMPRESSION_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "ADVERTISER_NAME", "SPEND_ORDER_LINE_PAID_TYPE", ] # noqa: E501 + + Keyword Args: + value (str): Marketing Mix Modeling (MMM) Reporting Columns., must be one of ["SPEND_IN_DOLLAR", "SPEND_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "ECTR", "CAMPAIGN_NAME", "TOTAL_ENGAGEMENT", "EENGAGEMENT_RATE", "ECPM_IN_DOLLAR", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_GROUP_ID", "AD_GROUP_NAME", "CLICKTHROUGH_1", "IMPRESSION_1", "CLICKTHROUGH_2", "IMPRESSION_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "ADVERTISER_NAME", "SPEND_ORDER_LINE_PAID_TYPE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/mmm_reporting_targeting_type.py b/openapi_generated/pinterest_client/model/mmm_reporting_targeting_type.py new file mode 100644 index 0000000..26161dc --- /dev/null +++ b/openapi_generated/pinterest_client/model/mmm_reporting_targeting_type.py @@ -0,0 +1,286 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class MMMReportingTargetingType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'APPTYPE': "APPTYPE", + 'COUNTRY': "COUNTRY", + 'CREATIVE_TYPE': "CREATIVE_TYPE", + 'GENDER': "GENDER", + 'LOCATION': "LOCATION", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """MMMReportingTargetingType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Ad targeting types for MMM report., must be one of ["APPTYPE", "COUNTRY", "CREATIVE_TYPE", "GENDER", "LOCATION", ] # noqa: E501 + + Keyword Args: + value (str): Ad targeting types for MMM report., must be one of ["APPTYPE", "COUNTRY", "CREATIVE_TYPE", "GENDER", "LOCATION", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """MMMReportingTargetingType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Ad targeting types for MMM report., must be one of ["APPTYPE", "COUNTRY", "CREATIVE_TYPE", "GENDER", "LOCATION", ] # noqa: E501 + + Keyword Args: + value (str): Ad targeting types for MMM report., must be one of ["APPTYPE", "COUNTRY", "CREATIVE_TYPE", "GENDER", "LOCATION", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/non_nullable_catalogs_currency.py b/openapi_generated/pinterest_client/model/non_nullable_catalogs_currency.py index c39997e..3c8bea9 100644 --- a/openapi_generated/pinterest_client/model/non_nullable_catalogs_currency.py +++ b/openapi_generated/pinterest_client/model/non_nullable_catalogs_currency.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/non_nullable_product_availability_type.py b/openapi_generated/pinterest_client/model/non_nullable_product_availability_type.py index 77b84eb..629b200 100644 --- a/openapi_generated/pinterest_client/model/non_nullable_product_availability_type.py +++ b/openapi_generated/pinterest_client/model/non_nullable_product_availability_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/nullable_catalogs_item_field_type.py b/openapi_generated/pinterest_client/model/nullable_catalogs_item_field_type.py index cf0a94a..c38eb22 100644 --- a/openapi_generated/pinterest_client/model/nullable_catalogs_item_field_type.py +++ b/openapi_generated/pinterest_client/model/nullable_catalogs_item_field_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/nullable_currency.py b/openapi_generated/pinterest_client/model/nullable_currency.py index 3137334..7d8d396 100644 --- a/openapi_generated/pinterest_client/model/nullable_currency.py +++ b/openapi_generated/pinterest_client/model/nullable_currency.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_request_client_credentials.py b/openapi_generated/pinterest_client/model/oauth_access_token_request_client_credentials.py new file mode 100644 index 0000000..2060fc1 --- /dev/null +++ b/openapi_generated/pinterest_client/model/oauth_access_token_request_client_credentials.py @@ -0,0 +1,321 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.oauth_access_token_request_client_credentials_all_of import OauthAccessTokenRequestClientCredentialsAllOf + globals()['OauthAccessTokenRequestClientCredentialsAllOf'] = OauthAccessTokenRequestClientCredentialsAllOf + + +class OauthAccessTokenRequestClientCredentials(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('grant_type',): { + 'AUTHORIZATION_CODE': "authorization_code", + 'REFRESH_TOKEN': "refresh_token", + 'CLIENT_CREDENTIALS': "client_credentials", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'grant_type': (str,), # noqa: E501 + 'scope': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'grant_type': 'grant_type', # noqa: E501 + 'scope': 'scope', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OauthAccessTokenRequestClientCredentials - a model defined in OpenAPI + + Keyword Args: + grant_type (str): + scope (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """OauthAccessTokenRequestClientCredentials - a model defined in OpenAPI + + Keyword Args: + grant_type (str): + scope (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_request_client_credentials_all_of.py b/openapi_generated/pinterest_client/model/oauth_access_token_request_client_credentials_all_of.py new file mode 100644 index 0000000..b624b22 --- /dev/null +++ b/openapi_generated/pinterest_client/model/oauth_access_token_request_client_credentials_all_of.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class OauthAccessTokenRequestClientCredentialsAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'scope': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'scope': 'scope', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, scope, *args, **kwargs): # noqa: E501 + """OauthAccessTokenRequestClientCredentialsAllOf - a model defined in OpenAPI + + Args: + scope (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.scope = scope + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, scope, *args, **kwargs): # noqa: E501 + """OauthAccessTokenRequestClientCredentialsAllOf - a model defined in OpenAPI + + Args: + scope (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.scope = scope + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_request_code.py b/openapi_generated/pinterest_client/model/oauth_access_token_request_code.py index 8980c20..b4d4119 100644 --- a/openapi_generated/pinterest_client/model/oauth_access_token_request_code.py +++ b/openapi_generated/pinterest_client/model/oauth_access_token_request_code.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,14 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.oauth_access_token_request import OauthAccessTokenRequest - from openapi_generated.pinterest_client.model.oauth_access_token_request_code import OauthAccessTokenRequestCode from openapi_generated.pinterest_client.model.oauth_access_token_request_code_all_of import OauthAccessTokenRequestCodeAllOf - from openapi_generated.pinterest_client.model.oauth_access_token_request_refresh import OauthAccessTokenRequestRefresh - globals()['OauthAccessTokenRequest'] = OauthAccessTokenRequest - globals()['OauthAccessTokenRequestCode'] = OauthAccessTokenRequestCode globals()['OauthAccessTokenRequestCodeAllOf'] = OauthAccessTokenRequestCodeAllOf - globals()['OauthAccessTokenRequestRefresh'] = OauthAccessTokenRequestRefresh class OauthAccessTokenRequestCode(ModelComposed): @@ -69,6 +63,7 @@ class OauthAccessTokenRequestCode(ModelComposed): ('grant_type',): { 'AUTHORIZATION_CODE': "authorization_code", 'REFRESH_TOKEN': "refresh_token", + 'CLIENT_CREDENTIALS': "client_credentials", }, } @@ -98,26 +93,20 @@ def openapi_types(): """ lazy_import() return { + 'grant_type': (str,), # noqa: E501 'code': (str,), # noqa: E501 'redirect_uri': (str,), # noqa: E501 - 'grant_type': (str,), # noqa: E501 } @cached_property def discriminator(): - lazy_import() - val = { - 'authorization_code': OauthAccessTokenRequestCode, - 'refresh_token': OauthAccessTokenRequestRefresh, - } - if not val: - return None - return {'grant_type': val} + return None + attribute_map = { + 'grant_type': 'grant_type', # noqa: E501 'code': 'code', # noqa: E501 'redirect_uri': 'redirect_uri', # noqa: E501 - 'grant_type': 'grant_type', # noqa: E501 } read_only_vars = { @@ -129,9 +118,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """OauthAccessTokenRequestCode - a model defined in OpenAPI Keyword Args: + grant_type (str): code (str): redirect_uri (str): - grant_type (str): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -231,9 +220,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 """OauthAccessTokenRequestCode - a model defined in OpenAPI Keyword Args: + grant_type (str): code (str): redirect_uri (str): - grant_type (str): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_request_code_all_of.py b/openapi_generated/pinterest_client/model/oauth_access_token_request_code_all_of.py index 6cabbf7..f576324 100644 --- a/openapi_generated/pinterest_client/model/oauth_access_token_request_code_all_of.py +++ b/openapi_generated/pinterest_client/model/oauth_access_token_request_code_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_request_refresh.py b/openapi_generated/pinterest_client/model/oauth_access_token_request_refresh.py index 06aae8c..43f69de 100644 --- a/openapi_generated/pinterest_client/model/oauth_access_token_request_refresh.py +++ b/openapi_generated/pinterest_client/model/oauth_access_token_request_refresh.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,13 +31,7 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.oauth_access_token_request import OauthAccessTokenRequest - from openapi_generated.pinterest_client.model.oauth_access_token_request_code import OauthAccessTokenRequestCode - from openapi_generated.pinterest_client.model.oauth_access_token_request_refresh import OauthAccessTokenRequestRefresh from openapi_generated.pinterest_client.model.oauth_access_token_request_refresh_all_of import OauthAccessTokenRequestRefreshAllOf - globals()['OauthAccessTokenRequest'] = OauthAccessTokenRequest - globals()['OauthAccessTokenRequestCode'] = OauthAccessTokenRequestCode - globals()['OauthAccessTokenRequestRefresh'] = OauthAccessTokenRequestRefresh globals()['OauthAccessTokenRequestRefreshAllOf'] = OauthAccessTokenRequestRefreshAllOf @@ -69,6 +63,7 @@ class OauthAccessTokenRequestRefresh(ModelComposed): ('grant_type',): { 'AUTHORIZATION_CODE': "authorization_code", 'REFRESH_TOKEN': "refresh_token", + 'CLIENT_CREDENTIALS': "client_credentials", }, } @@ -98,26 +93,22 @@ def openapi_types(): """ lazy_import() return { - 'refresh_token': (str,), # noqa: E501 'grant_type': (str,), # noqa: E501 + 'refresh_token': (str,), # noqa: E501 'scope': (str,), # noqa: E501 + 'refresh_on': (bool,), # noqa: E501 } @cached_property def discriminator(): - lazy_import() - val = { - 'authorization_code': OauthAccessTokenRequestCode, - 'refresh_token': OauthAccessTokenRequestRefresh, - } - if not val: - return None - return {'grant_type': val} + return None + attribute_map = { - 'refresh_token': 'refresh_token', # noqa: E501 'grant_type': 'grant_type', # noqa: E501 + 'refresh_token': 'refresh_token', # noqa: E501 'scope': 'scope', # noqa: E501 + 'refresh_on': 'refresh_on', # noqa: E501 } read_only_vars = { @@ -129,8 +120,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """OauthAccessTokenRequestRefresh - a model defined in OpenAPI Keyword Args: - refresh_token (str): grant_type (str): + refresh_token (str): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -162,6 +153,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) scope (str): [optional] # noqa: E501 + refresh_on (bool): Setting this field to true will add a new refresh token to your 200 response, as well as the refresh_token_expires_in and refresh_token_expires_at fields. To see the structure of this payload, set the 200 response_type to \"everlasting_refresh\".. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -231,8 +223,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 """OauthAccessTokenRequestRefresh - a model defined in OpenAPI Keyword Args: - refresh_token (str): grant_type (str): + refresh_token (str): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -264,6 +256,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) scope (str): [optional] # noqa: E501 + refresh_on (bool): Setting this field to true will add a new refresh token to your 200 response, as well as the refresh_token_expires_in and refresh_token_expires_at fields. To see the structure of this payload, set the 200 response_type to \"everlasting_refresh\".. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_request_refresh_all_of.py b/openapi_generated/pinterest_client/model/oauth_access_token_request_refresh_all_of.py index 4d1756b..37984d5 100644 --- a/openapi_generated/pinterest_client/model/oauth_access_token_request_refresh_all_of.py +++ b/openapi_generated/pinterest_client/model/oauth_access_token_request_refresh_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -84,6 +84,7 @@ def openapi_types(): return { 'refresh_token': (str,), # noqa: E501 'scope': (str,), # noqa: E501 + 'refresh_on': (bool,), # noqa: E501 } @cached_property @@ -94,6 +95,7 @@ def discriminator(): attribute_map = { 'refresh_token': 'refresh_token', # noqa: E501 'scope': 'scope', # noqa: E501 + 'refresh_on': 'refresh_on', # noqa: E501 } read_only_vars = { @@ -141,6 +143,7 @@ def _from_openapi_data(cls, refresh_token, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) scope (str): [optional] # noqa: E501 + refresh_on (bool): Setting this field to true will add a new refresh token to your 200 response, as well as the refresh_token_expires_in and refresh_token_expires_at fields. To see the structure of this payload, set the 200 response_type to \"everlasting_refresh\".. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -227,6 +230,7 @@ def __init__(self, refresh_token, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) scope (str): [optional] # noqa: E501 + refresh_on (bool): Setting this field to true will add a new refresh token to your 200 response, as well as the refresh_token_expires_in and refresh_token_expires_at fields. To see the structure of this payload, set the 200 response_type to \"everlasting_refresh\".. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_response.py b/openapi_generated/pinterest_client/model/oauth_access_token_response.py index 2ec8cb4..9c35e02 100644 --- a/openapi_generated/pinterest_client/model/oauth_access_token_response.py +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,10 +31,14 @@ def lazy_import(): + from openapi_generated.pinterest_client.model.oauth_access_token_response_client_credentials import OauthAccessTokenResponseClientCredentials from openapi_generated.pinterest_client.model.oauth_access_token_response_code import OauthAccessTokenResponseCode + from openapi_generated.pinterest_client.model.oauth_access_token_response_everlasting_refresh import OauthAccessTokenResponseEverlastingRefresh from openapi_generated.pinterest_client.model.oauth_access_token_response_integration_refresh import OauthAccessTokenResponseIntegrationRefresh from openapi_generated.pinterest_client.model.oauth_access_token_response_refresh import OauthAccessTokenResponseRefresh + globals()['OauthAccessTokenResponseClientCredentials'] = OauthAccessTokenResponseClientCredentials globals()['OauthAccessTokenResponseCode'] = OauthAccessTokenResponseCode + globals()['OauthAccessTokenResponseEverlastingRefresh'] = OauthAccessTokenResponseEverlastingRefresh globals()['OauthAccessTokenResponseIntegrationRefresh'] = OauthAccessTokenResponseIntegrationRefresh globals()['OauthAccessTokenResponseRefresh'] = OauthAccessTokenResponseRefresh @@ -67,6 +71,7 @@ class OauthAccessTokenResponse(ModelNormal): ('response_type',): { 'AUTHORIZATION_CODE': "authorization_code", 'REFRESH_TOKEN': "refresh_token", + 'CLIENT_CREDENTIALS': "client_credentials", }, } @@ -107,10 +112,9 @@ def openapi_types(): def discriminator(): lazy_import() val = { - 'OauthAccessTokenResponseCode': OauthAccessTokenResponseCode, - 'OauthAccessTokenResponseIntegrationRefresh': OauthAccessTokenResponseIntegrationRefresh, - 'OauthAccessTokenResponseRefresh': OauthAccessTokenResponseRefresh, 'authorization_code': OauthAccessTokenResponseCode, + 'client_credentials': OauthAccessTokenResponseClientCredentials, + 'everlasting_refresh': OauthAccessTokenResponseEverlastingRefresh, 'integration_refresh': OauthAccessTokenResponseIntegrationRefresh, 'refresh_token': OauthAccessTokenResponseRefresh, } diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_response_client_credentials.py b/openapi_generated/pinterest_client/model/oauth_access_token_response_client_credentials.py new file mode 100644 index 0000000..3db7126 --- /dev/null +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response_client_credentials.py @@ -0,0 +1,291 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class OauthAccessTokenResponseClientCredentials(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('response_type',): { + 'AUTHORIZATION_CODE': "authorization_code", + 'REFRESH_TOKEN': "refresh_token", + 'CLIENT_CREDENTIALS': "client_credentials", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'access_token': (str,), # noqa: E501 + 'token_type': (str,), # noqa: E501 + 'expires_in': (int,), # noqa: E501 + 'scope': (str,), # noqa: E501 + 'response_type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access_token': 'access_token', # noqa: E501 + 'token_type': 'token_type', # noqa: E501 + 'expires_in': 'expires_in', # noqa: E501 + 'scope': 'scope', # noqa: E501 + 'response_type': 'response_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, access_token, expires_in, scope, *args, **kwargs): # noqa: E501 + """OauthAccessTokenResponseClientCredentials - a model defined in OpenAPI + + Args: + access_token (str): + expires_in (int): + scope (str): + + Keyword Args: + token_type (str): defaults to "bearer" # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + response_type (str): [optional] # noqa: E501 + """ + + token_type = kwargs.get('token_type', "bearer") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_token = access_token + self.token_type = token_type + self.expires_in = expires_in + self.scope = scope + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, access_token, expires_in, scope, *args, **kwargs): # noqa: E501 + """OauthAccessTokenResponseClientCredentials - a model defined in OpenAPI + + Args: + access_token (str): + expires_in (int): + scope (str): + + Keyword Args: + token_type (str): defaults to "bearer" # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + response_type (str): [optional] # noqa: E501 + """ + + token_type = kwargs.get('token_type', "bearer") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_token = access_token + self.token_type = token_type + self.expires_in = expires_in + self.scope = scope + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_response_code.py b/openapi_generated/pinterest_client/model/oauth_access_token_response_code.py index 0551bee..bea55a3 100644 --- a/openapi_generated/pinterest_client/model/oauth_access_token_response_code.py +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response_code.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,16 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.oauth_access_token_response import OauthAccessTokenResponse - from openapi_generated.pinterest_client.model.oauth_access_token_response_code import OauthAccessTokenResponseCode from openapi_generated.pinterest_client.model.oauth_access_token_response_code_all_of import OauthAccessTokenResponseCodeAllOf - from openapi_generated.pinterest_client.model.oauth_access_token_response_integration_refresh import OauthAccessTokenResponseIntegrationRefresh - from openapi_generated.pinterest_client.model.oauth_access_token_response_refresh import OauthAccessTokenResponseRefresh - globals()['OauthAccessTokenResponse'] = OauthAccessTokenResponse - globals()['OauthAccessTokenResponseCode'] = OauthAccessTokenResponseCode globals()['OauthAccessTokenResponseCodeAllOf'] = OauthAccessTokenResponseCodeAllOf - globals()['OauthAccessTokenResponseIntegrationRefresh'] = OauthAccessTokenResponseIntegrationRefresh - globals()['OauthAccessTokenResponseRefresh'] = OauthAccessTokenResponseRefresh class OauthAccessTokenResponseCode(ModelComposed): @@ -71,6 +63,7 @@ class OauthAccessTokenResponseCode(ModelComposed): ('response_type',): { 'AUTHORIZATION_CODE': "authorization_code", 'REFRESH_TOKEN': "refresh_token", + 'CLIENT_CREDENTIALS': "client_credentials", }, } @@ -100,34 +93,27 @@ def openapi_types(): """ lazy_import() return { - 'refresh_token': (str,), # noqa: E501 - 'refresh_token_expires_in': (int,), # noqa: E501 'access_token': (str,), # noqa: E501 'token_type': (str,), # noqa: E501 'expires_in': (int,), # noqa: E501 'scope': (str,), # noqa: E501 + 'refresh_token': (str,), # noqa: E501 + 'refresh_token_expires_in': (int,), # noqa: E501 'response_type': (str,), # noqa: E501 } @cached_property def discriminator(): - lazy_import() - val = { - 'authorization_code': OauthAccessTokenResponseCode, - 'integration_refresh': OauthAccessTokenResponseIntegrationRefresh, - 'refresh_token': OauthAccessTokenResponseRefresh, - } - if not val: - return None - return {'response_type': val} + return None + attribute_map = { - 'refresh_token': 'refresh_token', # noqa: E501 - 'refresh_token_expires_in': 'refresh_token_expires_in', # noqa: E501 'access_token': 'access_token', # noqa: E501 'token_type': 'token_type', # noqa: E501 'expires_in': 'expires_in', # noqa: E501 'scope': 'scope', # noqa: E501 + 'refresh_token': 'refresh_token', # noqa: E501 + 'refresh_token_expires_in': 'refresh_token_expires_in', # noqa: E501 'response_type': 'response_type', # noqa: E501 } @@ -140,12 +126,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """OauthAccessTokenResponseCode - a model defined in OpenAPI Keyword Args: - refresh_token (str): - refresh_token_expires_in (int): access_token (str): token_type (str): defaults to "bearer" # noqa: E501 expires_in (int): scope (str): + refresh_token (str): + refresh_token_expires_in (int): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -247,12 +233,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 """OauthAccessTokenResponseCode - a model defined in OpenAPI Keyword Args: - refresh_token (str): - refresh_token_expires_in (int): access_token (str): token_type (str): defaults to "bearer" # noqa: E501 expires_in (int): scope (str): + refresh_token (str): + refresh_token_expires_in (int): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_response_code_all_of.py b/openapi_generated/pinterest_client/model/oauth_access_token_response_code_all_of.py index 6d2783c..17d6379 100644 --- a/openapi_generated/pinterest_client/model/oauth_access_token_response_code_all_of.py +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response_code_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_response_everlasting_refresh.py b/openapi_generated/pinterest_client/model/oauth_access_token_response_everlasting_refresh.py new file mode 100644 index 0000000..fcd5c8e --- /dev/null +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response_everlasting_refresh.py @@ -0,0 +1,347 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.oauth_access_token_response_everlasting_refresh_all_of import OauthAccessTokenResponseEverlastingRefreshAllOf + globals()['OauthAccessTokenResponseEverlastingRefreshAllOf'] = OauthAccessTokenResponseEverlastingRefreshAllOf + + +class OauthAccessTokenResponseEverlastingRefresh(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('response_type',): { + 'AUTHORIZATION_CODE': "authorization_code", + 'REFRESH_TOKEN': "refresh_token", + 'CLIENT_CREDENTIALS': "client_credentials", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'access_token': (str,), # noqa: E501 + 'token_type': (str,), # noqa: E501 + 'expires_in': (int,), # noqa: E501 + 'scope': (str,), # noqa: E501 + 'refresh_token': (str,), # noqa: E501 + 'refresh_token_expires_in': (int,), # noqa: E501 + 'refresh_token_expires_at': (int,), # noqa: E501 + 'response_type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access_token': 'access_token', # noqa: E501 + 'token_type': 'token_type', # noqa: E501 + 'expires_in': 'expires_in', # noqa: E501 + 'scope': 'scope', # noqa: E501 + 'refresh_token': 'refresh_token', # noqa: E501 + 'refresh_token_expires_in': 'refresh_token_expires_in', # noqa: E501 + 'refresh_token_expires_at': 'refresh_token_expires_at', # noqa: E501 + 'response_type': 'response_type', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OauthAccessTokenResponseEverlastingRefresh - a model defined in OpenAPI + + Keyword Args: + access_token (str): + token_type (str): defaults to "bearer" # noqa: E501 + expires_in (int): + scope (str): + refresh_token (str): + refresh_token_expires_in (int): + refresh_token_expires_at (int): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + response_type (str): [optional] # noqa: E501 + """ + + token_type = kwargs.get('token_type', "bearer") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """OauthAccessTokenResponseEverlastingRefresh - a model defined in OpenAPI + + Keyword Args: + access_token (str): + token_type (str): defaults to "bearer" # noqa: E501 + expires_in (int): + scope (str): + refresh_token (str): + refresh_token_expires_in (int): + refresh_token_expires_at (int): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + response_type (str): [optional] # noqa: E501 + """ + + token_type = kwargs.get('token_type', "bearer") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_response_everlasting_refresh_all_of.py b/openapi_generated/pinterest_client/model/oauth_access_token_response_everlasting_refresh_all_of.py new file mode 100644 index 0000000..d7e5c0c --- /dev/null +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response_everlasting_refresh_all_of.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class OauthAccessTokenResponseEverlastingRefreshAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'refresh_token': (str,), # noqa: E501 + 'refresh_token_expires_in': (int,), # noqa: E501 + 'refresh_token_expires_at': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'refresh_token': 'refresh_token', # noqa: E501 + 'refresh_token_expires_in': 'refresh_token_expires_in', # noqa: E501 + 'refresh_token_expires_at': 'refresh_token_expires_at', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, refresh_token, refresh_token_expires_in, refresh_token_expires_at, *args, **kwargs): # noqa: E501 + """OauthAccessTokenResponseEverlastingRefreshAllOf - a model defined in OpenAPI + + Args: + refresh_token (str): + refresh_token_expires_in (int): + refresh_token_expires_at (int): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.refresh_token = refresh_token + self.refresh_token_expires_in = refresh_token_expires_in + self.refresh_token_expires_at = refresh_token_expires_at + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, refresh_token, refresh_token_expires_in, refresh_token_expires_at, *args, **kwargs): # noqa: E501 + """OauthAccessTokenResponseEverlastingRefreshAllOf - a model defined in OpenAPI + + Args: + refresh_token (str): + refresh_token_expires_in (int): + refresh_token_expires_at (int): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.refresh_token = refresh_token + self.refresh_token_expires_in = refresh_token_expires_in + self.refresh_token_expires_at = refresh_token_expires_at + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_response_integration_refresh.py b/openapi_generated/pinterest_client/model/oauth_access_token_response_integration_refresh.py index 0ed0497..c729ecd 100644 --- a/openapi_generated/pinterest_client/model/oauth_access_token_response_integration_refresh.py +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response_integration_refresh.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,16 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.oauth_access_token_response import OauthAccessTokenResponse - from openapi_generated.pinterest_client.model.oauth_access_token_response_code import OauthAccessTokenResponseCode from openapi_generated.pinterest_client.model.oauth_access_token_response_code_all_of import OauthAccessTokenResponseCodeAllOf - from openapi_generated.pinterest_client.model.oauth_access_token_response_integration_refresh import OauthAccessTokenResponseIntegrationRefresh - from openapi_generated.pinterest_client.model.oauth_access_token_response_refresh import OauthAccessTokenResponseRefresh - globals()['OauthAccessTokenResponse'] = OauthAccessTokenResponse - globals()['OauthAccessTokenResponseCode'] = OauthAccessTokenResponseCode globals()['OauthAccessTokenResponseCodeAllOf'] = OauthAccessTokenResponseCodeAllOf - globals()['OauthAccessTokenResponseIntegrationRefresh'] = OauthAccessTokenResponseIntegrationRefresh - globals()['OauthAccessTokenResponseRefresh'] = OauthAccessTokenResponseRefresh class OauthAccessTokenResponseIntegrationRefresh(ModelComposed): @@ -71,6 +63,7 @@ class OauthAccessTokenResponseIntegrationRefresh(ModelComposed): ('response_type',): { 'AUTHORIZATION_CODE': "authorization_code", 'REFRESH_TOKEN': "refresh_token", + 'CLIENT_CREDENTIALS': "client_credentials", }, } @@ -100,34 +93,27 @@ def openapi_types(): """ lazy_import() return { - 'refresh_token': (str,), # noqa: E501 - 'refresh_token_expires_in': (int,), # noqa: E501 'access_token': (str,), # noqa: E501 'token_type': (str,), # noqa: E501 'expires_in': (int,), # noqa: E501 'scope': (str,), # noqa: E501 + 'refresh_token': (str,), # noqa: E501 + 'refresh_token_expires_in': (int,), # noqa: E501 'response_type': (str,), # noqa: E501 } @cached_property def discriminator(): - lazy_import() - val = { - 'authorization_code': OauthAccessTokenResponseCode, - 'integration_refresh': OauthAccessTokenResponseIntegrationRefresh, - 'refresh_token': OauthAccessTokenResponseRefresh, - } - if not val: - return None - return {'response_type': val} + return None + attribute_map = { - 'refresh_token': 'refresh_token', # noqa: E501 - 'refresh_token_expires_in': 'refresh_token_expires_in', # noqa: E501 'access_token': 'access_token', # noqa: E501 'token_type': 'token_type', # noqa: E501 'expires_in': 'expires_in', # noqa: E501 'scope': 'scope', # noqa: E501 + 'refresh_token': 'refresh_token', # noqa: E501 + 'refresh_token_expires_in': 'refresh_token_expires_in', # noqa: E501 'response_type': 'response_type', # noqa: E501 } @@ -140,12 +126,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """OauthAccessTokenResponseIntegrationRefresh - a model defined in OpenAPI Keyword Args: - refresh_token (str): - refresh_token_expires_in (int): access_token (str): token_type (str): defaults to "bearer" # noqa: E501 expires_in (int): scope (str): + refresh_token (str): + refresh_token_expires_in (int): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -247,12 +233,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 """OauthAccessTokenResponseIntegrationRefresh - a model defined in OpenAPI Keyword Args: - refresh_token (str): - refresh_token_expires_in (int): access_token (str): token_type (str): defaults to "bearer" # noqa: E501 expires_in (int): scope (str): + refresh_token (str): + refresh_token_expires_in (int): _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_response_refresh.py b/openapi_generated/pinterest_client/model/oauth_access_token_response_refresh.py index 0cf2b25..4a36cc3 100644 --- a/openapi_generated/pinterest_client/model/oauth_access_token_response_refresh.py +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response_refresh.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,14 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.oauth_access_token_response import OauthAccessTokenResponse - from openapi_generated.pinterest_client.model.oauth_access_token_response_code import OauthAccessTokenResponseCode - from openapi_generated.pinterest_client.model.oauth_access_token_response_integration_refresh import OauthAccessTokenResponseIntegrationRefresh - from openapi_generated.pinterest_client.model.oauth_access_token_response_refresh import OauthAccessTokenResponseRefresh - globals()['OauthAccessTokenResponse'] = OauthAccessTokenResponse - globals()['OauthAccessTokenResponseCode'] = OauthAccessTokenResponseCode - globals()['OauthAccessTokenResponseIntegrationRefresh'] = OauthAccessTokenResponseIntegrationRefresh - globals()['OauthAccessTokenResponseRefresh'] = OauthAccessTokenResponseRefresh + from openapi_generated.pinterest_client.model.oauth_access_token_response_refresh_all_of import OauthAccessTokenResponseRefreshAllOf + globals()['OauthAccessTokenResponseRefreshAllOf'] = OauthAccessTokenResponseRefreshAllOf class OauthAccessTokenResponseRefresh(ModelComposed): @@ -69,6 +63,7 @@ class OauthAccessTokenResponseRefresh(ModelComposed): ('response_type',): { 'AUTHORIZATION_CODE': "authorization_code", 'REFRESH_TOKEN': "refresh_token", + 'CLIENT_CREDENTIALS': "client_credentials", }, } @@ -107,15 +102,8 @@ def openapi_types(): @cached_property def discriminator(): - lazy_import() - val = { - 'authorization_code': OauthAccessTokenResponseCode, - 'integration_refresh': OauthAccessTokenResponseIntegrationRefresh, - 'refresh_token': OauthAccessTokenResponseRefresh, - } - if not val: - return None - return {'response_type': val} + return None + attribute_map = { 'access_token': 'access_token', # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/oauth_access_token_response_refresh_all_of.py b/openapi_generated/pinterest_client/model/oauth_access_token_response_refresh_all_of.py new file mode 100644 index 0000000..249822a --- /dev/null +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response_refresh_all_of.py @@ -0,0 +1,291 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class OauthAccessTokenResponseRefreshAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('response_type',): { + 'AUTHORIZATION_CODE': "authorization_code", + 'REFRESH_TOKEN': "refresh_token", + 'CLIENT_CREDENTIALS': "client_credentials", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'access_token': (str,), # noqa: E501 + 'token_type': (str,), # noqa: E501 + 'expires_in': (int,), # noqa: E501 + 'scope': (str,), # noqa: E501 + 'response_type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access_token': 'access_token', # noqa: E501 + 'token_type': 'token_type', # noqa: E501 + 'expires_in': 'expires_in', # noqa: E501 + 'scope': 'scope', # noqa: E501 + 'response_type': 'response_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, access_token, expires_in, scope, *args, **kwargs): # noqa: E501 + """OauthAccessTokenResponseRefreshAllOf - a model defined in OpenAPI + + Args: + access_token (str): + expires_in (int): + scope (str): + + Keyword Args: + token_type (str): defaults to "bearer" # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + response_type (str): [optional] # noqa: E501 + """ + + token_type = kwargs.get('token_type', "bearer") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_token = access_token + self.token_type = token_type + self.expires_in = expires_in + self.scope = scope + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, access_token, expires_in, scope, *args, **kwargs): # noqa: E501 + """OauthAccessTokenResponseRefreshAllOf - a model defined in OpenAPI + + Args: + access_token (str): + expires_in (int): + scope (str): + + Keyword Args: + token_type (str): defaults to "bearer" # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + response_type (str): [optional] # noqa: E501 + """ + + token_type = kwargs.get('token_type', "bearer") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_token = access_token + self.token_type = token_type + self.expires_in = expires_in + self.scope = scope + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/objective_type.py b/openapi_generated/pinterest_client/model/objective_type.py index cbf6114..741c5b9 100644 --- a/openapi_generated/pinterest_client/model/objective_type.py +++ b/openapi_generated/pinterest_client/model/objective_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -59,6 +59,7 @@ class ObjectiveType(ModelSimple): 'WEB_CONVERSION': "WEB_CONVERSION", 'CATALOG_SALES': "CATALOG_SALES", 'WEB_SESSIONS': "WEB_SESSIONS", + 'VIDEO_COMPLETION': "VIDEO_COMPLETION", }, } @@ -110,10 +111,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Campaign objective type. [\"WEB_SESSIONS\"] in BETA.., must be one of ["AWARENESS", "CONSIDERATION", "VIDEO_VIEW", "WEB_CONVERSION", "CATALOG_SALES", "WEB_SESSIONS", ] # noqa: E501 + args[0] (str): Campaign objective type. If set as one of [\"AWARENESS\", \"CONSIDERATION\", \"WEB_CONVERSION\", \"CATALOG_SALES\", \"VIDEO_COMPLETION\"] the campaign is considered as a Campaign Budget Optimization (CBO) campaign, meaning budget needs to be set at the campaign level rather than at the ad group level. [\"WEB_SESSIONS\"] is DEPRECATED. For update, only draft campaigns may update objective type.., must be one of ["AWARENESS", "CONSIDERATION", "VIDEO_VIEW", "WEB_CONVERSION", "CATALOG_SALES", "WEB_SESSIONS", "VIDEO_COMPLETION", ] # noqa: E501 Keyword Args: - value (str): Campaign objective type. [\"WEB_SESSIONS\"] in BETA.., must be one of ["AWARENESS", "CONSIDERATION", "VIDEO_VIEW", "WEB_CONVERSION", "CATALOG_SALES", "WEB_SESSIONS", ] # noqa: E501 + value (str): Campaign objective type. If set as one of [\"AWARENESS\", \"CONSIDERATION\", \"WEB_CONVERSION\", \"CATALOG_SALES\", \"VIDEO_COMPLETION\"] the campaign is considered as a Campaign Budget Optimization (CBO) campaign, meaning budget needs to be set at the campaign level rather than at the ad group level. [\"WEB_SESSIONS\"] is DEPRECATED. For update, only draft campaigns may update objective type.., must be one of ["AWARENESS", "CONSIDERATION", "VIDEO_VIEW", "WEB_CONVERSION", "CATALOG_SALES", "WEB_SESSIONS", "VIDEO_COMPLETION", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -200,10 +201,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Campaign objective type. [\"WEB_SESSIONS\"] in BETA.., must be one of ["AWARENESS", "CONSIDERATION", "VIDEO_VIEW", "WEB_CONVERSION", "CATALOG_SALES", "WEB_SESSIONS", ] # noqa: E501 + args[0] (str): Campaign objective type. If set as one of [\"AWARENESS\", \"CONSIDERATION\", \"WEB_CONVERSION\", \"CATALOG_SALES\", \"VIDEO_COMPLETION\"] the campaign is considered as a Campaign Budget Optimization (CBO) campaign, meaning budget needs to be set at the campaign level rather than at the ad group level. [\"WEB_SESSIONS\"] is DEPRECATED. For update, only draft campaigns may update objective type.., must be one of ["AWARENESS", "CONSIDERATION", "VIDEO_VIEW", "WEB_CONVERSION", "CATALOG_SALES", "WEB_SESSIONS", "VIDEO_COMPLETION", ] # noqa: E501 Keyword Args: - value (str): Campaign objective type. [\"WEB_SESSIONS\"] in BETA.., must be one of ["AWARENESS", "CONSIDERATION", "VIDEO_VIEW", "WEB_CONVERSION", "CATALOG_SALES", "WEB_SESSIONS", ] # noqa: E501 + value (str): Campaign objective type. If set as one of [\"AWARENESS\", \"CONSIDERATION\", \"WEB_CONVERSION\", \"CATALOG_SALES\", \"VIDEO_COMPLETION\"] the campaign is considered as a Campaign Budget Optimization (CBO) campaign, meaning budget needs to be set at the campaign level rather than at the ad group level. [\"WEB_SESSIONS\"] is DEPRECATED. For update, only draft campaigns may update objective type.., must be one of ["AWARENESS", "CONSIDERATION", "VIDEO_VIEW", "WEB_CONVERSION", "CATALOG_SALES", "WEB_SESSIONS", "VIDEO_COMPLETION", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/operation_type.py b/openapi_generated/pinterest_client/model/operation_type.py new file mode 100644 index 0000000..6966f80 --- /dev/null +++ b/openapi_generated/pinterest_client/model/operation_type.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class OperationType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'SHARE': "SHARE", + 'REVOKE': "REVOKE", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """OperationType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Operation type to share a specific audience or revoke access to a previously shared audience., must be one of ["SHARE", "REVOKE", ] # noqa: E501 + + Keyword Args: + value (str): Operation type to share a specific audience or revoke access to a previously shared audience., must be one of ["SHARE", "REVOKE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """OperationType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Operation type to share a specific audience or revoke access to a previously shared audience., must be one of ["SHARE", "REVOKE", ] # noqa: E501 + + Keyword Args: + value (str): Operation type to share a specific audience or revoke access to a previously shared audience., must be one of ["SHARE", "REVOKE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/optimization_goal_metadata.py b/openapi_generated/pinterest_client/model/optimization_goal_metadata.py index 1eb2880..466fd82 100644 --- a/openapi_generated/pinterest_client/model/optimization_goal_metadata.py +++ b/openapi_generated/pinterest_client/model/optimization_goal_metadata.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/optimization_goal_metadata_conversion_tag_v3_goal_metadata.py b/openapi_generated/pinterest_client/model/optimization_goal_metadata_conversion_tag_v3_goal_metadata.py index 0741528..97bad2e 100644 --- a/openapi_generated/pinterest_client/model/optimization_goal_metadata_conversion_tag_v3_goal_metadata.py +++ b/openapi_generated/pinterest_client/model/optimization_goal_metadata_conversion_tag_v3_goal_metadata.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -183,7 +183,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 conversion_event (str): [optional] # noqa: E501 conversion_tag_id (str): [optional] # noqa: E501 cpa_goal_value_in_micro_currency (str): [optional] # noqa: E501 - is_roas_optimized (bool, none_type): Ad group is ROAS optimized. [optional] # noqa: E501 + is_roas_optimized (bool, none_type): ROAS optimization is not supported. [optional] # noqa: E501 learning_mode_type (str, none_type): Conversion learning model type. [optional] # noqa: E501 """ @@ -270,7 +270,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 conversion_event (str): [optional] # noqa: E501 conversion_tag_id (str): [optional] # noqa: E501 cpa_goal_value_in_micro_currency (str): [optional] # noqa: E501 - is_roas_optimized (bool, none_type): Ad group is ROAS optimized. [optional] # noqa: E501 + is_roas_optimized (bool, none_type): ROAS optimization is not supported. [optional] # noqa: E501 learning_mode_type (str, none_type): Conversion learning model type. [optional] # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/optimization_goal_metadata_conversion_tag_v3_goal_metadata_attribution_windows.py b/openapi_generated/pinterest_client/model/optimization_goal_metadata_conversion_tag_v3_goal_metadata_attribution_windows.py index 8c99630..a9498ba 100644 --- a/openapi_generated/pinterest_client/model/optimization_goal_metadata_conversion_tag_v3_goal_metadata_attribution_windows.py +++ b/openapi_generated/pinterest_client/model/optimization_goal_metadata_conversion_tag_v3_goal_metadata_attribution_windows.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/optimization_goal_metadata_frequency_goal_metadata.py b/openapi_generated/pinterest_client/model/optimization_goal_metadata_frequency_goal_metadata.py index 6c5155e..73c2274 100644 --- a/openapi_generated/pinterest_client/model/optimization_goal_metadata_frequency_goal_metadata.py +++ b/openapi_generated/pinterest_client/model/optimization_goal_metadata_frequency_goal_metadata.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -62,6 +62,7 @@ class OptimizationGoalMetadataFrequencyGoalMetadata(ModelNormal): 'SEVEN_DAY': "SEVEN_DAY", 'TWENTY_MINUTE': "TWENTY_MINUTE", 'TEN_MINUTE': "TEN_MINUTE", + 'TWENTY_FOUR_HOUR': "TWENTY_FOUR_HOUR", }, } diff --git a/openapi_generated/pinterest_client/model/optimization_goal_metadata_scrollup_goal_metadata.py b/openapi_generated/pinterest_client/model/optimization_goal_metadata_scrollup_goal_metadata.py index ffe9def..c26a408 100644 --- a/openapi_generated/pinterest_client/model/optimization_goal_metadata_scrollup_goal_metadata.py +++ b/openapi_generated/pinterest_client/model/optimization_goal_metadata_scrollup_goal_metadata.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/order_line.py b/openapi_generated/pinterest_client/model/order_line.py index e21e32e..c93ea84 100644 --- a/openapi_generated/pinterest_client/model/order_line.py +++ b/openapi_generated/pinterest_client/model/order_line.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/order_line_all_of.py b/openapi_generated/pinterest_client/model/order_line_all_of.py index 58b6262..cafa5f7 100644 --- a/openapi_generated/pinterest_client/model/order_line_all_of.py +++ b/openapi_generated/pinterest_client/model/order_line_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/order_line_error.py b/openapi_generated/pinterest_client/model/order_line_error.py index c941ad3..58760c4 100644 --- a/openapi_generated/pinterest_client/model/order_line_error.py +++ b/openapi_generated/pinterest_client/model/order_line_error.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/order_line_paid_type.py b/openapi_generated/pinterest_client/model/order_line_paid_type.py index 342f0e6..b7e87df 100644 --- a/openapi_generated/pinterest_client/model/order_line_paid_type.py +++ b/openapi_generated/pinterest_client/model/order_line_paid_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/order_line_response.py b/openapi_generated/pinterest_client/model/order_line_response.py index 6bf8660..4974615 100644 --- a/openapi_generated/pinterest_client/model/order_line_response.py +++ b/openapi_generated/pinterest_client/model/order_line_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/order_line_single_response.py b/openapi_generated/pinterest_client/model/order_line_single_response.py index 4cc885e..2847c2f 100644 --- a/openapi_generated/pinterest_client/model/order_line_single_response.py +++ b/openapi_generated/pinterest_client/model/order_line_single_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/order_line_status.py b/openapi_generated/pinterest_client/model/order_line_status.py index f2612bc..138018f 100644 --- a/openapi_generated/pinterest_client/model/order_line_status.py +++ b/openapi_generated/pinterest_client/model/order_line_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/order_lines.py b/openapi_generated/pinterest_client/model/order_lines.py index 8c47a18..d5c4c74 100644 --- a/openapi_generated/pinterest_client/model/order_lines.py +++ b/openapi_generated/pinterest_client/model/order_lines.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/order_lines_array_response.py b/openapi_generated/pinterest_client/model/order_lines_array_response.py index 0c9bbb6..7f08680 100644 --- a/openapi_generated/pinterest_client/model/order_lines_array_response.py +++ b/openapi_generated/pinterest_client/model/order_lines_array_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pacing_delivery_type.py b/openapi_generated/pinterest_client/model/pacing_delivery_type.py index 495e533..9f895b8 100644 --- a/openapi_generated/pinterest_client/model/pacing_delivery_type.py +++ b/openapi_generated/pinterest_client/model/pacing_delivery_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/paginated.py b/openapi_generated/pinterest_client/model/paginated.py index ee78356..76cedf8 100644 --- a/openapi_generated/pinterest_client/model/paginated.py +++ b/openapi_generated/pinterest_client/model/paginated.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/partner_type.py b/openapi_generated/pinterest_client/model/partner_type.py new file mode 100644 index 0000000..74cc0da --- /dev/null +++ b/openapi_generated/pinterest_client/model/partner_type.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class PartnerType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'INTERNAL': "INTERNAL", + 'EXTERNAL': "EXTERNAL", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PartnerType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["INTERNAL", "EXTERNAL", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["INTERNAL", "EXTERNAL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PartnerType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["INTERNAL", "EXTERNAL", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["INTERNAL", "EXTERNAL", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/permissions.py b/openapi_generated/pinterest_client/model/permissions.py new file mode 100644 index 0000000..3530af1 --- /dev/null +++ b/openapi_generated/pinterest_client/model/permissions.py @@ -0,0 +1,288 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class Permissions(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'ADMIN': "ADMIN", + 'ANALYST': "ANALYST", + 'FINANCE_MANAGER': "FINANCE_MANAGER", + 'AUDIENCE_MANAGER': "AUDIENCE_MANAGER", + 'CAMPAIGN_MANAGER': "CAMPAIGN_MANAGER", + 'CATALOGS_MANAGER': "CATALOGS_MANAGER", + 'PROFILE_PUBLISHER': "PROFILE_PUBLISHER", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """Permissions - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["ADMIN", "ANALYST", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "PROFILE_PUBLISHER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["ADMIN", "ANALYST", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "PROFILE_PUBLISHER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """Permissions - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["ADMIN", "ANALYST", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "PROFILE_PUBLISHER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["ADMIN", "ANALYST", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "PROFILE_PUBLISHER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/permissions_response.py b/openapi_generated/pinterest_client/model/permissions_response.py new file mode 100644 index 0000000..34c5bb9 --- /dev/null +++ b/openapi_generated/pinterest_client/model/permissions_response.py @@ -0,0 +1,279 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class PermissionsResponse(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': ([str],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PermissionsResponse - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): Permission levels member or partner has on an asset.. # noqa: E501 + + Keyword Args: + value ([str]): Permission levels member or partner has on an asset.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PermissionsResponse - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): Permission levels member or partner has on an asset.. # noqa: E501 + + Keyword Args: + value ([str]): Permission levels member or partner has on an asset.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/permissions_with_owner.py b/openapi_generated/pinterest_client/model/permissions_with_owner.py new file mode 100644 index 0000000..650d329 --- /dev/null +++ b/openapi_generated/pinterest_client/model/permissions_with_owner.py @@ -0,0 +1,290 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class PermissionsWithOwner(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'ADMIN': "ADMIN", + 'ANALYST': "ANALYST", + 'FINANCE_MANAGER': "FINANCE_MANAGER", + 'AUDIENCE_MANAGER': "AUDIENCE_MANAGER", + 'CAMPAIGN_MANAGER': "CAMPAIGN_MANAGER", + 'CATALOGS_MANAGER': "CATALOGS_MANAGER", + 'CATALOGS_VIEWER': "CATALOGS_VIEWER", + 'PROFILE_PUBLISHER': "PROFILE_PUBLISHER", + 'OWNER': "OWNER", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PermissionsWithOwner - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["ADMIN", "ANALYST", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "CATALOGS_VIEWER", "PROFILE_PUBLISHER", "OWNER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["ADMIN", "ANALYST", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "CATALOGS_VIEWER", "PROFILE_PUBLISHER", "OWNER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PermissionsWithOwner - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["ADMIN", "ANALYST", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "CATALOGS_VIEWER", "PROFILE_PUBLISHER", "OWNER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["ADMIN", "ANALYST", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "CATALOGS_VIEWER", "PROFILE_PUBLISHER", "OWNER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/pin.py b/openapi_generated/pinterest_client/model/pin.py index 9232692..e8dfc21 100644 --- a/openapi_generated/pinterest_client/model/pin.py +++ b/openapi_generated/pinterest_client/model/pin.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -138,6 +138,7 @@ def openapi_types(): 'is_standard': (bool,), # noqa: E501 'has_been_promoted': (bool,), # noqa: E501 'note': (str, none_type,), # noqa: E501 + 'pin_metrics': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 } @cached_property @@ -164,6 +165,7 @@ def discriminator(): 'is_standard': 'is_standard', # noqa: E501 'has_been_promoted': 'has_been_promoted', # noqa: E501 'note': 'note', # noqa: E501 + 'pin_metrics': 'pin_metrics', # noqa: E501 } read_only_vars = { @@ -229,9 +231,10 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 media ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 media_source ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 parent_pin_id (str, none_type): The source pin id if this pin was saved from another pin. Learn more.. [optional] # noqa: E501 - is_standard (bool): Whether the Pin is standard or not. See documentation on Changes to Pin creation for more information.. [optional] # noqa: E501 + is_standard (bool): Whether the Pin is standard or not. See documentation on Changes to Pin creation for more information.. [optional] # noqa: E501 has_been_promoted (bool): Whether the Pin has been promoted or not.. [optional] # noqa: E501 note (str, none_type): Private note for this Pin. Learn more.. [optional] # noqa: E501 + pin_metrics ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Pin metrics with associated time intervals if any.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -328,9 +331,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 media ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 media_source ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 parent_pin_id (str, none_type): The source pin id if this pin was saved from another pin. Learn more.. [optional] # noqa: E501 - is_standard (bool): Whether the Pin is standard or not. See documentation on Changes to Pin creation for more information.. [optional] # noqa: E501 + is_standard (bool): Whether the Pin is standard or not. See documentation on Changes to Pin creation for more information.. [optional] # noqa: E501 has_been_promoted (bool): Whether the Pin has been promoted or not.. [optional] # noqa: E501 note (str, none_type): Private note for this Pin. Learn more.. [optional] # noqa: E501 + pin_metrics ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Pin metrics with associated time intervals if any.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/pin_analytics_metrics_response.py b/openapi_generated/pinterest_client/model/pin_analytics_metrics_response.py index be4891e..b64b298 100644 --- a/openapi_generated/pinterest_client/model/pin_analytics_metrics_response.py +++ b/openapi_generated/pinterest_client/model/pin_analytics_metrics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.analytics_daily_metrics import AnalyticsDailyMetrics - globals()['AnalyticsDailyMetrics'] = AnalyticsDailyMetrics + from openapi_generated.pinterest_client.model.pin_analytics_metrics_response_daily_metrics import PinAnalyticsMetricsResponseDailyMetrics + globals()['PinAnalyticsMetricsResponseDailyMetrics'] = PinAnalyticsMetricsResponseDailyMetrics class PinAnalyticsMetricsResponse(ModelNormal): @@ -89,7 +89,7 @@ def openapi_types(): lazy_import() return { 'lifetime_metrics': ({str: (int,)},), # noqa: E501 - 'daily_metrics': ([AnalyticsDailyMetrics],), # noqa: E501 + 'daily_metrics': ([PinAnalyticsMetricsResponseDailyMetrics],), # noqa: E501 'summary_metrics': ({str: (float,)},), # noqa: E501 } @@ -146,7 +146,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) lifetime_metrics ({str: (int,)}): The lifetime metric name and value.. [optional] # noqa: E501 - daily_metrics ([AnalyticsDailyMetrics]): Array with the requested daily metric records. [optional] # noqa: E501 + daily_metrics ([PinAnalyticsMetricsResponseDailyMetrics]): Array with the requested daily metric records. [optional] # noqa: E501 summary_metrics ({str: (float,)}): The metric name and value over the requested period for each requested metric. [optional] # noqa: E501 """ @@ -230,7 +230,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) lifetime_metrics ({str: (int,)}): The lifetime metric name and value.. [optional] # noqa: E501 - daily_metrics ([AnalyticsDailyMetrics]): Array with the requested daily metric records. [optional] # noqa: E501 + daily_metrics ([PinAnalyticsMetricsResponseDailyMetrics]): Array with the requested daily metric records. [optional] # noqa: E501 summary_metrics ({str: (float,)}): The metric name and value over the requested period for each requested metric. [optional] # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/pin_analytics_metrics_response_daily_metrics.py b/openapi_generated/pinterest_client/model/pin_analytics_metrics_response_daily_metrics.py new file mode 100644 index 0000000..d0958a5 --- /dev/null +++ b/openapi_generated/pinterest_client/model/pin_analytics_metrics_response_daily_metrics.py @@ -0,0 +1,270 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.data_status import DataStatus + globals()['DataStatus'] = DataStatus + + +class PinAnalyticsMetricsResponseDailyMetrics(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data_status': (DataStatus,), # noqa: E501 + 'date': (str,), # noqa: E501 + 'metrics': ({str: (float,)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data_status': 'data_status', # noqa: E501 + 'date': 'date', # noqa: E501 + 'metrics': 'metrics', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PinAnalyticsMetricsResponseDailyMetrics - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data_status (DataStatus): [optional] # noqa: E501 + date (str): Metrics date (UTC): YYYY-MM-DD.. [optional] # noqa: E501 + metrics ({str: (float,)}): The metric name and daily value for each requested metric. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PinAnalyticsMetricsResponseDailyMetrics - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data_status (DataStatus): [optional] # noqa: E501 + date (str): Metrics date (UTC): YYYY-MM-DD.. [optional] # noqa: E501 + metrics ({str: (float,)}): The metric name and daily value for each requested metric. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/pin_analytics_response.py b/openapi_generated/pinterest_client/model/pin_analytics_response.py index fc388a1..eb88499 100644 --- a/openapi_generated/pinterest_client/model/pin_analytics_response.py +++ b/openapi_generated/pinterest_client/model/pin_analytics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_create.py b/openapi_generated/pinterest_client/model/pin_create.py index cd0b89c..31fb965 100644 --- a/openapi_generated/pinterest_client/model/pin_create.py +++ b/openapi_generated/pinterest_client/model/pin_create.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -79,7 +79,7 @@ class PinCreate(ModelNormal): 'max_length': 100, }, ('description',): { - 'max_length': 500, + 'max_length': 800, }, ('alt_text',): { 'max_length': 500, diff --git a/openapi_generated/pinterest_client/model/pin_media.py b/openapi_generated/pinterest_client/model/pin_media.py index 767fd5f..d3a8187 100644 --- a/openapi_generated/pinterest_client/model/pin_media.py +++ b/openapi_generated/pinterest_client/model/pin_media.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_metadata.py b/openapi_generated/pinterest_client/model/pin_media_metadata.py index d1320ac..0d9ae72 100644 --- a/openapi_generated/pinterest_client/model/pin_media_metadata.py +++ b/openapi_generated/pinterest_client/model/pin_media_metadata.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,11 +31,11 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.image_details import ImageDetails from openapi_generated.pinterest_client.model.image_metadata import ImageMetadata + from openapi_generated.pinterest_client.model.image_metadata_images import ImageMetadataImages from openapi_generated.pinterest_client.model.video_metadata import VideoMetadata - globals()['ImageDetails'] = ImageDetails globals()['ImageMetadata'] = ImageMetadata + globals()['ImageMetadataImages'] = ImageMetadataImages globals()['VideoMetadata'] = VideoMetadata @@ -96,8 +96,9 @@ def openapi_types(): 'title': (str, none_type,), # noqa: E501 'description': (str, none_type,), # noqa: E501 'link': (str, none_type,), # noqa: E501 - 'images': ({str: (ImageDetails,)},), # noqa: E501 + 'images': (ImageMetadataImages,), # noqa: E501 'cover_image_url': (str,), # noqa: E501 + 'video_url': (str, none_type,), # noqa: E501 'duration': (float,), # noqa: E501 'height': (int,), # noqa: E501 'width': (int,), # noqa: E501 @@ -115,6 +116,7 @@ def discriminator(): 'link': 'link', # noqa: E501 'images': 'images', # noqa: E501 'cover_image_url': 'cover_image_url', # noqa: E501 + 'video_url': 'video_url', # noqa: E501 'duration': 'duration', # noqa: E501 'height': 'height', # noqa: E501 'width': 'width', # noqa: E501 @@ -163,8 +165,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 title (str, none_type): [optional] # noqa: E501 description (str, none_type): [optional] # noqa: E501 link (str, none_type): [optional] # noqa: E501 - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 cover_image_url (str): [optional] # noqa: E501 + video_url (str, none_type): Video url (720p).

    Note: This field is limited and not available to all apps.. [optional] # noqa: E501 duration (float): Duration (in milliseconds). [optional] # noqa: E501 height (int): Height (in pixels). [optional] # noqa: E501 width (int): Width (in pixels). [optional] # noqa: E501 @@ -271,8 +274,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 title (str, none_type): [optional] # noqa: E501 description (str, none_type): [optional] # noqa: E501 link (str, none_type): [optional] # noqa: E501 - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 cover_image_url (str): [optional] # noqa: E501 + video_url (str, none_type): Video url (720p).

    Note: This field is limited and not available to all apps.. [optional] # noqa: E501 duration (float): Duration (in milliseconds). [optional] # noqa: E501 height (int): Height (in pixels). [optional] # noqa: E501 width (int): Width (in pixels). [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/pin_media_source.py b/openapi_generated/pinterest_client/model/pin_media_source.py index 13e121d..7b53723 100644 --- a/openapi_generated/pinterest_client/model/pin_media_source.py +++ b/openapi_generated/pinterest_client/model/pin_media_source.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -134,6 +134,7 @@ def openapi_types(): 'cover_image_content_type': (str,), # noqa: E501 'cover_image_data': (str,), # noqa: E501 'index': (int,), # noqa: E501 + 'is_affiliate_link': (bool,), # noqa: E501 'content_type': (str,), # noqa: E501 'data': (str,), # noqa: E501 'url': (str,), # noqa: E501 @@ -169,6 +170,7 @@ def discriminator(): 'cover_image_content_type': 'cover_image_content_type', # noqa: E501 'cover_image_data': 'cover_image_data', # noqa: E501 'index': 'index', # noqa: E501 + 'is_affiliate_link': 'is_affiliate_link', # noqa: E501 'content_type': 'content_type', # noqa: E501 'data': 'data', # noqa: E501 'url': 'url', # noqa: E501 @@ -221,6 +223,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 cover_image_content_type (str): Content type for cover image Base64.. [optional] # noqa: E501 cover_image_data (str): Cover image Base64.. [optional] # noqa: E501 index (int): [optional] # noqa: E501 + is_affiliate_link (bool): This is an affiliate link or sponsored product. The FTC requires disclosure for paid partnerships and affiliate products.. [optional] if omitted the server will use the default value of False # noqa: E501 content_type (str): [optional] # noqa: E501 data (str): [optional] # noqa: E501 url (str): [optional] # noqa: E501 @@ -332,6 +335,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 cover_image_content_type (str): Content type for cover image Base64.. [optional] # noqa: E501 cover_image_data (str): Cover image Base64.. [optional] # noqa: E501 index (int): [optional] # noqa: E501 + is_affiliate_link (bool): This is an affiliate link or sponsored product. The FTC requires disclosure for paid partnerships and affiliate products.. [optional] if omitted the server will use the default value of False # noqa: E501 content_type (str): [optional] # noqa: E501 data (str): [optional] # noqa: E501 url (str): [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/pin_media_source_image_base64.py b/openapi_generated/pinterest_client/model/pin_media_source_image_base64.py index 71791e1..0b1cf53 100644 --- a/openapi_generated/pinterest_client/model/pin_media_source_image_base64.py +++ b/openapi_generated/pinterest_client/model/pin_media_source_image_base64.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_source_image_url.py b/openapi_generated/pinterest_client/model/pin_media_source_image_url.py index 08581ed..98cfb24 100644 --- a/openapi_generated/pinterest_client/model/pin_media_source_image_url.py +++ b/openapi_generated/pinterest_client/model/pin_media_source_image_url.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_source_images_base64.py b/openapi_generated/pinterest_client/model/pin_media_source_images_base64.py index d16ec74..73815f9 100644 --- a/openapi_generated/pinterest_client/model/pin_media_source_images_base64.py +++ b/openapi_generated/pinterest_client/model/pin_media_source_images_base64.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_source_images_base64_items.py b/openapi_generated/pinterest_client/model/pin_media_source_images_base64_items.py index 0719650..febfcb5 100644 --- a/openapi_generated/pinterest_client/model/pin_media_source_images_base64_items.py +++ b/openapi_generated/pinterest_client/model/pin_media_source_images_base64_items.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_source_images_url.py b/openapi_generated/pinterest_client/model/pin_media_source_images_url.py index eb4be14..442d1d2 100644 --- a/openapi_generated/pinterest_client/model/pin_media_source_images_url.py +++ b/openapi_generated/pinterest_client/model/pin_media_source_images_url.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_source_images_url_items.py b/openapi_generated/pinterest_client/model/pin_media_source_images_url_items.py index b71c044..4bad143 100644 --- a/openapi_generated/pinterest_client/model/pin_media_source_images_url_items.py +++ b/openapi_generated/pinterest_client/model/pin_media_source_images_url_items.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_source_pin_url.py b/openapi_generated/pinterest_client/model/pin_media_source_pin_url.py index 32d178e..37ad6f8 100644 --- a/openapi_generated/pinterest_client/model/pin_media_source_pin_url.py +++ b/openapi_generated/pinterest_client/model/pin_media_source_pin_url.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -86,6 +86,7 @@ def openapi_types(): """ return { 'source_type': (str,), # noqa: E501 + 'is_affiliate_link': (bool,), # noqa: E501 } @cached_property @@ -95,6 +96,7 @@ def discriminator(): attribute_map = { 'source_type': 'source_type', # noqa: E501 + 'is_affiliate_link': 'is_affiliate_link', # noqa: E501 } read_only_vars = { @@ -141,6 +143,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + is_affiliate_link (bool): This is an affiliate link or sponsored product. The FTC requires disclosure for paid partnerships and affiliate products.. [optional] if omitted the server will use the default value of False # noqa: E501 """ source_type = kwargs.get('source_type', "pin_url") @@ -227,6 +230,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + is_affiliate_link (bool): This is an affiliate link or sponsored product. The FTC requires disclosure for paid partnerships and affiliate products.. [optional] if omitted the server will use the default value of False # noqa: E501 """ source_type = kwargs.get('source_type', "pin_url") diff --git a/openapi_generated/pinterest_client/model/pin_media_source_video_id.py b/openapi_generated/pinterest_client/model/pin_media_source_video_id.py index c3849fd..d8299ec 100644 --- a/openapi_generated/pinterest_client/model/pin_media_source_video_id.py +++ b/openapi_generated/pinterest_client/model/pin_media_source_video_id.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_with_image.py b/openapi_generated/pinterest_client/model/pin_media_with_image.py index cbe0479..21d1254 100644 --- a/openapi_generated/pinterest_client/model/pin_media_with_image.py +++ b/openapi_generated/pinterest_client/model/pin_media_with_image.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,7 +31,7 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.image_details import ImageDetails + from openapi_generated.pinterest_client.model.image_metadata_images import ImageMetadataImages from openapi_generated.pinterest_client.model.pin_media import PinMedia from openapi_generated.pinterest_client.model.pin_media_with_image import PinMediaWithImage from openapi_generated.pinterest_client.model.pin_media_with_image_all_of import PinMediaWithImageAllOf @@ -39,7 +39,7 @@ def lazy_import(): from openapi_generated.pinterest_client.model.pin_media_with_images import PinMediaWithImages from openapi_generated.pinterest_client.model.pin_media_with_video import PinMediaWithVideo from openapi_generated.pinterest_client.model.pin_media_with_videos import PinMediaWithVideos - globals()['ImageDetails'] = ImageDetails + globals()['ImageMetadataImages'] = ImageMetadataImages globals()['PinMedia'] = PinMedia globals()['PinMediaWithImage'] = PinMediaWithImage globals()['PinMediaWithImageAllOf'] = PinMediaWithImageAllOf @@ -102,7 +102,7 @@ def openapi_types(): """ lazy_import() return { - 'images': ({str: (ImageDetails,)},), # noqa: E501 + 'images': (ImageMetadataImages,), # noqa: E501 'media_type': (str,), # noqa: E501 } @@ -164,7 +164,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 media_type (str): [optional] # noqa: E501 """ @@ -265,7 +265,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 media_type (str): [optional] # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/pin_media_with_image_all_of.py b/openapi_generated/pinterest_client/model/pin_media_with_image_all_of.py index c19024f..925befa 100644 --- a/openapi_generated/pinterest_client/model/pin_media_with_image_all_of.py +++ b/openapi_generated/pinterest_client/model/pin_media_with_image_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.image_details import ImageDetails - globals()['ImageDetails'] = ImageDetails + from openapi_generated.pinterest_client.model.image_metadata_images import ImageMetadataImages + globals()['ImageMetadataImages'] = ImageMetadataImages class PinMediaWithImageAllOf(ModelNormal): @@ -88,7 +88,7 @@ def openapi_types(): """ lazy_import() return { - 'images': ({str: (ImageDetails,)},), # noqa: E501 + 'images': (ImageMetadataImages,), # noqa: E501 } @cached_property @@ -141,7 +141,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -223,7 +223,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/pin_media_with_image_and_video.py b/openapi_generated/pinterest_client/model/pin_media_with_image_and_video.py index 0cb2f5c..ed6c386 100644 --- a/openapi_generated/pinterest_client/model/pin_media_with_image_and_video.py +++ b/openapi_generated/pinterest_client/model/pin_media_with_image_and_video.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_with_image_and_video_all_of.py b/openapi_generated/pinterest_client/model/pin_media_with_image_and_video_all_of.py index 80b402c..e374a05 100644 --- a/openapi_generated/pinterest_client/model/pin_media_with_image_and_video_all_of.py +++ b/openapi_generated/pinterest_client/model/pin_media_with_image_and_video_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_with_images.py b/openapi_generated/pinterest_client/model/pin_media_with_images.py index 28367d9..90ff94c 100644 --- a/openapi_generated/pinterest_client/model/pin_media_with_images.py +++ b/openapi_generated/pinterest_client/model/pin_media_with_images.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_with_images_all_of.py b/openapi_generated/pinterest_client/model/pin_media_with_images_all_of.py index 6636264..f65c4b9 100644 --- a/openapi_generated/pinterest_client/model/pin_media_with_images_all_of.py +++ b/openapi_generated/pinterest_client/model/pin_media_with_images_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_with_video.py b/openapi_generated/pinterest_client/model/pin_media_with_video.py index 41c6905..184d60e 100644 --- a/openapi_generated/pinterest_client/model/pin_media_with_video.py +++ b/openapi_generated/pinterest_client/model/pin_media_with_video.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,7 +31,7 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.image_details import ImageDetails + from openapi_generated.pinterest_client.model.image_metadata_images import ImageMetadataImages from openapi_generated.pinterest_client.model.pin_media import PinMedia from openapi_generated.pinterest_client.model.pin_media_with_image import PinMediaWithImage from openapi_generated.pinterest_client.model.pin_media_with_image_and_video import PinMediaWithImageAndVideo @@ -39,7 +39,7 @@ def lazy_import(): from openapi_generated.pinterest_client.model.pin_media_with_video import PinMediaWithVideo from openapi_generated.pinterest_client.model.pin_media_with_video_all_of import PinMediaWithVideoAllOf from openapi_generated.pinterest_client.model.pin_media_with_videos import PinMediaWithVideos - globals()['ImageDetails'] = ImageDetails + globals()['ImageMetadataImages'] = ImageMetadataImages globals()['PinMedia'] = PinMedia globals()['PinMediaWithImage'] = PinMediaWithImage globals()['PinMediaWithImageAndVideo'] = PinMediaWithImageAndVideo @@ -102,8 +102,9 @@ def openapi_types(): """ lazy_import() return { - 'images': ({str: (ImageDetails,)},), # noqa: E501 + 'images': (ImageMetadataImages,), # noqa: E501 'cover_image_url': (str,), # noqa: E501 + 'video_url': (str, none_type,), # noqa: E501 'duration': (float,), # noqa: E501 'height': (int,), # noqa: E501 'width': (int,), # noqa: E501 @@ -127,6 +128,7 @@ def discriminator(): attribute_map = { 'images': 'images', # noqa: E501 'cover_image_url': 'cover_image_url', # noqa: E501 + 'video_url': 'video_url', # noqa: E501 'duration': 'duration', # noqa: E501 'height': 'height', # noqa: E501 'width': 'width', # noqa: E501 @@ -172,8 +174,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 cover_image_url (str): [optional] # noqa: E501 + video_url (str, none_type): Video url (720p).

    Note: This field is limited and not available to all apps.. [optional] # noqa: E501 duration (float): Duration (in milliseconds). [optional] # noqa: E501 height (int): Height (in pixels). [optional] # noqa: E501 width (int): Width (in pixels). [optional] # noqa: E501 @@ -277,8 +280,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 cover_image_url (str): [optional] # noqa: E501 + video_url (str, none_type): Video url (720p).

    Note: This field is limited and not available to all apps.. [optional] # noqa: E501 duration (float): Duration (in milliseconds). [optional] # noqa: E501 height (int): Height (in pixels). [optional] # noqa: E501 width (int): Width (in pixels). [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/pin_media_with_video_all_of.py b/openapi_generated/pinterest_client/model/pin_media_with_video_all_of.py index 69d9609..73d98da 100644 --- a/openapi_generated/pinterest_client/model/pin_media_with_video_all_of.py +++ b/openapi_generated/pinterest_client/model/pin_media_with_video_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.image_details import ImageDetails - globals()['ImageDetails'] = ImageDetails + from openapi_generated.pinterest_client.model.image_metadata_images import ImageMetadataImages + globals()['ImageMetadataImages'] = ImageMetadataImages class PinMediaWithVideoAllOf(ModelNormal): @@ -88,8 +88,9 @@ def openapi_types(): """ lazy_import() return { - 'images': ({str: (ImageDetails,)},), # noqa: E501 + 'images': (ImageMetadataImages,), # noqa: E501 'cover_image_url': (str,), # noqa: E501 + 'video_url': (str, none_type,), # noqa: E501 'duration': (float,), # noqa: E501 'height': (int,), # noqa: E501 'width': (int,), # noqa: E501 @@ -103,6 +104,7 @@ def discriminator(): attribute_map = { 'images': 'images', # noqa: E501 'cover_image_url': 'cover_image_url', # noqa: E501 + 'video_url': 'video_url', # noqa: E501 'duration': 'duration', # noqa: E501 'height': 'height', # noqa: E501 'width': 'width', # noqa: E501 @@ -149,8 +151,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 cover_image_url (str): [optional] # noqa: E501 + video_url (str, none_type): Video url (720p).

    Note: This field is limited and not available to all apps.. [optional] # noqa: E501 duration (float): Duration (in milliseconds). [optional] # noqa: E501 height (int): Height (in pixels). [optional] # noqa: E501 width (int): Width (in pixels). [optional] # noqa: E501 @@ -235,8 +238,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - images ({str: (ImageDetails,)}): [optional] # noqa: E501 + images (ImageMetadataImages): [optional] # noqa: E501 cover_image_url (str): [optional] # noqa: E501 + video_url (str, none_type): Video url (720p).

    Note: This field is limited and not available to all apps.. [optional] # noqa: E501 duration (float): Duration (in milliseconds). [optional] # noqa: E501 height (int): Height (in pixels). [optional] # noqa: E501 width (int): Width (in pixels). [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/pin_media_with_videos.py b/openapi_generated/pinterest_client/model/pin_media_with_videos.py index 744220d..f45dd42 100644 --- a/openapi_generated/pinterest_client/model/pin_media_with_videos.py +++ b/openapi_generated/pinterest_client/model/pin_media_with_videos.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_media_with_videos_all_of.py b/openapi_generated/pinterest_client/model/pin_media_with_videos_all_of.py index 19b7090..98d79fa 100644 --- a/openapi_generated/pinterest_client/model/pin_media_with_videos_all_of.py +++ b/openapi_generated/pinterest_client/model/pin_media_with_videos_all_of.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pin_promotion_summary_status.py b/openapi_generated/pinterest_client/model/pin_promotion_summary_status.py index 1a0a956..8ce31e0 100644 --- a/openapi_generated/pinterest_client/model/pin_promotion_summary_status.py +++ b/openapi_generated/pinterest_client/model/pin_promotion_summary_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -59,6 +59,8 @@ class PinPromotionSummaryStatus(ModelSimple): 'REJECTED': "REJECTED", 'ADVERTISER_DISABLED': "ADVERTISER_DISABLED", 'ARCHIVED': "ARCHIVED", + 'DRAFT': "DRAFT", + 'DELETED_DRAFT': "DELETED_DRAFT", }, } @@ -110,10 +112,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Summary status for pin promotions., must be one of ["APPROVED", "PAUSED", "PENDING", "REJECTED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + args[0] (str): Summary status for pin promotions., must be one of ["APPROVED", "PAUSED", "PENDING", "REJECTED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 Keyword Args: - value (str): Summary status for pin promotions., must be one of ["APPROVED", "PAUSED", "PENDING", "REJECTED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + value (str): Summary status for pin promotions., must be one of ["APPROVED", "PAUSED", "PENDING", "REJECTED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -200,10 +202,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Summary status for pin promotions., must be one of ["APPROVED", "PAUSED", "PENDING", "REJECTED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + args[0] (str): Summary status for pin promotions., must be one of ["APPROVED", "PAUSED", "PENDING", "REJECTED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 Keyword Args: - value (str): Summary status for pin promotions., must be one of ["APPROVED", "PAUSED", "PENDING", "REJECTED", "ADVERTISER_DISABLED", "ARCHIVED", ] # noqa: E501 + value (str): Summary status for pin promotions., must be one of ["APPROVED", "PAUSED", "PENDING", "REJECTED", "ADVERTISER_DISABLED", "ARCHIVED", "DRAFT", "DELETED_DRAFT", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/pin_update.py b/openapi_generated/pinterest_client/model/pin_update.py index c145847..a395619 100644 --- a/openapi_generated/pinterest_client/model/pin_update.py +++ b/openapi_generated/pinterest_client/model/pin_update.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -77,7 +77,7 @@ class PinUpdate(ModelNormal): }, }, ('description',): { - 'max_length': 500, + 'max_length': 800, }, ('link',): { 'max_length': 2048, @@ -180,7 +180,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 alt_text (str, none_type): Pin's alternative text.. [optional] # noqa: E501 board_id (str, none_type): The id of the board to move the Pin onto.. [optional] # noqa: E501 board_section_id (str, none_type): Board section ID.. [optional] # noqa: E501 - description (str, none_type): Pin description - 500 characters maximum.. [optional] # noqa: E501 + description (str, none_type): Pin description - 800 characters maximum.. [optional] # noqa: E501 link (str, none_type): URL viewer is taken to when they click pin.. [optional] # noqa: E501 title (str, none_type): The native pin title that creators explicitly prefer to display.. [optional] # noqa: E501 carousel_slots ([PinUpdateCarouselSlots]): Carousel Pin slots data.. [optional] # noqa: E501 @@ -269,7 +269,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 alt_text (str, none_type): Pin's alternative text.. [optional] # noqa: E501 board_id (str, none_type): The id of the board to move the Pin onto.. [optional] # noqa: E501 board_section_id (str, none_type): Board section ID.. [optional] # noqa: E501 - description (str, none_type): Pin description - 500 characters maximum.. [optional] # noqa: E501 + description (str, none_type): Pin description - 800 characters maximum.. [optional] # noqa: E501 link (str, none_type): URL viewer is taken to when they click pin.. [optional] # noqa: E501 title (str, none_type): The native pin title that creators explicitly prefer to display.. [optional] # noqa: E501 carousel_slots ([PinUpdateCarouselSlots]): Carousel Pin slots data.. [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/pin_update_carousel_slots.py b/openapi_generated/pinterest_client/model/pin_update_carousel_slots.py index 35a0eff..a827b76 100644 --- a/openapi_generated/pinterest_client/model/pin_update_carousel_slots.py +++ b/openapi_generated/pinterest_client/model/pin_update_carousel_slots.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/pinterest_tag_event_data.py b/openapi_generated/pinterest_client/model/pinterest_tag_event_data.py index 80574a0..6962acf 100644 --- a/openapi_generated/pinterest_client/model/pinterest_tag_event_data.py +++ b/openapi_generated/pinterest_client/model/pinterest_tag_event_data.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/placement_group_type.py b/openapi_generated/pinterest_client/model/placement_group_type.py index de1d330..100a39b 100644 --- a/openapi_generated/pinterest_client/model/placement_group_type.py +++ b/openapi_generated/pinterest_client/model/placement_group_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -108,10 +108,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Campaign placement group type., must be one of ["ALL", "SEARCH", "BROWSE", "OTHER", ] # noqa: E501 + args[0] (str): Campaign placement group type. if omitted defaults to "ALL", must be one of ["ALL", "SEARCH", "BROWSE", "OTHER", ] # noqa: E501 Keyword Args: - value (str): Campaign placement group type., must be one of ["ALL", "SEARCH", "BROWSE", "OTHER", ] # noqa: E501 + value (str): Campaign placement group type. if omitted defaults to "ALL", must be one of ["ALL", "SEARCH", "BROWSE", "OTHER", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -152,11 +152,7 @@ def __init__(self, *args, **kwargs): args = list(args) value = args.pop(0) else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + value = "ALL" _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) @@ -198,10 +194,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Campaign placement group type., must be one of ["ALL", "SEARCH", "BROWSE", "OTHER", ] # noqa: E501 + args[0] (str): Campaign placement group type. if omitted defaults to "ALL", must be one of ["ALL", "SEARCH", "BROWSE", "OTHER", ] # noqa: E501 Keyword Args: - value (str): Campaign placement group type., must be one of ["ALL", "SEARCH", "BROWSE", "OTHER", ] # noqa: E501 + value (str): Campaign placement group type. if omitted defaults to "ALL", must be one of ["ALL", "SEARCH", "BROWSE", "OTHER", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -244,11 +240,7 @@ def _from_openapi_data(cls, *args, **kwargs): args = list(args) value = args.pop(0) else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) + value = "ALL" _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) diff --git a/openapi_generated/pinterest_client/model/placement_multipliers.py b/openapi_generated/pinterest_client/model/placement_multipliers.py new file mode 100644 index 0000000..22765fa --- /dev/null +++ b/openapi_generated/pinterest_client/model/placement_multipliers.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class PlacementMultipliers(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('placement',): { + 'SEARCH': "SEARCH", + 'BROWSE': "BROWSE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (float,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'placement': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'placement': 'PLACEMENT', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PlacementMultipliers - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + placement (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PlacementMultipliers - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + placement (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/price_filter.py b/openapi_generated/pinterest_client/model/price_filter.py new file mode 100644 index 0000000..e5e1dcc --- /dev/null +++ b/openapi_generated/pinterest_client/model/price_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_product_group_pricing_currency_criteria import CatalogsProductGroupPricingCurrencyCriteria + globals()['CatalogsProductGroupPricingCurrencyCriteria'] = CatalogsProductGroupPricingCurrencyCriteria + + +class PriceFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'price': (CatalogsProductGroupPricingCurrencyCriteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'price': 'PRICE', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, price, *args, **kwargs): # noqa: E501 + """PriceFilter - a model defined in OpenAPI + + Args: + price (CatalogsProductGroupPricingCurrencyCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.price = price + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, price, *args, **kwargs): # noqa: E501 + """PriceFilter - a model defined in OpenAPI + + Args: + price (CatalogsProductGroupPricingCurrencyCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.price = price + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/product_availability_type.py b/openapi_generated/pinterest_client/model/product_availability_type.py index c16eb45..745fe55 100644 --- a/openapi_generated/pinterest_client/model/product_availability_type.py +++ b/openapi_generated/pinterest_client/model/product_availability_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/product_group_analytics_response.py b/openapi_generated/pinterest_client/model/product_group_analytics_response.py index 9ad9fab..0a339be 100644 --- a/openapi_generated/pinterest_client/model/product_group_analytics_response.py +++ b/openapi_generated/pinterest_client/model/product_group_analytics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/product_group_promotion.py b/openapi_generated/pinterest_client/model/product_group_promotion.py index 65bccb3..5c523f8 100644 --- a/openapi_generated/pinterest_client/model/product_group_promotion.py +++ b/openapi_generated/pinterest_client/model/product_group_promotion.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,10 +31,10 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.creative_type import CreativeType from openapi_generated.pinterest_client.model.entity_status import EntityStatus - globals()['CreativeType'] = CreativeType + from openapi_generated.pinterest_client.model.grid_click_type import GridClickType globals()['EntityStatus'] = EntityStatus + globals()['GridClickType'] = GridClickType class ProductGroupPromotion(ModelNormal): @@ -129,9 +129,9 @@ def openapi_types(): 'tracking_url': (str, none_type,), # noqa: E501 'catalog_product_group_id': (str, none_type,), # noqa: E501 'catalog_product_group_name': (str, none_type,), # noqa: E501 - 'creative_type': (CreativeType,), # noqa: E501 'collections_hero_pin_id': (str, none_type,), # noqa: E501 'collections_hero_destination_url': (str, none_type,), # noqa: E501 + 'grid_click_type': (GridClickType,), # noqa: E501 } @cached_property @@ -154,9 +154,9 @@ def discriminator(): 'tracking_url': 'tracking_url', # noqa: E501 'catalog_product_group_id': 'catalog_product_group_id', # noqa: E501 'catalog_product_group_name': 'catalog_product_group_name', # noqa: E501 - 'creative_type': 'creative_type', # noqa: E501 'collections_hero_pin_id': 'collections_hero_pin_id', # noqa: E501 'collections_hero_destination_url': 'collections_hero_destination_url', # noqa: E501 + 'grid_click_type': 'grid_click_type', # noqa: E501 } read_only_vars = { @@ -214,9 +214,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 tracking_url (str, none_type): Tracking template for proudct group promotions. 4000 limit. [optional] # noqa: E501 catalog_product_group_id (str, none_type): ID of the catalogs product group that this product group promotion references. [optional] # noqa: E501 catalog_product_group_name (str, none_type): Catalogs product group name. [optional] # noqa: E501 - creative_type (CreativeType): [optional] # noqa: E501 collections_hero_pin_id (str, none_type): Hero Pin ID if this PG is promoted as a Collection. [optional] # noqa: E501 collections_hero_destination_url (str, none_type): Collections Hero Destination Url. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -312,9 +312,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 tracking_url (str, none_type): Tracking template for proudct group promotions. 4000 limit. [optional] # noqa: E501 catalog_product_group_id (str, none_type): ID of the catalogs product group that this product group promotion references. [optional] # noqa: E501 catalog_product_group_name (str, none_type): Catalogs product group name. [optional] # noqa: E501 - creative_type (CreativeType): [optional] # noqa: E501 collections_hero_pin_id (str, none_type): Hero Pin ID if this PG is promoted as a Collection. [optional] # noqa: E501 collections_hero_destination_url (str, none_type): Collections Hero Destination Url. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/product_group_promotion_create_request.py b/openapi_generated/pinterest_client/model/product_group_promotion_create_request.py index b7cc5b4..1bbbd2d 100644 --- a/openapi_generated/pinterest_client/model/product_group_promotion_create_request.py +++ b/openapi_generated/pinterest_client/model/product_group_promotion_create_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -31,8 +31,8 @@ def lazy_import(): - from openapi_generated.pinterest_client.model.product_group_promotion import ProductGroupPromotion - globals()['ProductGroupPromotion'] = ProductGroupPromotion + from openapi_generated.pinterest_client.model.product_group_promotion_create_request_element import ProductGroupPromotionCreateRequestElement + globals()['ProductGroupPromotionCreateRequestElement'] = ProductGroupPromotionCreateRequestElement class ProductGroupPromotionCreateRequest(ModelNormal): @@ -94,7 +94,7 @@ def openapi_types(): lazy_import() return { 'ad_group_id': (str,), # noqa: E501 - 'product_group_promotion': ([ProductGroupPromotion],), # noqa: E501 + 'product_group_promotion': ([ProductGroupPromotionCreateRequestElement],), # noqa: E501 } @cached_property @@ -119,7 +119,7 @@ def _from_openapi_data(cls, ad_group_id, product_group_promotion, *args, **kwarg Args: ad_group_id (str): ID of the Ad Group the Product Group Promotion belongs to. - product_group_promotion ([ProductGroupPromotion]): + product_group_promotion ([ProductGroupPromotionCreateRequestElement]): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -206,7 +206,7 @@ def __init__(self, ad_group_id, product_group_promotion, *args, **kwargs): # no Args: ad_group_id (str): ID of the Ad Group the Product Group Promotion belongs to. - product_group_promotion ([ProductGroupPromotion]): + product_group_promotion ([ProductGroupPromotionCreateRequestElement]): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/openapi_generated/pinterest_client/model/product_group_promotion_create_request_element.py b/openapi_generated/pinterest_client/model/product_group_promotion_create_request_element.py new file mode 100644 index 0000000..93ef155 --- /dev/null +++ b/openapi_generated/pinterest_client/model/product_group_promotion_create_request_element.py @@ -0,0 +1,413 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.creative_type import CreativeType + from openapi_generated.pinterest_client.model.entity_status import EntityStatus + from openapi_generated.pinterest_client.model.grid_click_type import GridClickType + from openapi_generated.pinterest_client.model.product_group_promotion import ProductGroupPromotion + from openapi_generated.pinterest_client.model.product_group_promotion_create_request_element_all_of import ProductGroupPromotionCreateRequestElementAllOf + globals()['CreativeType'] = CreativeType + globals()['EntityStatus'] = EntityStatus + globals()['GridClickType'] = GridClickType + globals()['ProductGroupPromotion'] = ProductGroupPromotion + globals()['ProductGroupPromotionCreateRequestElementAllOf'] = ProductGroupPromotionCreateRequestElementAllOf + + +class ProductGroupPromotionCreateRequestElement(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('ad_group_id',): { + 'regex': { + 'pattern': r'^(AG)?\d+$', # noqa: E501 + }, + }, + ('parent_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('catalog_product_group_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('collections_hero_pin_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'ad_group_id': (str,), # noqa: E501 + 'bid_in_micro_currency': (int, none_type,), # noqa: E501 + 'included': (bool, none_type,), # noqa: E501 + 'definition': (str, none_type,), # noqa: E501 + 'relative_definition': (str, none_type,), # noqa: E501 + 'parent_id': (str, none_type,), # noqa: E501 + 'slideshow_collections_title': (str, none_type,), # noqa: E501 + 'slideshow_collections_description': (str, none_type,), # noqa: E501 + 'is_mdl': (bool, none_type,), # noqa: E501 + 'status': (EntityStatus,), # noqa: E501 + 'tracking_url': (str, none_type,), # noqa: E501 + 'catalog_product_group_id': (str, none_type,), # noqa: E501 + 'catalog_product_group_name': (str, none_type,), # noqa: E501 + 'collections_hero_pin_id': (str, none_type,), # noqa: E501 + 'collections_hero_destination_url': (str, none_type,), # noqa: E501 + 'grid_click_type': (GridClickType,), # noqa: E501 + 'creative_type': (CreativeType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'ad_group_id': 'ad_group_id', # noqa: E501 + 'bid_in_micro_currency': 'bid_in_micro_currency', # noqa: E501 + 'included': 'included', # noqa: E501 + 'definition': 'definition', # noqa: E501 + 'relative_definition': 'relative_definition', # noqa: E501 + 'parent_id': 'parent_id', # noqa: E501 + 'slideshow_collections_title': 'slideshow_collections_title', # noqa: E501 + 'slideshow_collections_description': 'slideshow_collections_description', # noqa: E501 + 'is_mdl': 'is_mdl', # noqa: E501 + 'status': 'status', # noqa: E501 + 'tracking_url': 'tracking_url', # noqa: E501 + 'catalog_product_group_id': 'catalog_product_group_id', # noqa: E501 + 'catalog_product_group_name': 'catalog_product_group_name', # noqa: E501 + 'collections_hero_pin_id': 'collections_hero_pin_id', # noqa: E501 + 'collections_hero_destination_url': 'collections_hero_destination_url', # noqa: E501 + 'grid_click_type': 'grid_click_type', # noqa: E501 + 'creative_type': 'creative_type', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ProductGroupPromotionCreateRequestElement - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): ID of the product group promotion.. [optional] # noqa: E501 + ad_group_id (str): ID of the ad group the product group belongs to.. [optional] # noqa: E501 + bid_in_micro_currency (int, none_type): The bid in micro currency.. [optional] # noqa: E501 + included (bool, none_type): True if the group is BIDDABLE, false if it should be EXCLUDED from serving ads.. [optional] # noqa: E501 + definition (str, none_type): The full product group definition path. [optional] # noqa: E501 + relative_definition (str, none_type): The definition of the product group, relative to its parent - an attribute name/value pair. [optional] # noqa: E501 + parent_id (str, none_type): The parent Product Group ID of this Product Group. [optional] # noqa: E501 + slideshow_collections_title (str, none_type): Slideshow Collections Title. [optional] # noqa: E501 + slideshow_collections_description (str, none_type): Slideshow Collections Description. [optional] # noqa: E501 + is_mdl (bool, none_type): If set to true products promoted in this product group will use the Mobile Deep Link specified in your catalog. [optional] # noqa: E501 + status (EntityStatus): [optional] # noqa: E501 + tracking_url (str, none_type): Tracking template for proudct group promotions. 4000 limit. [optional] # noqa: E501 + catalog_product_group_id (str, none_type): ID of the catalogs product group that this product group promotion references. [optional] # noqa: E501 + catalog_product_group_name (str, none_type): Catalogs product group name. [optional] # noqa: E501 + collections_hero_pin_id (str, none_type): Hero Pin ID if this PG is promoted as a Collection. [optional] # noqa: E501 + collections_hero_destination_url (str, none_type): Collections Hero Destination Url. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + creative_type (CreativeType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ProductGroupPromotionCreateRequestElement - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): ID of the product group promotion.. [optional] # noqa: E501 + ad_group_id (str): ID of the ad group the product group belongs to.. [optional] # noqa: E501 + bid_in_micro_currency (int, none_type): The bid in micro currency.. [optional] # noqa: E501 + included (bool, none_type): True if the group is BIDDABLE, false if it should be EXCLUDED from serving ads.. [optional] # noqa: E501 + definition (str, none_type): The full product group definition path. [optional] # noqa: E501 + relative_definition (str, none_type): The definition of the product group, relative to its parent - an attribute name/value pair. [optional] # noqa: E501 + parent_id (str, none_type): The parent Product Group ID of this Product Group. [optional] # noqa: E501 + slideshow_collections_title (str, none_type): Slideshow Collections Title. [optional] # noqa: E501 + slideshow_collections_description (str, none_type): Slideshow Collections Description. [optional] # noqa: E501 + is_mdl (bool, none_type): If set to true products promoted in this product group will use the Mobile Deep Link specified in your catalog. [optional] # noqa: E501 + status (EntityStatus): [optional] # noqa: E501 + tracking_url (str, none_type): Tracking template for proudct group promotions. 4000 limit. [optional] # noqa: E501 + catalog_product_group_id (str, none_type): ID of the catalogs product group that this product group promotion references. [optional] # noqa: E501 + catalog_product_group_name (str, none_type): Catalogs product group name. [optional] # noqa: E501 + collections_hero_pin_id (str, none_type): Hero Pin ID if this PG is promoted as a Collection. [optional] # noqa: E501 + collections_hero_destination_url (str, none_type): Collections Hero Destination Url. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + creative_type (CreativeType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/product_group_promotion_create_request_element_all_of.py b/openapi_generated/pinterest_client/model/product_group_promotion_create_request_element_all_of.py new file mode 100644 index 0000000..6d87139 --- /dev/null +++ b/openapi_generated/pinterest_client/model/product_group_promotion_create_request_element_all_of.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.creative_type import CreativeType + globals()['CreativeType'] = CreativeType + + +class ProductGroupPromotionCreateRequestElementAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'creative_type': (CreativeType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'creative_type': 'creative_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ProductGroupPromotionCreateRequestElementAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_type (CreativeType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ProductGroupPromotionCreateRequestElementAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creative_type (CreativeType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/product_group_promotion_response.py b/openapi_generated/pinterest_client/model/product_group_promotion_response.py index be3712d..4890cf6 100644 --- a/openapi_generated/pinterest_client/model/product_group_promotion_response.py +++ b/openapi_generated/pinterest_client/model/product_group_promotion_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/product_group_promotion_response_element.py b/openapi_generated/pinterest_client/model/product_group_promotion_response_element.py new file mode 100644 index 0000000..f1963fd --- /dev/null +++ b/openapi_generated/pinterest_client/model/product_group_promotion_response_element.py @@ -0,0 +1,413 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.creative_type import CreativeType + from openapi_generated.pinterest_client.model.entity_status import EntityStatus + from openapi_generated.pinterest_client.model.grid_click_type import GridClickType + from openapi_generated.pinterest_client.model.product_group_promotion import ProductGroupPromotion + from openapi_generated.pinterest_client.model.product_group_promotion_create_request_element_all_of import ProductGroupPromotionCreateRequestElementAllOf + globals()['CreativeType'] = CreativeType + globals()['EntityStatus'] = EntityStatus + globals()['GridClickType'] = GridClickType + globals()['ProductGroupPromotion'] = ProductGroupPromotion + globals()['ProductGroupPromotionCreateRequestElementAllOf'] = ProductGroupPromotionCreateRequestElementAllOf + + +class ProductGroupPromotionResponseElement(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('ad_group_id',): { + 'regex': { + 'pattern': r'^(AG)?\d+$', # noqa: E501 + }, + }, + ('parent_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('catalog_product_group_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('collections_hero_pin_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'ad_group_id': (str,), # noqa: E501 + 'bid_in_micro_currency': (int, none_type,), # noqa: E501 + 'included': (bool, none_type,), # noqa: E501 + 'definition': (str, none_type,), # noqa: E501 + 'relative_definition': (str, none_type,), # noqa: E501 + 'parent_id': (str, none_type,), # noqa: E501 + 'slideshow_collections_title': (str, none_type,), # noqa: E501 + 'slideshow_collections_description': (str, none_type,), # noqa: E501 + 'is_mdl': (bool, none_type,), # noqa: E501 + 'status': (EntityStatus,), # noqa: E501 + 'tracking_url': (str, none_type,), # noqa: E501 + 'catalog_product_group_id': (str, none_type,), # noqa: E501 + 'catalog_product_group_name': (str, none_type,), # noqa: E501 + 'collections_hero_pin_id': (str, none_type,), # noqa: E501 + 'collections_hero_destination_url': (str, none_type,), # noqa: E501 + 'grid_click_type': (GridClickType,), # noqa: E501 + 'creative_type': (CreativeType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'ad_group_id': 'ad_group_id', # noqa: E501 + 'bid_in_micro_currency': 'bid_in_micro_currency', # noqa: E501 + 'included': 'included', # noqa: E501 + 'definition': 'definition', # noqa: E501 + 'relative_definition': 'relative_definition', # noqa: E501 + 'parent_id': 'parent_id', # noqa: E501 + 'slideshow_collections_title': 'slideshow_collections_title', # noqa: E501 + 'slideshow_collections_description': 'slideshow_collections_description', # noqa: E501 + 'is_mdl': 'is_mdl', # noqa: E501 + 'status': 'status', # noqa: E501 + 'tracking_url': 'tracking_url', # noqa: E501 + 'catalog_product_group_id': 'catalog_product_group_id', # noqa: E501 + 'catalog_product_group_name': 'catalog_product_group_name', # noqa: E501 + 'collections_hero_pin_id': 'collections_hero_pin_id', # noqa: E501 + 'collections_hero_destination_url': 'collections_hero_destination_url', # noqa: E501 + 'grid_click_type': 'grid_click_type', # noqa: E501 + 'creative_type': 'creative_type', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ProductGroupPromotionResponseElement - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): ID of the product group promotion.. [optional] # noqa: E501 + ad_group_id (str): ID of the ad group the product group belongs to.. [optional] # noqa: E501 + bid_in_micro_currency (int, none_type): The bid in micro currency.. [optional] # noqa: E501 + included (bool, none_type): True if the group is BIDDABLE, false if it should be EXCLUDED from serving ads.. [optional] # noqa: E501 + definition (str, none_type): The full product group definition path. [optional] # noqa: E501 + relative_definition (str, none_type): The definition of the product group, relative to its parent - an attribute name/value pair. [optional] # noqa: E501 + parent_id (str, none_type): The parent Product Group ID of this Product Group. [optional] # noqa: E501 + slideshow_collections_title (str, none_type): Slideshow Collections Title. [optional] # noqa: E501 + slideshow_collections_description (str, none_type): Slideshow Collections Description. [optional] # noqa: E501 + is_mdl (bool, none_type): If set to true products promoted in this product group will use the Mobile Deep Link specified in your catalog. [optional] # noqa: E501 + status (EntityStatus): [optional] # noqa: E501 + tracking_url (str, none_type): Tracking template for proudct group promotions. 4000 limit. [optional] # noqa: E501 + catalog_product_group_id (str, none_type): ID of the catalogs product group that this product group promotion references. [optional] # noqa: E501 + catalog_product_group_name (str, none_type): Catalogs product group name. [optional] # noqa: E501 + collections_hero_pin_id (str, none_type): Hero Pin ID if this PG is promoted as a Collection. [optional] # noqa: E501 + collections_hero_destination_url (str, none_type): Collections Hero Destination Url. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + creative_type (CreativeType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ProductGroupPromotionResponseElement - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): ID of the product group promotion.. [optional] # noqa: E501 + ad_group_id (str): ID of the ad group the product group belongs to.. [optional] # noqa: E501 + bid_in_micro_currency (int, none_type): The bid in micro currency.. [optional] # noqa: E501 + included (bool, none_type): True if the group is BIDDABLE, false if it should be EXCLUDED from serving ads.. [optional] # noqa: E501 + definition (str, none_type): The full product group definition path. [optional] # noqa: E501 + relative_definition (str, none_type): The definition of the product group, relative to its parent - an attribute name/value pair. [optional] # noqa: E501 + parent_id (str, none_type): The parent Product Group ID of this Product Group. [optional] # noqa: E501 + slideshow_collections_title (str, none_type): Slideshow Collections Title. [optional] # noqa: E501 + slideshow_collections_description (str, none_type): Slideshow Collections Description. [optional] # noqa: E501 + is_mdl (bool, none_type): If set to true products promoted in this product group will use the Mobile Deep Link specified in your catalog. [optional] # noqa: E501 + status (EntityStatus): [optional] # noqa: E501 + tracking_url (str, none_type): Tracking template for proudct group promotions. 4000 limit. [optional] # noqa: E501 + catalog_product_group_id (str, none_type): ID of the catalogs product group that this product group promotion references. [optional] # noqa: E501 + catalog_product_group_name (str, none_type): Catalogs product group name. [optional] # noqa: E501 + collections_hero_pin_id (str, none_type): Hero Pin ID if this PG is promoted as a Collection. [optional] # noqa: E501 + collections_hero_destination_url (str, none_type): Collections Hero Destination Url. [optional] # noqa: E501 + grid_click_type (GridClickType): [optional] # noqa: E501 + creative_type (CreativeType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/product_group_promotion_response_item.py b/openapi_generated/pinterest_client/model/product_group_promotion_response_item.py index 6ad2a09..3a25394 100644 --- a/openapi_generated/pinterest_client/model/product_group_promotion_response_item.py +++ b/openapi_generated/pinterest_client/model/product_group_promotion_response_item.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -32,9 +32,9 @@ def lazy_import(): from openapi_generated.pinterest_client.model.exception import Exception - from openapi_generated.pinterest_client.model.product_group_promotion import ProductGroupPromotion + from openapi_generated.pinterest_client.model.product_group_promotion_response_element import ProductGroupPromotionResponseElement globals()['Exception'] = Exception - globals()['ProductGroupPromotion'] = ProductGroupPromotion + globals()['ProductGroupPromotionResponseElement'] = ProductGroupPromotionResponseElement class ProductGroupPromotionResponseItem(ModelNormal): @@ -90,7 +90,7 @@ def openapi_types(): """ lazy_import() return { - 'data': (ProductGroupPromotion,), # noqa: E501 + 'data': (ProductGroupPromotionResponseElement,), # noqa: E501 'exceptions': ([Exception], none_type,), # noqa: E501 } @@ -145,7 +145,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - data (ProductGroupPromotion): [optional] # noqa: E501 + data (ProductGroupPromotionResponseElement): [optional] # noqa: E501 exceptions ([Exception], none_type): [optional] # noqa: E501 """ @@ -228,7 +228,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - data (ProductGroupPromotion): [optional] # noqa: E501 + data (ProductGroupPromotionResponseElement): [optional] # noqa: E501 exceptions ([Exception], none_type): [optional] # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/product_group_promotion_update_request.py b/openapi_generated/pinterest_client/model/product_group_promotion_update_request.py index fe99a7a..e71bdec 100644 --- a/openapi_generated/pinterest_client/model/product_group_promotion_update_request.py +++ b/openapi_generated/pinterest_client/model/product_group_promotion_update_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/product_group_reference_filter.py b/openapi_generated/pinterest_client/model/product_group_reference_filter.py new file mode 100644 index 0000000..977cd7e --- /dev/null +++ b/openapi_generated/pinterest_client/model/product_group_reference_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_string_criteria import CatalogsProductGroupMultipleStringCriteria + globals()['CatalogsProductGroupMultipleStringCriteria'] = CatalogsProductGroupMultipleStringCriteria + + +class ProductGroupReferenceFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'product_group': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'product_group': 'PRODUCT_GROUP', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, product_group, *args, **kwargs): # noqa: E501 + """ProductGroupReferenceFilter - a model defined in OpenAPI + + Args: + product_group (CatalogsProductGroupMultipleStringCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.product_group = product_group + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, product_group, *args, **kwargs): # noqa: E501 + """ProductGroupReferenceFilter - a model defined in OpenAPI + + Args: + product_group (CatalogsProductGroupMultipleStringCriteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.product_group = product_group + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/product_group_summary_status.py b/openapi_generated/pinterest_client/model/product_group_summary_status.py index 74496fb..49994e1 100644 --- a/openapi_generated/pinterest_client/model/product_group_summary_status.py +++ b/openapi_generated/pinterest_client/model/product_group_summary_status.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/product_type0_filter.py b/openapi_generated/pinterest_client/model/product_type0_filter.py index cfca9da..a1edeaf 100644 --- a/openapi_generated/pinterest_client/model/product_type0_filter.py +++ b/openapi_generated/pinterest_client/model/product_type0_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/product_type1_filter.py b/openapi_generated/pinterest_client/model/product_type1_filter.py index 6956ae1..370aca1 100644 --- a/openapi_generated/pinterest_client/model/product_type1_filter.py +++ b/openapi_generated/pinterest_client/model/product_type1_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/product_type2_filter.py b/openapi_generated/pinterest_client/model/product_type2_filter.py index 3bf7ec2..8e1bd92 100644 --- a/openapi_generated/pinterest_client/model/product_type2_filter.py +++ b/openapi_generated/pinterest_client/model/product_type2_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/product_type3_filter.py b/openapi_generated/pinterest_client/model/product_type3_filter.py index 1a820d7..365e64a 100644 --- a/openapi_generated/pinterest_client/model/product_type3_filter.py +++ b/openapi_generated/pinterest_client/model/product_type3_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/product_type4_filter.py b/openapi_generated/pinterest_client/model/product_type4_filter.py index b8f4eea..9ac6762 100644 --- a/openapi_generated/pinterest_client/model/product_type4_filter.py +++ b/openapi_generated/pinterest_client/model/product_type4_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/quiz_pin_data.py b/openapi_generated/pinterest_client/model/quiz_pin_data.py new file mode 100644 index 0000000..e16987f --- /dev/null +++ b/openapi_generated/pinterest_client/model/quiz_pin_data.py @@ -0,0 +1,280 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.quiz_pin_question import QuizPinQuestion + from openapi_generated.pinterest_client.model.quiz_pin_result import QuizPinResult + globals()['QuizPinQuestion'] = QuizPinQuestion + globals()['QuizPinResult'] = QuizPinResult + + +class QuizPinData(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('tie_breaker_type',): { + 'RANDOM': "RANDOM", + 'CUSTOM': "CUSTOM", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'questions': ([QuizPinQuestion],), # noqa: E501 + 'results': ([QuizPinResult],), # noqa: E501 + 'tie_breaker_type': (str,), # noqa: E501 + 'tie_breaker_custom_result': (QuizPinResult,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'questions': 'questions', # noqa: E501 + 'results': 'results', # noqa: E501 + 'tie_breaker_type': 'tie_breaker_type', # noqa: E501 + 'tie_breaker_custom_result': 'tie_breaker_custom_result', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuizPinData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + questions ([QuizPinQuestion]): [optional] # noqa: E501 + results ([QuizPinResult]): [optional] # noqa: E501 + tie_breaker_type (str): Quiz ad tie breaker type, default is RANDOM. [optional] # noqa: E501 + tie_breaker_custom_result (QuizPinResult): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """QuizPinData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + questions ([QuizPinQuestion]): [optional] # noqa: E501 + results ([QuizPinResult]): [optional] # noqa: E501 + tie_breaker_type (str): Quiz ad tie breaker type, default is RANDOM. [optional] # noqa: E501 + tie_breaker_custom_result (QuizPinResult): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/quiz_pin_option.py b/openapi_generated/pinterest_client/model/quiz_pin_option.py new file mode 100644 index 0000000..bda913e --- /dev/null +++ b/openapi_generated/pinterest_client/model/quiz_pin_option.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class QuizPinOption(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (float,), # noqa: E501 + 'text': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'text': 'text', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuizPinOption - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (float): [optional] # noqa: E501 + text (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """QuizPinOption - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (float): [optional] # noqa: E501 + text (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/quiz_pin_question.py b/openapi_generated/pinterest_client/model/quiz_pin_question.py new file mode 100644 index 0000000..ae57128 --- /dev/null +++ b/openapi_generated/pinterest_client/model/quiz_pin_question.py @@ -0,0 +1,270 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.quiz_pin_option import QuizPinOption + globals()['QuizPinOption'] = QuizPinOption + + +class QuizPinQuestion(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'question_id': (float,), # noqa: E501 + 'question_text': (str,), # noqa: E501 + 'options': ([QuizPinOption],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'question_id': 'question_id', # noqa: E501 + 'question_text': 'question_text', # noqa: E501 + 'options': 'options', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuizPinQuestion - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + question_id (float): [optional] # noqa: E501 + question_text (str): [optional] # noqa: E501 + options ([QuizPinOption]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """QuizPinQuestion - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + question_id (float): [optional] # noqa: E501 + question_text (str): [optional] # noqa: E501 + options ([QuizPinOption]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/quiz_pin_result.py b/openapi_generated/pinterest_client/model/quiz_pin_result.py new file mode 100644 index 0000000..e438ec9 --- /dev/null +++ b/openapi_generated/pinterest_client/model/quiz_pin_result.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class QuizPinResult(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'organic_pin_id': (str,), # noqa: E501 + 'android_deep_link': (str,), # noqa: E501 + 'ios_deep_link': (str,), # noqa: E501 + 'destination_url': (str,), # noqa: E501 + 'result_id': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'organic_pin_id': 'organic_pin_id', # noqa: E501 + 'android_deep_link': 'android_deep_link', # noqa: E501 + 'ios_deep_link': 'ios_deep_link', # noqa: E501 + 'destination_url': 'destination_url', # noqa: E501 + 'result_id': 'result_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuizPinResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + organic_pin_id (str): [optional] # noqa: E501 + android_deep_link (str): [optional] # noqa: E501 + ios_deep_link (str): [optional] # noqa: E501 + destination_url (str): [optional] # noqa: E501 + result_id (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """QuizPinResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + organic_pin_id (str): [optional] # noqa: E501 + android_deep_link (str): [optional] # noqa: E501 + ios_deep_link (str): [optional] # noqa: E501 + destination_url (str): [optional] # noqa: E501 + result_id (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/related_terms.py b/openapi_generated/pinterest_client/model/related_terms.py index 56ab045..9897663 100644 --- a/openapi_generated/pinterest_client/model/related_terms.py +++ b/openapi_generated/pinterest_client/model/related_terms.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/related_terms_related_terms_list.py b/openapi_generated/pinterest_client/model/related_terms_related_terms_list.py index 1157f62..65f3910 100644 --- a/openapi_generated/pinterest_client/model/related_terms_related_terms_list.py +++ b/openapi_generated/pinterest_client/model/related_terms_related_terms_list.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/reporting_column_async.py b/openapi_generated/pinterest_client/model/reporting_column_async.py index 1cc4b9b..658decd 100644 --- a/openapi_generated/pinterest_client/model/reporting_column_async.py +++ b/openapi_generated/pinterest_client/model/reporting_column_async.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -92,6 +92,7 @@ class ReportingColumnAsync(ModelSimple): 'AD_GROUP_STATUS': "AD_GROUP_STATUS", 'AD_GROUP_ENTITY_STATUS': "AD_GROUP_ENTITY_STATUS", 'PRODUCT_GROUP_ID': "PRODUCT_GROUP_ID", + 'PRODUCT_GROUP_STATUS': "PRODUCT_GROUP_STATUS", 'ORDER_LINE_ID': "ORDER_LINE_ID", 'ORDER_LINE_NAME': "ORDER_LINE_NAME", 'CLICKTHROUGH_1': "CLICKTHROUGH_1", @@ -108,6 +109,7 @@ class ReportingColumnAsync(ModelSimple): 'TOTAL_IMPRESSION': "TOTAL_IMPRESSION", 'TOTAL_IMPRESSION_USER': "TOTAL_IMPRESSION_USER", 'TOTAL_IMPRESSION_FREQUENCY': "TOTAL_IMPRESSION_FREQUENCY", + 'COST_PER_OUTBOUND_CLICK_IN_DOLLAR': "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", 'TOTAL_ENGAGEMENT_PAGE_VISIT': "TOTAL_ENGAGEMENT_PAGE_VISIT", 'TOTAL_ENGAGEMENT_SIGNUP': "TOTAL_ENGAGEMENT_SIGNUP", 'TOTAL_ENGAGEMENT_CHECKOUT': "TOTAL_ENGAGEMENT_CHECKOUT", @@ -318,11 +320,20 @@ class ReportingColumnAsync(ModelSimple): 'TOTAL_SIGNUP': "TOTAL_SIGNUP", 'TOTAL_CHECKOUT': "TOTAL_CHECKOUT", 'TOTAL_CUSTOM': "TOTAL_CUSTOM", + 'TOTAL_ADD_TO_CART': "TOTAL_ADD_TO_CART", 'TOTAL_LEAD': "TOTAL_LEAD", + 'TOTAL_SEARCH': "TOTAL_SEARCH", + 'TOTAL_WATCH_VIDEO': "TOTAL_WATCH_VIDEO", + 'TOTAL_VIEW_CATEGORY': "TOTAL_VIEW_CATEGORY", 'TOTAL_APP_INSTALL': "TOTAL_APP_INSTALL", 'TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR': "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR", 'TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR': "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", 'TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR': "TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR", + 'TOTAL_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR': "TOTAL_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", + 'TOTAL_LEAD_VALUE_IN_MICRO_DOLLAR': "TOTAL_LEAD_VALUE_IN_MICRO_DOLLAR", + 'TOTAL_SEARCH_VALUE_IN_MICRO_DOLLAR': "TOTAL_SEARCH_VALUE_IN_MICRO_DOLLAR", + 'TOTAL_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR': "TOTAL_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", + 'TOTAL_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR': "TOTAL_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", 'TOTAL_APP_INSTALL_VALUE_IN_MICRO_DOLLAR': "TOTAL_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", 'TOTAL_CHECKOUT_QUANTITY': "TOTAL_CHECKOUT_QUANTITY", 'PAGE_VISIT_COST_PER_ACTION': "PAGE_VISIT_COST_PER_ACTION", @@ -346,6 +357,7 @@ class ReportingColumnAsync(ModelSimple): 'VIDEO_P75_COMBINED_2': "VIDEO_P75_COMBINED_2", 'VIDEO_P95_COMBINED_2': "VIDEO_P95_COMBINED_2", 'VIDEO_MRC_VIEWS_2': "VIDEO_MRC_VIEWS_2", + 'PAID_VIDEO_VIEWABLE_RATE': "PAID_VIDEO_VIEWABLE_RATE", 'VIDEO_LENGTH': "VIDEO_LENGTH", 'CPV_IN_MICRO_DOLLAR': "CPV_IN_MICRO_DOLLAR", 'ECPV_IN_DOLLAR': "ECPV_IN_DOLLAR", @@ -364,6 +376,7 @@ class ReportingColumnAsync(ModelSimple): 'VIDEO_AVG_WATCHTIME_IN_SECOND_1': "VIDEO_AVG_WATCHTIME_IN_SECOND_1", 'VIDEO_AVG_WATCHTIME_IN_SECOND_2': "VIDEO_AVG_WATCHTIME_IN_SECOND_2", 'TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND': "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", + 'TOTAL_DESTINATION_VIEWS': "TOTAL_DESTINATION_VIEWS", 'TOTAL_REPIN_RATE': "TOTAL_REPIN_RATE", 'WEB_CHECKOUT_COST_PER_ACTION': "WEB_CHECKOUT_COST_PER_ACTION", 'WEB_CHECKOUT_ROAS': "WEB_CHECKOUT_ROAS", @@ -611,6 +624,7 @@ class ReportingColumnAsync(ModelSimple): 'TOTAL_WATCH_VIDEO_CONVERSION_RATE': "TOTAL_WATCH_VIDEO_CONVERSION_RATE", 'TOTAL_UNKNOWN_CONVERSION_RATE': "TOTAL_UNKNOWN_CONVERSION_RATE", 'TOTAL_CUSTOM_CONVERSION_RATE': "TOTAL_CUSTOM_CONVERSION_RATE", + 'STANDARD_AD_FEED_ITEM_ID': "STANDARD_AD_FEED_ITEM_ID", }, } @@ -662,10 +676,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Reporting columns., must be one of ["SPEND_IN_MICRO_DOLLAR", "PAID_IMPRESSION", "SPEND_IN_DOLLAR", "CPC_IN_MICRO_DOLLAR", "ECPC_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "CTR", "ECTR", "OUTBOUND_CTR", "COST_PER_OUTBOUND_CLICK", "CAMPAIGN_NAME", "CAMPAIGN_STATUS", "PIN_PROMOTION_STATUS", "AD_STATUS", "PIN_ID", "TOTAL_ENGAGEMENT", "ENGAGEMENT_1", "ENGAGEMENT_2", "ECPE_IN_DOLLAR", "ENGAGEMENT_RATE", "EENGAGEMENT_RATE", "ECPM_IN_MICRO_DOLLAR", "REPIN_RATE", "CTR_2", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_ACCOUNT_ID", "PIN_PROMOTION_ID", "AD_ID", "AD_GROUP_ID", "CAMPAIGN_ENTITY_STATUS", "CAMPAIGN_MANAGED_STATUS", "CAMPAIGN_OBJECTIVE_TYPE", "CPM_IN_MICRO_DOLLAR", "CPM_IN_DOLLAR", "AD_GROUP_NAME", "AD_GROUP_STATUS", "AD_GROUP_ENTITY_STATUS", "PRODUCT_GROUP_ID", "ORDER_LINE_ID", "ORDER_LINE_NAME", "CLICKTHROUGH_1", "REPIN_1", "IMPRESSION_1", "IMPRESSION_1_GROSS", "CLICKTHROUGH_1_GROSS", "OUTBOUND_CLICK_1", "CLICKTHROUGH_2", "REPIN_2", "IMPRESSION_2", "OUTBOUND_CLICK_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY", "TOTAL_ENGAGEMENT_PAGE_VISIT", "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_CUSTOM", "TOTAL_ENGAGEMENT_ADD_TO_CART", "TOTAL_ENGAGEMENT_LEAD", "TOTAL_ENGAGEMENT_SEARCH", "TOTAL_ENGAGEMENT_WATCH_VIDEO", "TOTAL_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_ENGAGEMENT_APP_INSTALL", "TOTAL_ENGAGEMENT_UNKNOWN", "TOTAL_CLICK_PAGE_VISIT", "TOTAL_CLICK_SIGNUP", "TOTAL_CLICK_CHECKOUT", "TOTAL_CLICK_CUSTOM", "TOTAL_CLICK_ADD_TO_CART", "TOTAL_CLICK_LEAD", "TOTAL_CLICK_SEARCH", "TOTAL_CLICK_WATCH_VIDEO", "TOTAL_CLICK_VIEW_CATEGORY", "TOTAL_CLICK_APP_INSTALL", "TOTAL_CLICK_UNKNOWN", "TOTAL_VIEW_PAGE_VISIT", "TOTAL_VIEW_SIGNUP", "TOTAL_VIEW_CHECKOUT", "TOTAL_VIEW_CUSTOM", "TOTAL_VIEW_ADD_TO_CART", "TOTAL_VIEW_LEAD", "TOTAL_VIEW_SEARCH", "TOTAL_VIEW_WATCH_VIDEO", "TOTAL_VIEW_VIEW_CATEGORY", "TOTAL_VIEW_APP_INSTALL", "TOTAL_VIEW_UNKNOWN", "TOTAL_CONVERSIONS", "TOTAL_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CONVERSIONS_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT_QUANTITY", "TOTAL_ENGAGEMENT_SIGNUP_QUANTITY", "TOTAL_ENGAGEMENT_CHECKOUT_QUANTITY", "TOTAL_ENGAGEMENT_CUSTOM_QUANTITY", "TOTAL_ENGAGEMENT_ADD_TO_CART_QUANTITY", "TOTAL_ENGAGEMENT_LEAD_QUANTITY", "TOTAL_ENGAGEMENT_SEARCH_QUANTITY", "TOTAL_ENGAGEMENT_WATCH_VIDEO_QUANTITY", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_QUANTITY", "TOTAL_ENGAGEMENT_UNKNOWN_QUANTITY", "TOTAL_CLICK_PAGE_VISIT_QUANTITY", "TOTAL_CLICK_SIGNUP_QUANTITY", "TOTAL_CLICK_CHECKOUT_QUANTITY", "TOTAL_CLICK_CUSTOM_QUANTITY", "TOTAL_CLICK_ADD_TO_CART_QUANTITY", "TOTAL_CLICK_LEAD_QUANTITY", "TOTAL_CLICK_SEARCH_QUANTITY", "TOTAL_CLICK_WATCH_VIDEO_QUANTITY", "TOTAL_CLICK_VIEW_CATEGORY_QUANTITY", "TOTAL_CLICK_UNKNOWN_QUANTITY", "TOTAL_VIEW_PAGE_VISIT_QUANTITY", "TOTAL_VIEW_SIGNUP_QUANTITY", "TOTAL_VIEW_CHECKOUT_QUANTITY", "TOTAL_VIEW_CUSTOM_QUANTITY", "TOTAL_VIEW_ADD_TO_CART_QUANTITY", "TOTAL_VIEW_LEAD_QUANTITY", "TOTAL_VIEW_SEARCH_QUANTITY", "TOTAL_VIEW_WATCH_VIDEO_QUANTITY", "TOTAL_VIEW_VIEW_CATEGORY_QUANTITY", "TOTAL_VIEW_UNKNOWN_QUANTITY", "TOTAL_CONVERSIONS_QUANTITY", "TOTAL_WEB_SESSIONS", "WEB_SESSIONS_1", "WEB_SESSIONS_2", "ONSITE_CHECKOUTS_1", "PIN_PROMOTION_NAME", "AD_NAME", "CAMPAIGN_LIFETIME_SPEND_CAP", "CAMPAIGN_DAILY_SPEND_CAP", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT", "TOTAL_SIGNUP", "TOTAL_CHECKOUT", "TOTAL_CUSTOM", "TOTAL_LEAD", "TOTAL_APP_INSTALL", "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_QUANTITY", "PAGE_VISIT_COST_PER_ACTION", "APP_INSTALL_COST_PER_ACTION", "PAGE_VISIT_ROAS", "CHECKOUT_ROAS", "CUSTOM_ROAS", "VIDEO_3SEC_VIEWS_1", "VIDEO_P100_COMPLETE_1", "VIDEO_P0_COMBINED_1", "VIDEO_P25_COMBINED_1", "VIDEO_P50_COMBINED_1", "VIDEO_P75_COMBINED_1", "VIDEO_P95_COMBINED_1", "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2", "VIDEO_P25_COMBINED_2", "VIDEO_P50_COMBINED_2", "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2", "VIDEO_LENGTH", "CPV_IN_MICRO_DOLLAR", "ECPV_IN_DOLLAR", "CPCV_IN_MICRO_DOLLAR", "ECPCV_IN_DOLLAR", "CPCV_P95_IN_MICRO_DOLLAR", "ECPCV_P95_IN_DOLLAR", "TOTAL_VIDEO_3SEC_VIEWS", "TOTAL_VIDEO_P100_COMPLETE", "TOTAL_VIDEO_P0_COMBINED", "TOTAL_VIDEO_P25_COMBINED", "TOTAL_VIDEO_P50_COMBINED", "TOTAL_VIDEO_P75_COMBINED", "TOTAL_VIDEO_P95_COMBINED", "TOTAL_VIDEO_MRC_VIEWS", "VIDEO_AVG_WATCHTIME_IN_SECOND_1", "VIDEO_AVG_WATCHTIME_IN_SECOND_2", "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", "TOTAL_REPIN_RATE", "WEB_CHECKOUT_COST_PER_ACTION", "WEB_CHECKOUT_ROAS", "TOTAL_WEB_CHECKOUT", "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CHECKOUT", "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CHECKOUT", "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CHECKOUT", "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "INAPP_CHECKOUT_COST_PER_ACTION", "INAPP_CHECKOUT_ROAS", "TOTAL_INAPP_CHECKOUT", "TOTAL_INAPP_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_CHECKOUT", "TOTAL_INAPP_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_CHECKOUT", "TOTAL_INAPP_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CHECKOUT_COST_PER_ACTION", "OFFLINE_CHECKOUT_ROAS", "TOTAL_OFFLINE_CHECKOUT", "TOTAL_OFFLINE_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CHECKOUT", "TOTAL_OFFLINE_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CHECKOUT", "TOTAL_OFFLINE_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "PINTEREST_CHECKOUT_COST_PER_ACTION", "PINTEREST_CHECKOUT_ROAS", "TOTAL_PINTEREST_CHECKOUT", "TOTAL_PINTEREST_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "WEB_ADD_TO_CART_COST_PER_ACTION", "WEB_ADD_TO_CART_ROAS", "TOTAL_WEB_ADD_TO_CART", "TOTAL_WEB_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_ADD_TO_CART", "TOTAL_WEB_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_ADD_TO_CART", "TOTAL_WEB_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "INAPP_ADD_TO_CART_COST_PER_ACTION", "INAPP_ADD_TO_CART_ROAS", "TOTAL_INAPP_ADD_TO_CART", "TOTAL_INAPP_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_ADD_TO_CART", "TOTAL_INAPP_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_ADD_TO_CART", "TOTAL_INAPP_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "WEB_PAGE_VISIT_COST_PER_ACTION", "WEB_PAGE_VISIT_ROAS", "TOTAL_WEB_PAGE_VISIT", "TOTAL_WEB_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_PAGE_VISIT", "TOTAL_WEB_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_PAGE_VISIT", "TOTAL_WEB_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "WEB_SIGNUP_COST_PER_ACTION", "WEB_SIGNUP_ROAS", "TOTAL_WEB_SIGNUP", "TOTAL_WEB_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SIGNUP", "TOTAL_WEB_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SIGNUP", "TOTAL_WEB_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SIGNUP", "TOTAL_WEB_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "INAPP_SIGNUP_COST_PER_ACTION", "INAPP_SIGNUP_ROAS", "TOTAL_INAPP_SIGNUP", "TOTAL_INAPP_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SIGNUP", "TOTAL_INAPP_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SIGNUP", "TOTAL_INAPP_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SIGNUP", "TOTAL_INAPP_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "OFFLINE_SIGNUP_COST_PER_ACTION", "OFFLINE_SIGNUP_ROAS", "TOTAL_OFFLINE_SIGNUP", "TOTAL_OFFLINE_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_SIGNUP", "TOTAL_OFFLINE_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_SIGNUP", "TOTAL_OFFLINE_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "WEB_WATCH_VIDEO_COST_PER_ACTION", "WEB_WATCH_VIDEO_ROAS", "TOTAL_WEB_WATCH_VIDEO", "TOTAL_WEB_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_WATCH_VIDEO", "TOTAL_WEB_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_WATCH_VIDEO", "TOTAL_WEB_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "WEB_LEAD_COST_PER_ACTION", "WEB_LEAD_ROAS", "TOTAL_WEB_LEAD", "TOTAL_WEB_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_LEAD", "TOTAL_WEB_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_LEAD", "TOTAL_WEB_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_LEAD", "TOTAL_WEB_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "OFFLINE_LEAD_COST_PER_ACTION", "OFFLINE_LEAD_ROAS", "TOTAL_OFFLINE_LEAD", "TOTAL_OFFLINE_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_LEAD", "TOTAL_OFFLINE_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_LEAD", "TOTAL_OFFLINE_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_LEAD", "TOTAL_OFFLINE_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "WEB_SEARCH_COST_PER_ACTION", "WEB_SEARCH_ROAS", "TOTAL_WEB_SEARCH", "TOTAL_WEB_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SEARCH", "TOTAL_WEB_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SEARCH", "TOTAL_WEB_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SEARCH", "TOTAL_WEB_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "INAPP_SEARCH_COST_PER_ACTION", "INAPP_SEARCH_ROAS", "TOTAL_INAPP_SEARCH", "TOTAL_INAPP_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SEARCH", "TOTAL_INAPP_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SEARCH", "TOTAL_INAPP_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SEARCH", "TOTAL_INAPP_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "WEB_VIEW_CATEGORY_COST_PER_ACTION", "WEB_VIEW_CATEGORY_ROAS", "TOTAL_WEB_VIEW_CATEGORY", "TOTAL_WEB_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_VIEW_CATEGORY", "TOTAL_WEB_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_VIEW_CATEGORY", "TOTAL_WEB_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "WEB_CUSTOM_COST_PER_ACTION", "WEB_CUSTOM_ROAS", "TOTAL_WEB_CUSTOM", "TOTAL_WEB_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CUSTOM", "TOTAL_WEB_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CUSTOM", "TOTAL_WEB_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CUSTOM", "TOTAL_WEB_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CUSTOM_COST_PER_ACTION", "OFFLINE_CUSTOM_ROAS", "TOTAL_OFFLINE_CUSTOM", "TOTAL_OFFLINE_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CUSTOM", "TOTAL_OFFLINE_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CUSTOM", "TOTAL_OFFLINE_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "WEB_UNKNOWN_COST_PER_ACTION", "WEB_UNKNOWN_ROAS", "TOTAL_WEB_UNKNOWN", "TOTAL_WEB_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_UNKNOWN", "TOTAL_WEB_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_UNKNOWN", "TOTAL_WEB_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_UNKNOWN", "TOTAL_WEB_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_UNKNOWN_COST_PER_ACTION", "INAPP_UNKNOWN_ROAS", "TOTAL_INAPP_UNKNOWN", "TOTAL_INAPP_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_UNKNOWN", "TOTAL_INAPP_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_UNKNOWN", "TOTAL_INAPP_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "OFFLINE_UNKNOWN_COST_PER_ACTION", "OFFLINE_UNKNOWN_ROAS", "TOTAL_OFFLINE_UNKNOWN", "TOTAL_OFFLINE_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_UNKNOWN", "TOTAL_OFFLINE_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_UNKNOWN", "TOTAL_OFFLINE_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_APP_INSTALL_COST_PER_ACTION", "INAPP_APP_INSTALL_ROAS", "TOTAL_INAPP_APP_INSTALL", "TOTAL_INAPP_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_APP_INSTALL", "TOTAL_INAPP_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_APP_INSTALL", "TOTAL_INAPP_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "IDEA_PIN_PRODUCT_TAG_VISIT_1", "IDEA_PIN_PRODUCT_TAG_VISIT_2", "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT", "LEADS", "COST_PER_LEAD", "QUIZ_COMPLETED", "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH", "SHOWCASE_SUBPIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_IMPRESSION", "SHOWCASE_SUBPIN_IMPRESSION", "SHOWCASE_SUBPAGE_SWIPE_LEFT", "SHOWCASE_SUBPAGE_SWIPE_RIGHT", "SHOWCASE_SUBPIN_SWIPE_LEFT", "SHOWCASE_SUBPIN_SWIPE_RIGHT", "SHOWCASE_SUBPAGE_REPIN", "SHOWCASE_SUBPIN_REPIN", "SHOWCASE_SUBPAGE_CLOSEUP", "SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD", "SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD", "SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION", "TOTAL_CHECKOUT_CONVERSION_RATE", "TOTAL_VIEW_CATEGORY_CONVERSION_RATE", "TOTAL_ADD_TO_CART_CONVERSION_RATE", "TOTAL_SIGNUP_CONVERSION_RATE", "TOTAL_PAGE_VISIT_CONVERSION_RATE", "TOTAL_LEAD_CONVERSION_RATE", "TOTAL_SEARCH_CONVERSION_RATE", "TOTAL_WATCH_VIDEO_CONVERSION_RATE", "TOTAL_UNKNOWN_CONVERSION_RATE", "TOTAL_CUSTOM_CONVERSION_RATE", ] # noqa: E501 + args[0] (str): Reporting columns., must be one of ["SPEND_IN_MICRO_DOLLAR", "PAID_IMPRESSION", "SPEND_IN_DOLLAR", "CPC_IN_MICRO_DOLLAR", "ECPC_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "CTR", "ECTR", "OUTBOUND_CTR", "COST_PER_OUTBOUND_CLICK", "CAMPAIGN_NAME", "CAMPAIGN_STATUS", "PIN_PROMOTION_STATUS", "AD_STATUS", "PIN_ID", "TOTAL_ENGAGEMENT", "ENGAGEMENT_1", "ENGAGEMENT_2", "ECPE_IN_DOLLAR", "ENGAGEMENT_RATE", "EENGAGEMENT_RATE", "ECPM_IN_MICRO_DOLLAR", "REPIN_RATE", "CTR_2", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_ACCOUNT_ID", "PIN_PROMOTION_ID", "AD_ID", "AD_GROUP_ID", "CAMPAIGN_ENTITY_STATUS", "CAMPAIGN_MANAGED_STATUS", "CAMPAIGN_OBJECTIVE_TYPE", "CPM_IN_MICRO_DOLLAR", "CPM_IN_DOLLAR", "AD_GROUP_NAME", "AD_GROUP_STATUS", "AD_GROUP_ENTITY_STATUS", "PRODUCT_GROUP_ID", "PRODUCT_GROUP_STATUS", "ORDER_LINE_ID", "ORDER_LINE_NAME", "CLICKTHROUGH_1", "REPIN_1", "IMPRESSION_1", "IMPRESSION_1_GROSS", "CLICKTHROUGH_1_GROSS", "OUTBOUND_CLICK_1", "CLICKTHROUGH_2", "REPIN_2", "IMPRESSION_2", "OUTBOUND_CLICK_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY", "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT", "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_CUSTOM", "TOTAL_ENGAGEMENT_ADD_TO_CART", "TOTAL_ENGAGEMENT_LEAD", "TOTAL_ENGAGEMENT_SEARCH", "TOTAL_ENGAGEMENT_WATCH_VIDEO", "TOTAL_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_ENGAGEMENT_APP_INSTALL", "TOTAL_ENGAGEMENT_UNKNOWN", "TOTAL_CLICK_PAGE_VISIT", "TOTAL_CLICK_SIGNUP", "TOTAL_CLICK_CHECKOUT", "TOTAL_CLICK_CUSTOM", "TOTAL_CLICK_ADD_TO_CART", "TOTAL_CLICK_LEAD", "TOTAL_CLICK_SEARCH", "TOTAL_CLICK_WATCH_VIDEO", "TOTAL_CLICK_VIEW_CATEGORY", "TOTAL_CLICK_APP_INSTALL", "TOTAL_CLICK_UNKNOWN", "TOTAL_VIEW_PAGE_VISIT", "TOTAL_VIEW_SIGNUP", "TOTAL_VIEW_CHECKOUT", "TOTAL_VIEW_CUSTOM", "TOTAL_VIEW_ADD_TO_CART", "TOTAL_VIEW_LEAD", "TOTAL_VIEW_SEARCH", "TOTAL_VIEW_WATCH_VIDEO", "TOTAL_VIEW_VIEW_CATEGORY", "TOTAL_VIEW_APP_INSTALL", "TOTAL_VIEW_UNKNOWN", "TOTAL_CONVERSIONS", "TOTAL_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CONVERSIONS_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT_QUANTITY", "TOTAL_ENGAGEMENT_SIGNUP_QUANTITY", "TOTAL_ENGAGEMENT_CHECKOUT_QUANTITY", "TOTAL_ENGAGEMENT_CUSTOM_QUANTITY", "TOTAL_ENGAGEMENT_ADD_TO_CART_QUANTITY", "TOTAL_ENGAGEMENT_LEAD_QUANTITY", "TOTAL_ENGAGEMENT_SEARCH_QUANTITY", "TOTAL_ENGAGEMENT_WATCH_VIDEO_QUANTITY", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_QUANTITY", "TOTAL_ENGAGEMENT_UNKNOWN_QUANTITY", "TOTAL_CLICK_PAGE_VISIT_QUANTITY", "TOTAL_CLICK_SIGNUP_QUANTITY", "TOTAL_CLICK_CHECKOUT_QUANTITY", "TOTAL_CLICK_CUSTOM_QUANTITY", "TOTAL_CLICK_ADD_TO_CART_QUANTITY", "TOTAL_CLICK_LEAD_QUANTITY", "TOTAL_CLICK_SEARCH_QUANTITY", "TOTAL_CLICK_WATCH_VIDEO_QUANTITY", "TOTAL_CLICK_VIEW_CATEGORY_QUANTITY", "TOTAL_CLICK_UNKNOWN_QUANTITY", "TOTAL_VIEW_PAGE_VISIT_QUANTITY", "TOTAL_VIEW_SIGNUP_QUANTITY", "TOTAL_VIEW_CHECKOUT_QUANTITY", "TOTAL_VIEW_CUSTOM_QUANTITY", "TOTAL_VIEW_ADD_TO_CART_QUANTITY", "TOTAL_VIEW_LEAD_QUANTITY", "TOTAL_VIEW_SEARCH_QUANTITY", "TOTAL_VIEW_WATCH_VIDEO_QUANTITY", "TOTAL_VIEW_VIEW_CATEGORY_QUANTITY", "TOTAL_VIEW_UNKNOWN_QUANTITY", "TOTAL_CONVERSIONS_QUANTITY", "TOTAL_WEB_SESSIONS", "WEB_SESSIONS_1", "WEB_SESSIONS_2", "ONSITE_CHECKOUTS_1", "PIN_PROMOTION_NAME", "AD_NAME", "CAMPAIGN_LIFETIME_SPEND_CAP", "CAMPAIGN_DAILY_SPEND_CAP", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT", "TOTAL_SIGNUP", "TOTAL_CHECKOUT", "TOTAL_CUSTOM", "TOTAL_ADD_TO_CART", "TOTAL_LEAD", "TOTAL_SEARCH", "TOTAL_WATCH_VIDEO", "TOTAL_VIEW_CATEGORY", "TOTAL_APP_INSTALL", "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_QUANTITY", "PAGE_VISIT_COST_PER_ACTION", "APP_INSTALL_COST_PER_ACTION", "PAGE_VISIT_ROAS", "CHECKOUT_ROAS", "CUSTOM_ROAS", "VIDEO_3SEC_VIEWS_1", "VIDEO_P100_COMPLETE_1", "VIDEO_P0_COMBINED_1", "VIDEO_P25_COMBINED_1", "VIDEO_P50_COMBINED_1", "VIDEO_P75_COMBINED_1", "VIDEO_P95_COMBINED_1", "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2", "VIDEO_P25_COMBINED_2", "VIDEO_P50_COMBINED_2", "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2", "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH", "CPV_IN_MICRO_DOLLAR", "ECPV_IN_DOLLAR", "CPCV_IN_MICRO_DOLLAR", "ECPCV_IN_DOLLAR", "CPCV_P95_IN_MICRO_DOLLAR", "ECPCV_P95_IN_DOLLAR", "TOTAL_VIDEO_3SEC_VIEWS", "TOTAL_VIDEO_P100_COMPLETE", "TOTAL_VIDEO_P0_COMBINED", "TOTAL_VIDEO_P25_COMBINED", "TOTAL_VIDEO_P50_COMBINED", "TOTAL_VIDEO_P75_COMBINED", "TOTAL_VIDEO_P95_COMBINED", "TOTAL_VIDEO_MRC_VIEWS", "VIDEO_AVG_WATCHTIME_IN_SECOND_1", "VIDEO_AVG_WATCHTIME_IN_SECOND_2", "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", "TOTAL_DESTINATION_VIEWS", "TOTAL_REPIN_RATE", "WEB_CHECKOUT_COST_PER_ACTION", "WEB_CHECKOUT_ROAS", "TOTAL_WEB_CHECKOUT", "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CHECKOUT", "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CHECKOUT", "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CHECKOUT", "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "INAPP_CHECKOUT_COST_PER_ACTION", "INAPP_CHECKOUT_ROAS", "TOTAL_INAPP_CHECKOUT", "TOTAL_INAPP_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_CHECKOUT", "TOTAL_INAPP_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_CHECKOUT", "TOTAL_INAPP_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CHECKOUT_COST_PER_ACTION", "OFFLINE_CHECKOUT_ROAS", "TOTAL_OFFLINE_CHECKOUT", "TOTAL_OFFLINE_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CHECKOUT", "TOTAL_OFFLINE_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CHECKOUT", "TOTAL_OFFLINE_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "PINTEREST_CHECKOUT_COST_PER_ACTION", "PINTEREST_CHECKOUT_ROAS", "TOTAL_PINTEREST_CHECKOUT", "TOTAL_PINTEREST_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "WEB_ADD_TO_CART_COST_PER_ACTION", "WEB_ADD_TO_CART_ROAS", "TOTAL_WEB_ADD_TO_CART", "TOTAL_WEB_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_ADD_TO_CART", "TOTAL_WEB_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_ADD_TO_CART", "TOTAL_WEB_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "INAPP_ADD_TO_CART_COST_PER_ACTION", "INAPP_ADD_TO_CART_ROAS", "TOTAL_INAPP_ADD_TO_CART", "TOTAL_INAPP_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_ADD_TO_CART", "TOTAL_INAPP_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_ADD_TO_CART", "TOTAL_INAPP_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "WEB_PAGE_VISIT_COST_PER_ACTION", "WEB_PAGE_VISIT_ROAS", "TOTAL_WEB_PAGE_VISIT", "TOTAL_WEB_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_PAGE_VISIT", "TOTAL_WEB_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_PAGE_VISIT", "TOTAL_WEB_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "WEB_SIGNUP_COST_PER_ACTION", "WEB_SIGNUP_ROAS", "TOTAL_WEB_SIGNUP", "TOTAL_WEB_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SIGNUP", "TOTAL_WEB_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SIGNUP", "TOTAL_WEB_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SIGNUP", "TOTAL_WEB_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "INAPP_SIGNUP_COST_PER_ACTION", "INAPP_SIGNUP_ROAS", "TOTAL_INAPP_SIGNUP", "TOTAL_INAPP_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SIGNUP", "TOTAL_INAPP_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SIGNUP", "TOTAL_INAPP_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SIGNUP", "TOTAL_INAPP_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "OFFLINE_SIGNUP_COST_PER_ACTION", "OFFLINE_SIGNUP_ROAS", "TOTAL_OFFLINE_SIGNUP", "TOTAL_OFFLINE_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_SIGNUP", "TOTAL_OFFLINE_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_SIGNUP", "TOTAL_OFFLINE_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "WEB_WATCH_VIDEO_COST_PER_ACTION", "WEB_WATCH_VIDEO_ROAS", "TOTAL_WEB_WATCH_VIDEO", "TOTAL_WEB_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_WATCH_VIDEO", "TOTAL_WEB_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_WATCH_VIDEO", "TOTAL_WEB_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "WEB_LEAD_COST_PER_ACTION", "WEB_LEAD_ROAS", "TOTAL_WEB_LEAD", "TOTAL_WEB_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_LEAD", "TOTAL_WEB_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_LEAD", "TOTAL_WEB_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_LEAD", "TOTAL_WEB_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "OFFLINE_LEAD_COST_PER_ACTION", "OFFLINE_LEAD_ROAS", "TOTAL_OFFLINE_LEAD", "TOTAL_OFFLINE_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_LEAD", "TOTAL_OFFLINE_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_LEAD", "TOTAL_OFFLINE_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_LEAD", "TOTAL_OFFLINE_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "WEB_SEARCH_COST_PER_ACTION", "WEB_SEARCH_ROAS", "TOTAL_WEB_SEARCH", "TOTAL_WEB_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SEARCH", "TOTAL_WEB_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SEARCH", "TOTAL_WEB_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SEARCH", "TOTAL_WEB_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "INAPP_SEARCH_COST_PER_ACTION", "INAPP_SEARCH_ROAS", "TOTAL_INAPP_SEARCH", "TOTAL_INAPP_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SEARCH", "TOTAL_INAPP_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SEARCH", "TOTAL_INAPP_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SEARCH", "TOTAL_INAPP_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "WEB_VIEW_CATEGORY_COST_PER_ACTION", "WEB_VIEW_CATEGORY_ROAS", "TOTAL_WEB_VIEW_CATEGORY", "TOTAL_WEB_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_VIEW_CATEGORY", "TOTAL_WEB_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_VIEW_CATEGORY", "TOTAL_WEB_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "WEB_CUSTOM_COST_PER_ACTION", "WEB_CUSTOM_ROAS", "TOTAL_WEB_CUSTOM", "TOTAL_WEB_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CUSTOM", "TOTAL_WEB_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CUSTOM", "TOTAL_WEB_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CUSTOM", "TOTAL_WEB_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CUSTOM_COST_PER_ACTION", "OFFLINE_CUSTOM_ROAS", "TOTAL_OFFLINE_CUSTOM", "TOTAL_OFFLINE_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CUSTOM", "TOTAL_OFFLINE_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CUSTOM", "TOTAL_OFFLINE_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "WEB_UNKNOWN_COST_PER_ACTION", "WEB_UNKNOWN_ROAS", "TOTAL_WEB_UNKNOWN", "TOTAL_WEB_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_UNKNOWN", "TOTAL_WEB_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_UNKNOWN", "TOTAL_WEB_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_UNKNOWN", "TOTAL_WEB_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_UNKNOWN_COST_PER_ACTION", "INAPP_UNKNOWN_ROAS", "TOTAL_INAPP_UNKNOWN", "TOTAL_INAPP_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_UNKNOWN", "TOTAL_INAPP_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_UNKNOWN", "TOTAL_INAPP_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "OFFLINE_UNKNOWN_COST_PER_ACTION", "OFFLINE_UNKNOWN_ROAS", "TOTAL_OFFLINE_UNKNOWN", "TOTAL_OFFLINE_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_UNKNOWN", "TOTAL_OFFLINE_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_UNKNOWN", "TOTAL_OFFLINE_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_APP_INSTALL_COST_PER_ACTION", "INAPP_APP_INSTALL_ROAS", "TOTAL_INAPP_APP_INSTALL", "TOTAL_INAPP_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_APP_INSTALL", "TOTAL_INAPP_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_APP_INSTALL", "TOTAL_INAPP_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "IDEA_PIN_PRODUCT_TAG_VISIT_1", "IDEA_PIN_PRODUCT_TAG_VISIT_2", "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT", "LEADS", "COST_PER_LEAD", "QUIZ_COMPLETED", "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH", "SHOWCASE_SUBPIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_IMPRESSION", "SHOWCASE_SUBPIN_IMPRESSION", "SHOWCASE_SUBPAGE_SWIPE_LEFT", "SHOWCASE_SUBPAGE_SWIPE_RIGHT", "SHOWCASE_SUBPIN_SWIPE_LEFT", "SHOWCASE_SUBPIN_SWIPE_RIGHT", "SHOWCASE_SUBPAGE_REPIN", "SHOWCASE_SUBPIN_REPIN", "SHOWCASE_SUBPAGE_CLOSEUP", "SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD", "SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD", "SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION", "TOTAL_CHECKOUT_CONVERSION_RATE", "TOTAL_VIEW_CATEGORY_CONVERSION_RATE", "TOTAL_ADD_TO_CART_CONVERSION_RATE", "TOTAL_SIGNUP_CONVERSION_RATE", "TOTAL_PAGE_VISIT_CONVERSION_RATE", "TOTAL_LEAD_CONVERSION_RATE", "TOTAL_SEARCH_CONVERSION_RATE", "TOTAL_WATCH_VIDEO_CONVERSION_RATE", "TOTAL_UNKNOWN_CONVERSION_RATE", "TOTAL_CUSTOM_CONVERSION_RATE", "STANDARD_AD_FEED_ITEM_ID", ] # noqa: E501 Keyword Args: - value (str): Reporting columns., must be one of ["SPEND_IN_MICRO_DOLLAR", "PAID_IMPRESSION", "SPEND_IN_DOLLAR", "CPC_IN_MICRO_DOLLAR", "ECPC_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "CTR", "ECTR", "OUTBOUND_CTR", "COST_PER_OUTBOUND_CLICK", "CAMPAIGN_NAME", "CAMPAIGN_STATUS", "PIN_PROMOTION_STATUS", "AD_STATUS", "PIN_ID", "TOTAL_ENGAGEMENT", "ENGAGEMENT_1", "ENGAGEMENT_2", "ECPE_IN_DOLLAR", "ENGAGEMENT_RATE", "EENGAGEMENT_RATE", "ECPM_IN_MICRO_DOLLAR", "REPIN_RATE", "CTR_2", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_ACCOUNT_ID", "PIN_PROMOTION_ID", "AD_ID", "AD_GROUP_ID", "CAMPAIGN_ENTITY_STATUS", "CAMPAIGN_MANAGED_STATUS", "CAMPAIGN_OBJECTIVE_TYPE", "CPM_IN_MICRO_DOLLAR", "CPM_IN_DOLLAR", "AD_GROUP_NAME", "AD_GROUP_STATUS", "AD_GROUP_ENTITY_STATUS", "PRODUCT_GROUP_ID", "ORDER_LINE_ID", "ORDER_LINE_NAME", "CLICKTHROUGH_1", "REPIN_1", "IMPRESSION_1", "IMPRESSION_1_GROSS", "CLICKTHROUGH_1_GROSS", "OUTBOUND_CLICK_1", "CLICKTHROUGH_2", "REPIN_2", "IMPRESSION_2", "OUTBOUND_CLICK_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY", "TOTAL_ENGAGEMENT_PAGE_VISIT", "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_CUSTOM", "TOTAL_ENGAGEMENT_ADD_TO_CART", "TOTAL_ENGAGEMENT_LEAD", "TOTAL_ENGAGEMENT_SEARCH", "TOTAL_ENGAGEMENT_WATCH_VIDEO", "TOTAL_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_ENGAGEMENT_APP_INSTALL", "TOTAL_ENGAGEMENT_UNKNOWN", "TOTAL_CLICK_PAGE_VISIT", "TOTAL_CLICK_SIGNUP", "TOTAL_CLICK_CHECKOUT", "TOTAL_CLICK_CUSTOM", "TOTAL_CLICK_ADD_TO_CART", "TOTAL_CLICK_LEAD", "TOTAL_CLICK_SEARCH", "TOTAL_CLICK_WATCH_VIDEO", "TOTAL_CLICK_VIEW_CATEGORY", "TOTAL_CLICK_APP_INSTALL", "TOTAL_CLICK_UNKNOWN", "TOTAL_VIEW_PAGE_VISIT", "TOTAL_VIEW_SIGNUP", "TOTAL_VIEW_CHECKOUT", "TOTAL_VIEW_CUSTOM", "TOTAL_VIEW_ADD_TO_CART", "TOTAL_VIEW_LEAD", "TOTAL_VIEW_SEARCH", "TOTAL_VIEW_WATCH_VIDEO", "TOTAL_VIEW_VIEW_CATEGORY", "TOTAL_VIEW_APP_INSTALL", "TOTAL_VIEW_UNKNOWN", "TOTAL_CONVERSIONS", "TOTAL_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CONVERSIONS_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT_QUANTITY", "TOTAL_ENGAGEMENT_SIGNUP_QUANTITY", "TOTAL_ENGAGEMENT_CHECKOUT_QUANTITY", "TOTAL_ENGAGEMENT_CUSTOM_QUANTITY", "TOTAL_ENGAGEMENT_ADD_TO_CART_QUANTITY", "TOTAL_ENGAGEMENT_LEAD_QUANTITY", "TOTAL_ENGAGEMENT_SEARCH_QUANTITY", "TOTAL_ENGAGEMENT_WATCH_VIDEO_QUANTITY", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_QUANTITY", "TOTAL_ENGAGEMENT_UNKNOWN_QUANTITY", "TOTAL_CLICK_PAGE_VISIT_QUANTITY", "TOTAL_CLICK_SIGNUP_QUANTITY", "TOTAL_CLICK_CHECKOUT_QUANTITY", "TOTAL_CLICK_CUSTOM_QUANTITY", "TOTAL_CLICK_ADD_TO_CART_QUANTITY", "TOTAL_CLICK_LEAD_QUANTITY", "TOTAL_CLICK_SEARCH_QUANTITY", "TOTAL_CLICK_WATCH_VIDEO_QUANTITY", "TOTAL_CLICK_VIEW_CATEGORY_QUANTITY", "TOTAL_CLICK_UNKNOWN_QUANTITY", "TOTAL_VIEW_PAGE_VISIT_QUANTITY", "TOTAL_VIEW_SIGNUP_QUANTITY", "TOTAL_VIEW_CHECKOUT_QUANTITY", "TOTAL_VIEW_CUSTOM_QUANTITY", "TOTAL_VIEW_ADD_TO_CART_QUANTITY", "TOTAL_VIEW_LEAD_QUANTITY", "TOTAL_VIEW_SEARCH_QUANTITY", "TOTAL_VIEW_WATCH_VIDEO_QUANTITY", "TOTAL_VIEW_VIEW_CATEGORY_QUANTITY", "TOTAL_VIEW_UNKNOWN_QUANTITY", "TOTAL_CONVERSIONS_QUANTITY", "TOTAL_WEB_SESSIONS", "WEB_SESSIONS_1", "WEB_SESSIONS_2", "ONSITE_CHECKOUTS_1", "PIN_PROMOTION_NAME", "AD_NAME", "CAMPAIGN_LIFETIME_SPEND_CAP", "CAMPAIGN_DAILY_SPEND_CAP", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT", "TOTAL_SIGNUP", "TOTAL_CHECKOUT", "TOTAL_CUSTOM", "TOTAL_LEAD", "TOTAL_APP_INSTALL", "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_QUANTITY", "PAGE_VISIT_COST_PER_ACTION", "APP_INSTALL_COST_PER_ACTION", "PAGE_VISIT_ROAS", "CHECKOUT_ROAS", "CUSTOM_ROAS", "VIDEO_3SEC_VIEWS_1", "VIDEO_P100_COMPLETE_1", "VIDEO_P0_COMBINED_1", "VIDEO_P25_COMBINED_1", "VIDEO_P50_COMBINED_1", "VIDEO_P75_COMBINED_1", "VIDEO_P95_COMBINED_1", "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2", "VIDEO_P25_COMBINED_2", "VIDEO_P50_COMBINED_2", "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2", "VIDEO_LENGTH", "CPV_IN_MICRO_DOLLAR", "ECPV_IN_DOLLAR", "CPCV_IN_MICRO_DOLLAR", "ECPCV_IN_DOLLAR", "CPCV_P95_IN_MICRO_DOLLAR", "ECPCV_P95_IN_DOLLAR", "TOTAL_VIDEO_3SEC_VIEWS", "TOTAL_VIDEO_P100_COMPLETE", "TOTAL_VIDEO_P0_COMBINED", "TOTAL_VIDEO_P25_COMBINED", "TOTAL_VIDEO_P50_COMBINED", "TOTAL_VIDEO_P75_COMBINED", "TOTAL_VIDEO_P95_COMBINED", "TOTAL_VIDEO_MRC_VIEWS", "VIDEO_AVG_WATCHTIME_IN_SECOND_1", "VIDEO_AVG_WATCHTIME_IN_SECOND_2", "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", "TOTAL_REPIN_RATE", "WEB_CHECKOUT_COST_PER_ACTION", "WEB_CHECKOUT_ROAS", "TOTAL_WEB_CHECKOUT", "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CHECKOUT", "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CHECKOUT", "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CHECKOUT", "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "INAPP_CHECKOUT_COST_PER_ACTION", "INAPP_CHECKOUT_ROAS", "TOTAL_INAPP_CHECKOUT", "TOTAL_INAPP_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_CHECKOUT", "TOTAL_INAPP_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_CHECKOUT", "TOTAL_INAPP_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CHECKOUT_COST_PER_ACTION", "OFFLINE_CHECKOUT_ROAS", "TOTAL_OFFLINE_CHECKOUT", "TOTAL_OFFLINE_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CHECKOUT", "TOTAL_OFFLINE_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CHECKOUT", "TOTAL_OFFLINE_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "PINTEREST_CHECKOUT_COST_PER_ACTION", "PINTEREST_CHECKOUT_ROAS", "TOTAL_PINTEREST_CHECKOUT", "TOTAL_PINTEREST_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "WEB_ADD_TO_CART_COST_PER_ACTION", "WEB_ADD_TO_CART_ROAS", "TOTAL_WEB_ADD_TO_CART", "TOTAL_WEB_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_ADD_TO_CART", "TOTAL_WEB_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_ADD_TO_CART", "TOTAL_WEB_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "INAPP_ADD_TO_CART_COST_PER_ACTION", "INAPP_ADD_TO_CART_ROAS", "TOTAL_INAPP_ADD_TO_CART", "TOTAL_INAPP_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_ADD_TO_CART", "TOTAL_INAPP_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_ADD_TO_CART", "TOTAL_INAPP_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "WEB_PAGE_VISIT_COST_PER_ACTION", "WEB_PAGE_VISIT_ROAS", "TOTAL_WEB_PAGE_VISIT", "TOTAL_WEB_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_PAGE_VISIT", "TOTAL_WEB_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_PAGE_VISIT", "TOTAL_WEB_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "WEB_SIGNUP_COST_PER_ACTION", "WEB_SIGNUP_ROAS", "TOTAL_WEB_SIGNUP", "TOTAL_WEB_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SIGNUP", "TOTAL_WEB_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SIGNUP", "TOTAL_WEB_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SIGNUP", "TOTAL_WEB_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "INAPP_SIGNUP_COST_PER_ACTION", "INAPP_SIGNUP_ROAS", "TOTAL_INAPP_SIGNUP", "TOTAL_INAPP_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SIGNUP", "TOTAL_INAPP_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SIGNUP", "TOTAL_INAPP_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SIGNUP", "TOTAL_INAPP_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "OFFLINE_SIGNUP_COST_PER_ACTION", "OFFLINE_SIGNUP_ROAS", "TOTAL_OFFLINE_SIGNUP", "TOTAL_OFFLINE_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_SIGNUP", "TOTAL_OFFLINE_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_SIGNUP", "TOTAL_OFFLINE_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "WEB_WATCH_VIDEO_COST_PER_ACTION", "WEB_WATCH_VIDEO_ROAS", "TOTAL_WEB_WATCH_VIDEO", "TOTAL_WEB_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_WATCH_VIDEO", "TOTAL_WEB_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_WATCH_VIDEO", "TOTAL_WEB_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "WEB_LEAD_COST_PER_ACTION", "WEB_LEAD_ROAS", "TOTAL_WEB_LEAD", "TOTAL_WEB_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_LEAD", "TOTAL_WEB_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_LEAD", "TOTAL_WEB_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_LEAD", "TOTAL_WEB_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "OFFLINE_LEAD_COST_PER_ACTION", "OFFLINE_LEAD_ROAS", "TOTAL_OFFLINE_LEAD", "TOTAL_OFFLINE_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_LEAD", "TOTAL_OFFLINE_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_LEAD", "TOTAL_OFFLINE_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_LEAD", "TOTAL_OFFLINE_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "WEB_SEARCH_COST_PER_ACTION", "WEB_SEARCH_ROAS", "TOTAL_WEB_SEARCH", "TOTAL_WEB_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SEARCH", "TOTAL_WEB_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SEARCH", "TOTAL_WEB_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SEARCH", "TOTAL_WEB_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "INAPP_SEARCH_COST_PER_ACTION", "INAPP_SEARCH_ROAS", "TOTAL_INAPP_SEARCH", "TOTAL_INAPP_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SEARCH", "TOTAL_INAPP_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SEARCH", "TOTAL_INAPP_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SEARCH", "TOTAL_INAPP_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "WEB_VIEW_CATEGORY_COST_PER_ACTION", "WEB_VIEW_CATEGORY_ROAS", "TOTAL_WEB_VIEW_CATEGORY", "TOTAL_WEB_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_VIEW_CATEGORY", "TOTAL_WEB_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_VIEW_CATEGORY", "TOTAL_WEB_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "WEB_CUSTOM_COST_PER_ACTION", "WEB_CUSTOM_ROAS", "TOTAL_WEB_CUSTOM", "TOTAL_WEB_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CUSTOM", "TOTAL_WEB_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CUSTOM", "TOTAL_WEB_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CUSTOM", "TOTAL_WEB_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CUSTOM_COST_PER_ACTION", "OFFLINE_CUSTOM_ROAS", "TOTAL_OFFLINE_CUSTOM", "TOTAL_OFFLINE_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CUSTOM", "TOTAL_OFFLINE_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CUSTOM", "TOTAL_OFFLINE_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "WEB_UNKNOWN_COST_PER_ACTION", "WEB_UNKNOWN_ROAS", "TOTAL_WEB_UNKNOWN", "TOTAL_WEB_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_UNKNOWN", "TOTAL_WEB_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_UNKNOWN", "TOTAL_WEB_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_UNKNOWN", "TOTAL_WEB_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_UNKNOWN_COST_PER_ACTION", "INAPP_UNKNOWN_ROAS", "TOTAL_INAPP_UNKNOWN", "TOTAL_INAPP_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_UNKNOWN", "TOTAL_INAPP_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_UNKNOWN", "TOTAL_INAPP_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "OFFLINE_UNKNOWN_COST_PER_ACTION", "OFFLINE_UNKNOWN_ROAS", "TOTAL_OFFLINE_UNKNOWN", "TOTAL_OFFLINE_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_UNKNOWN", "TOTAL_OFFLINE_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_UNKNOWN", "TOTAL_OFFLINE_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_APP_INSTALL_COST_PER_ACTION", "INAPP_APP_INSTALL_ROAS", "TOTAL_INAPP_APP_INSTALL", "TOTAL_INAPP_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_APP_INSTALL", "TOTAL_INAPP_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_APP_INSTALL", "TOTAL_INAPP_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "IDEA_PIN_PRODUCT_TAG_VISIT_1", "IDEA_PIN_PRODUCT_TAG_VISIT_2", "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT", "LEADS", "COST_PER_LEAD", "QUIZ_COMPLETED", "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH", "SHOWCASE_SUBPIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_IMPRESSION", "SHOWCASE_SUBPIN_IMPRESSION", "SHOWCASE_SUBPAGE_SWIPE_LEFT", "SHOWCASE_SUBPAGE_SWIPE_RIGHT", "SHOWCASE_SUBPIN_SWIPE_LEFT", "SHOWCASE_SUBPIN_SWIPE_RIGHT", "SHOWCASE_SUBPAGE_REPIN", "SHOWCASE_SUBPIN_REPIN", "SHOWCASE_SUBPAGE_CLOSEUP", "SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD", "SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD", "SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION", "TOTAL_CHECKOUT_CONVERSION_RATE", "TOTAL_VIEW_CATEGORY_CONVERSION_RATE", "TOTAL_ADD_TO_CART_CONVERSION_RATE", "TOTAL_SIGNUP_CONVERSION_RATE", "TOTAL_PAGE_VISIT_CONVERSION_RATE", "TOTAL_LEAD_CONVERSION_RATE", "TOTAL_SEARCH_CONVERSION_RATE", "TOTAL_WATCH_VIDEO_CONVERSION_RATE", "TOTAL_UNKNOWN_CONVERSION_RATE", "TOTAL_CUSTOM_CONVERSION_RATE", ] # noqa: E501 + value (str): Reporting columns., must be one of ["SPEND_IN_MICRO_DOLLAR", "PAID_IMPRESSION", "SPEND_IN_DOLLAR", "CPC_IN_MICRO_DOLLAR", "ECPC_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "CTR", "ECTR", "OUTBOUND_CTR", "COST_PER_OUTBOUND_CLICK", "CAMPAIGN_NAME", "CAMPAIGN_STATUS", "PIN_PROMOTION_STATUS", "AD_STATUS", "PIN_ID", "TOTAL_ENGAGEMENT", "ENGAGEMENT_1", "ENGAGEMENT_2", "ECPE_IN_DOLLAR", "ENGAGEMENT_RATE", "EENGAGEMENT_RATE", "ECPM_IN_MICRO_DOLLAR", "REPIN_RATE", "CTR_2", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_ACCOUNT_ID", "PIN_PROMOTION_ID", "AD_ID", "AD_GROUP_ID", "CAMPAIGN_ENTITY_STATUS", "CAMPAIGN_MANAGED_STATUS", "CAMPAIGN_OBJECTIVE_TYPE", "CPM_IN_MICRO_DOLLAR", "CPM_IN_DOLLAR", "AD_GROUP_NAME", "AD_GROUP_STATUS", "AD_GROUP_ENTITY_STATUS", "PRODUCT_GROUP_ID", "PRODUCT_GROUP_STATUS", "ORDER_LINE_ID", "ORDER_LINE_NAME", "CLICKTHROUGH_1", "REPIN_1", "IMPRESSION_1", "IMPRESSION_1_GROSS", "CLICKTHROUGH_1_GROSS", "OUTBOUND_CLICK_1", "CLICKTHROUGH_2", "REPIN_2", "IMPRESSION_2", "OUTBOUND_CLICK_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY", "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT", "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_CUSTOM", "TOTAL_ENGAGEMENT_ADD_TO_CART", "TOTAL_ENGAGEMENT_LEAD", "TOTAL_ENGAGEMENT_SEARCH", "TOTAL_ENGAGEMENT_WATCH_VIDEO", "TOTAL_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_ENGAGEMENT_APP_INSTALL", "TOTAL_ENGAGEMENT_UNKNOWN", "TOTAL_CLICK_PAGE_VISIT", "TOTAL_CLICK_SIGNUP", "TOTAL_CLICK_CHECKOUT", "TOTAL_CLICK_CUSTOM", "TOTAL_CLICK_ADD_TO_CART", "TOTAL_CLICK_LEAD", "TOTAL_CLICK_SEARCH", "TOTAL_CLICK_WATCH_VIDEO", "TOTAL_CLICK_VIEW_CATEGORY", "TOTAL_CLICK_APP_INSTALL", "TOTAL_CLICK_UNKNOWN", "TOTAL_VIEW_PAGE_VISIT", "TOTAL_VIEW_SIGNUP", "TOTAL_VIEW_CHECKOUT", "TOTAL_VIEW_CUSTOM", "TOTAL_VIEW_ADD_TO_CART", "TOTAL_VIEW_LEAD", "TOTAL_VIEW_SEARCH", "TOTAL_VIEW_WATCH_VIDEO", "TOTAL_VIEW_VIEW_CATEGORY", "TOTAL_VIEW_APP_INSTALL", "TOTAL_VIEW_UNKNOWN", "TOTAL_CONVERSIONS", "TOTAL_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CONVERSIONS_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT_QUANTITY", "TOTAL_ENGAGEMENT_SIGNUP_QUANTITY", "TOTAL_ENGAGEMENT_CHECKOUT_QUANTITY", "TOTAL_ENGAGEMENT_CUSTOM_QUANTITY", "TOTAL_ENGAGEMENT_ADD_TO_CART_QUANTITY", "TOTAL_ENGAGEMENT_LEAD_QUANTITY", "TOTAL_ENGAGEMENT_SEARCH_QUANTITY", "TOTAL_ENGAGEMENT_WATCH_VIDEO_QUANTITY", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_QUANTITY", "TOTAL_ENGAGEMENT_UNKNOWN_QUANTITY", "TOTAL_CLICK_PAGE_VISIT_QUANTITY", "TOTAL_CLICK_SIGNUP_QUANTITY", "TOTAL_CLICK_CHECKOUT_QUANTITY", "TOTAL_CLICK_CUSTOM_QUANTITY", "TOTAL_CLICK_ADD_TO_CART_QUANTITY", "TOTAL_CLICK_LEAD_QUANTITY", "TOTAL_CLICK_SEARCH_QUANTITY", "TOTAL_CLICK_WATCH_VIDEO_QUANTITY", "TOTAL_CLICK_VIEW_CATEGORY_QUANTITY", "TOTAL_CLICK_UNKNOWN_QUANTITY", "TOTAL_VIEW_PAGE_VISIT_QUANTITY", "TOTAL_VIEW_SIGNUP_QUANTITY", "TOTAL_VIEW_CHECKOUT_QUANTITY", "TOTAL_VIEW_CUSTOM_QUANTITY", "TOTAL_VIEW_ADD_TO_CART_QUANTITY", "TOTAL_VIEW_LEAD_QUANTITY", "TOTAL_VIEW_SEARCH_QUANTITY", "TOTAL_VIEW_WATCH_VIDEO_QUANTITY", "TOTAL_VIEW_VIEW_CATEGORY_QUANTITY", "TOTAL_VIEW_UNKNOWN_QUANTITY", "TOTAL_CONVERSIONS_QUANTITY", "TOTAL_WEB_SESSIONS", "WEB_SESSIONS_1", "WEB_SESSIONS_2", "ONSITE_CHECKOUTS_1", "PIN_PROMOTION_NAME", "AD_NAME", "CAMPAIGN_LIFETIME_SPEND_CAP", "CAMPAIGN_DAILY_SPEND_CAP", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT", "TOTAL_SIGNUP", "TOTAL_CHECKOUT", "TOTAL_CUSTOM", "TOTAL_ADD_TO_CART", "TOTAL_LEAD", "TOTAL_SEARCH", "TOTAL_WATCH_VIDEO", "TOTAL_VIEW_CATEGORY", "TOTAL_APP_INSTALL", "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_QUANTITY", "PAGE_VISIT_COST_PER_ACTION", "APP_INSTALL_COST_PER_ACTION", "PAGE_VISIT_ROAS", "CHECKOUT_ROAS", "CUSTOM_ROAS", "VIDEO_3SEC_VIEWS_1", "VIDEO_P100_COMPLETE_1", "VIDEO_P0_COMBINED_1", "VIDEO_P25_COMBINED_1", "VIDEO_P50_COMBINED_1", "VIDEO_P75_COMBINED_1", "VIDEO_P95_COMBINED_1", "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2", "VIDEO_P25_COMBINED_2", "VIDEO_P50_COMBINED_2", "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2", "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH", "CPV_IN_MICRO_DOLLAR", "ECPV_IN_DOLLAR", "CPCV_IN_MICRO_DOLLAR", "ECPCV_IN_DOLLAR", "CPCV_P95_IN_MICRO_DOLLAR", "ECPCV_P95_IN_DOLLAR", "TOTAL_VIDEO_3SEC_VIEWS", "TOTAL_VIDEO_P100_COMPLETE", "TOTAL_VIDEO_P0_COMBINED", "TOTAL_VIDEO_P25_COMBINED", "TOTAL_VIDEO_P50_COMBINED", "TOTAL_VIDEO_P75_COMBINED", "TOTAL_VIDEO_P95_COMBINED", "TOTAL_VIDEO_MRC_VIEWS", "VIDEO_AVG_WATCHTIME_IN_SECOND_1", "VIDEO_AVG_WATCHTIME_IN_SECOND_2", "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", "TOTAL_DESTINATION_VIEWS", "TOTAL_REPIN_RATE", "WEB_CHECKOUT_COST_PER_ACTION", "WEB_CHECKOUT_ROAS", "TOTAL_WEB_CHECKOUT", "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CHECKOUT", "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CHECKOUT", "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CHECKOUT", "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "INAPP_CHECKOUT_COST_PER_ACTION", "INAPP_CHECKOUT_ROAS", "TOTAL_INAPP_CHECKOUT", "TOTAL_INAPP_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_CHECKOUT", "TOTAL_INAPP_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_CHECKOUT", "TOTAL_INAPP_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CHECKOUT_COST_PER_ACTION", "OFFLINE_CHECKOUT_ROAS", "TOTAL_OFFLINE_CHECKOUT", "TOTAL_OFFLINE_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CHECKOUT", "TOTAL_OFFLINE_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CHECKOUT", "TOTAL_OFFLINE_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "PINTEREST_CHECKOUT_COST_PER_ACTION", "PINTEREST_CHECKOUT_ROAS", "TOTAL_PINTEREST_CHECKOUT", "TOTAL_PINTEREST_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "WEB_ADD_TO_CART_COST_PER_ACTION", "WEB_ADD_TO_CART_ROAS", "TOTAL_WEB_ADD_TO_CART", "TOTAL_WEB_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_ADD_TO_CART", "TOTAL_WEB_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_ADD_TO_CART", "TOTAL_WEB_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "INAPP_ADD_TO_CART_COST_PER_ACTION", "INAPP_ADD_TO_CART_ROAS", "TOTAL_INAPP_ADD_TO_CART", "TOTAL_INAPP_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_ADD_TO_CART", "TOTAL_INAPP_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_ADD_TO_CART", "TOTAL_INAPP_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "WEB_PAGE_VISIT_COST_PER_ACTION", "WEB_PAGE_VISIT_ROAS", "TOTAL_WEB_PAGE_VISIT", "TOTAL_WEB_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_PAGE_VISIT", "TOTAL_WEB_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_PAGE_VISIT", "TOTAL_WEB_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "WEB_SIGNUP_COST_PER_ACTION", "WEB_SIGNUP_ROAS", "TOTAL_WEB_SIGNUP", "TOTAL_WEB_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SIGNUP", "TOTAL_WEB_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SIGNUP", "TOTAL_WEB_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SIGNUP", "TOTAL_WEB_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "INAPP_SIGNUP_COST_PER_ACTION", "INAPP_SIGNUP_ROAS", "TOTAL_INAPP_SIGNUP", "TOTAL_INAPP_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SIGNUP", "TOTAL_INAPP_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SIGNUP", "TOTAL_INAPP_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SIGNUP", "TOTAL_INAPP_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "OFFLINE_SIGNUP_COST_PER_ACTION", "OFFLINE_SIGNUP_ROAS", "TOTAL_OFFLINE_SIGNUP", "TOTAL_OFFLINE_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_SIGNUP", "TOTAL_OFFLINE_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_SIGNUP", "TOTAL_OFFLINE_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "WEB_WATCH_VIDEO_COST_PER_ACTION", "WEB_WATCH_VIDEO_ROAS", "TOTAL_WEB_WATCH_VIDEO", "TOTAL_WEB_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_WATCH_VIDEO", "TOTAL_WEB_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_WATCH_VIDEO", "TOTAL_WEB_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "WEB_LEAD_COST_PER_ACTION", "WEB_LEAD_ROAS", "TOTAL_WEB_LEAD", "TOTAL_WEB_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_LEAD", "TOTAL_WEB_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_LEAD", "TOTAL_WEB_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_LEAD", "TOTAL_WEB_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "OFFLINE_LEAD_COST_PER_ACTION", "OFFLINE_LEAD_ROAS", "TOTAL_OFFLINE_LEAD", "TOTAL_OFFLINE_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_LEAD", "TOTAL_OFFLINE_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_LEAD", "TOTAL_OFFLINE_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_LEAD", "TOTAL_OFFLINE_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "WEB_SEARCH_COST_PER_ACTION", "WEB_SEARCH_ROAS", "TOTAL_WEB_SEARCH", "TOTAL_WEB_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SEARCH", "TOTAL_WEB_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SEARCH", "TOTAL_WEB_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SEARCH", "TOTAL_WEB_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "INAPP_SEARCH_COST_PER_ACTION", "INAPP_SEARCH_ROAS", "TOTAL_INAPP_SEARCH", "TOTAL_INAPP_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SEARCH", "TOTAL_INAPP_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SEARCH", "TOTAL_INAPP_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SEARCH", "TOTAL_INAPP_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "WEB_VIEW_CATEGORY_COST_PER_ACTION", "WEB_VIEW_CATEGORY_ROAS", "TOTAL_WEB_VIEW_CATEGORY", "TOTAL_WEB_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_VIEW_CATEGORY", "TOTAL_WEB_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_VIEW_CATEGORY", "TOTAL_WEB_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "WEB_CUSTOM_COST_PER_ACTION", "WEB_CUSTOM_ROAS", "TOTAL_WEB_CUSTOM", "TOTAL_WEB_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CUSTOM", "TOTAL_WEB_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CUSTOM", "TOTAL_WEB_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CUSTOM", "TOTAL_WEB_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CUSTOM_COST_PER_ACTION", "OFFLINE_CUSTOM_ROAS", "TOTAL_OFFLINE_CUSTOM", "TOTAL_OFFLINE_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CUSTOM", "TOTAL_OFFLINE_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CUSTOM", "TOTAL_OFFLINE_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "WEB_UNKNOWN_COST_PER_ACTION", "WEB_UNKNOWN_ROAS", "TOTAL_WEB_UNKNOWN", "TOTAL_WEB_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_UNKNOWN", "TOTAL_WEB_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_UNKNOWN", "TOTAL_WEB_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_UNKNOWN", "TOTAL_WEB_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_UNKNOWN_COST_PER_ACTION", "INAPP_UNKNOWN_ROAS", "TOTAL_INAPP_UNKNOWN", "TOTAL_INAPP_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_UNKNOWN", "TOTAL_INAPP_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_UNKNOWN", "TOTAL_INAPP_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "OFFLINE_UNKNOWN_COST_PER_ACTION", "OFFLINE_UNKNOWN_ROAS", "TOTAL_OFFLINE_UNKNOWN", "TOTAL_OFFLINE_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_UNKNOWN", "TOTAL_OFFLINE_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_UNKNOWN", "TOTAL_OFFLINE_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_APP_INSTALL_COST_PER_ACTION", "INAPP_APP_INSTALL_ROAS", "TOTAL_INAPP_APP_INSTALL", "TOTAL_INAPP_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_APP_INSTALL", "TOTAL_INAPP_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_APP_INSTALL", "TOTAL_INAPP_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "IDEA_PIN_PRODUCT_TAG_VISIT_1", "IDEA_PIN_PRODUCT_TAG_VISIT_2", "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT", "LEADS", "COST_PER_LEAD", "QUIZ_COMPLETED", "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH", "SHOWCASE_SUBPIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_IMPRESSION", "SHOWCASE_SUBPIN_IMPRESSION", "SHOWCASE_SUBPAGE_SWIPE_LEFT", "SHOWCASE_SUBPAGE_SWIPE_RIGHT", "SHOWCASE_SUBPIN_SWIPE_LEFT", "SHOWCASE_SUBPIN_SWIPE_RIGHT", "SHOWCASE_SUBPAGE_REPIN", "SHOWCASE_SUBPIN_REPIN", "SHOWCASE_SUBPAGE_CLOSEUP", "SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD", "SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD", "SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION", "TOTAL_CHECKOUT_CONVERSION_RATE", "TOTAL_VIEW_CATEGORY_CONVERSION_RATE", "TOTAL_ADD_TO_CART_CONVERSION_RATE", "TOTAL_SIGNUP_CONVERSION_RATE", "TOTAL_PAGE_VISIT_CONVERSION_RATE", "TOTAL_LEAD_CONVERSION_RATE", "TOTAL_SEARCH_CONVERSION_RATE", "TOTAL_WATCH_VIDEO_CONVERSION_RATE", "TOTAL_UNKNOWN_CONVERSION_RATE", "TOTAL_CUSTOM_CONVERSION_RATE", "STANDARD_AD_FEED_ITEM_ID", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -752,10 +766,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Reporting columns., must be one of ["SPEND_IN_MICRO_DOLLAR", "PAID_IMPRESSION", "SPEND_IN_DOLLAR", "CPC_IN_MICRO_DOLLAR", "ECPC_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "CTR", "ECTR", "OUTBOUND_CTR", "COST_PER_OUTBOUND_CLICK", "CAMPAIGN_NAME", "CAMPAIGN_STATUS", "PIN_PROMOTION_STATUS", "AD_STATUS", "PIN_ID", "TOTAL_ENGAGEMENT", "ENGAGEMENT_1", "ENGAGEMENT_2", "ECPE_IN_DOLLAR", "ENGAGEMENT_RATE", "EENGAGEMENT_RATE", "ECPM_IN_MICRO_DOLLAR", "REPIN_RATE", "CTR_2", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_ACCOUNT_ID", "PIN_PROMOTION_ID", "AD_ID", "AD_GROUP_ID", "CAMPAIGN_ENTITY_STATUS", "CAMPAIGN_MANAGED_STATUS", "CAMPAIGN_OBJECTIVE_TYPE", "CPM_IN_MICRO_DOLLAR", "CPM_IN_DOLLAR", "AD_GROUP_NAME", "AD_GROUP_STATUS", "AD_GROUP_ENTITY_STATUS", "PRODUCT_GROUP_ID", "ORDER_LINE_ID", "ORDER_LINE_NAME", "CLICKTHROUGH_1", "REPIN_1", "IMPRESSION_1", "IMPRESSION_1_GROSS", "CLICKTHROUGH_1_GROSS", "OUTBOUND_CLICK_1", "CLICKTHROUGH_2", "REPIN_2", "IMPRESSION_2", "OUTBOUND_CLICK_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY", "TOTAL_ENGAGEMENT_PAGE_VISIT", "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_CUSTOM", "TOTAL_ENGAGEMENT_ADD_TO_CART", "TOTAL_ENGAGEMENT_LEAD", "TOTAL_ENGAGEMENT_SEARCH", "TOTAL_ENGAGEMENT_WATCH_VIDEO", "TOTAL_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_ENGAGEMENT_APP_INSTALL", "TOTAL_ENGAGEMENT_UNKNOWN", "TOTAL_CLICK_PAGE_VISIT", "TOTAL_CLICK_SIGNUP", "TOTAL_CLICK_CHECKOUT", "TOTAL_CLICK_CUSTOM", "TOTAL_CLICK_ADD_TO_CART", "TOTAL_CLICK_LEAD", "TOTAL_CLICK_SEARCH", "TOTAL_CLICK_WATCH_VIDEO", "TOTAL_CLICK_VIEW_CATEGORY", "TOTAL_CLICK_APP_INSTALL", "TOTAL_CLICK_UNKNOWN", "TOTAL_VIEW_PAGE_VISIT", "TOTAL_VIEW_SIGNUP", "TOTAL_VIEW_CHECKOUT", "TOTAL_VIEW_CUSTOM", "TOTAL_VIEW_ADD_TO_CART", "TOTAL_VIEW_LEAD", "TOTAL_VIEW_SEARCH", "TOTAL_VIEW_WATCH_VIDEO", "TOTAL_VIEW_VIEW_CATEGORY", "TOTAL_VIEW_APP_INSTALL", "TOTAL_VIEW_UNKNOWN", "TOTAL_CONVERSIONS", "TOTAL_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CONVERSIONS_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT_QUANTITY", "TOTAL_ENGAGEMENT_SIGNUP_QUANTITY", "TOTAL_ENGAGEMENT_CHECKOUT_QUANTITY", "TOTAL_ENGAGEMENT_CUSTOM_QUANTITY", "TOTAL_ENGAGEMENT_ADD_TO_CART_QUANTITY", "TOTAL_ENGAGEMENT_LEAD_QUANTITY", "TOTAL_ENGAGEMENT_SEARCH_QUANTITY", "TOTAL_ENGAGEMENT_WATCH_VIDEO_QUANTITY", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_QUANTITY", "TOTAL_ENGAGEMENT_UNKNOWN_QUANTITY", "TOTAL_CLICK_PAGE_VISIT_QUANTITY", "TOTAL_CLICK_SIGNUP_QUANTITY", "TOTAL_CLICK_CHECKOUT_QUANTITY", "TOTAL_CLICK_CUSTOM_QUANTITY", "TOTAL_CLICK_ADD_TO_CART_QUANTITY", "TOTAL_CLICK_LEAD_QUANTITY", "TOTAL_CLICK_SEARCH_QUANTITY", "TOTAL_CLICK_WATCH_VIDEO_QUANTITY", "TOTAL_CLICK_VIEW_CATEGORY_QUANTITY", "TOTAL_CLICK_UNKNOWN_QUANTITY", "TOTAL_VIEW_PAGE_VISIT_QUANTITY", "TOTAL_VIEW_SIGNUP_QUANTITY", "TOTAL_VIEW_CHECKOUT_QUANTITY", "TOTAL_VIEW_CUSTOM_QUANTITY", "TOTAL_VIEW_ADD_TO_CART_QUANTITY", "TOTAL_VIEW_LEAD_QUANTITY", "TOTAL_VIEW_SEARCH_QUANTITY", "TOTAL_VIEW_WATCH_VIDEO_QUANTITY", "TOTAL_VIEW_VIEW_CATEGORY_QUANTITY", "TOTAL_VIEW_UNKNOWN_QUANTITY", "TOTAL_CONVERSIONS_QUANTITY", "TOTAL_WEB_SESSIONS", "WEB_SESSIONS_1", "WEB_SESSIONS_2", "ONSITE_CHECKOUTS_1", "PIN_PROMOTION_NAME", "AD_NAME", "CAMPAIGN_LIFETIME_SPEND_CAP", "CAMPAIGN_DAILY_SPEND_CAP", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT", "TOTAL_SIGNUP", "TOTAL_CHECKOUT", "TOTAL_CUSTOM", "TOTAL_LEAD", "TOTAL_APP_INSTALL", "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_QUANTITY", "PAGE_VISIT_COST_PER_ACTION", "APP_INSTALL_COST_PER_ACTION", "PAGE_VISIT_ROAS", "CHECKOUT_ROAS", "CUSTOM_ROAS", "VIDEO_3SEC_VIEWS_1", "VIDEO_P100_COMPLETE_1", "VIDEO_P0_COMBINED_1", "VIDEO_P25_COMBINED_1", "VIDEO_P50_COMBINED_1", "VIDEO_P75_COMBINED_1", "VIDEO_P95_COMBINED_1", "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2", "VIDEO_P25_COMBINED_2", "VIDEO_P50_COMBINED_2", "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2", "VIDEO_LENGTH", "CPV_IN_MICRO_DOLLAR", "ECPV_IN_DOLLAR", "CPCV_IN_MICRO_DOLLAR", "ECPCV_IN_DOLLAR", "CPCV_P95_IN_MICRO_DOLLAR", "ECPCV_P95_IN_DOLLAR", "TOTAL_VIDEO_3SEC_VIEWS", "TOTAL_VIDEO_P100_COMPLETE", "TOTAL_VIDEO_P0_COMBINED", "TOTAL_VIDEO_P25_COMBINED", "TOTAL_VIDEO_P50_COMBINED", "TOTAL_VIDEO_P75_COMBINED", "TOTAL_VIDEO_P95_COMBINED", "TOTAL_VIDEO_MRC_VIEWS", "VIDEO_AVG_WATCHTIME_IN_SECOND_1", "VIDEO_AVG_WATCHTIME_IN_SECOND_2", "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", "TOTAL_REPIN_RATE", "WEB_CHECKOUT_COST_PER_ACTION", "WEB_CHECKOUT_ROAS", "TOTAL_WEB_CHECKOUT", "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CHECKOUT", "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CHECKOUT", "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CHECKOUT", "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "INAPP_CHECKOUT_COST_PER_ACTION", "INAPP_CHECKOUT_ROAS", "TOTAL_INAPP_CHECKOUT", "TOTAL_INAPP_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_CHECKOUT", "TOTAL_INAPP_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_CHECKOUT", "TOTAL_INAPP_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CHECKOUT_COST_PER_ACTION", "OFFLINE_CHECKOUT_ROAS", "TOTAL_OFFLINE_CHECKOUT", "TOTAL_OFFLINE_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CHECKOUT", "TOTAL_OFFLINE_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CHECKOUT", "TOTAL_OFFLINE_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "PINTEREST_CHECKOUT_COST_PER_ACTION", "PINTEREST_CHECKOUT_ROAS", "TOTAL_PINTEREST_CHECKOUT", "TOTAL_PINTEREST_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "WEB_ADD_TO_CART_COST_PER_ACTION", "WEB_ADD_TO_CART_ROAS", "TOTAL_WEB_ADD_TO_CART", "TOTAL_WEB_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_ADD_TO_CART", "TOTAL_WEB_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_ADD_TO_CART", "TOTAL_WEB_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "INAPP_ADD_TO_CART_COST_PER_ACTION", "INAPP_ADD_TO_CART_ROAS", "TOTAL_INAPP_ADD_TO_CART", "TOTAL_INAPP_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_ADD_TO_CART", "TOTAL_INAPP_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_ADD_TO_CART", "TOTAL_INAPP_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "WEB_PAGE_VISIT_COST_PER_ACTION", "WEB_PAGE_VISIT_ROAS", "TOTAL_WEB_PAGE_VISIT", "TOTAL_WEB_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_PAGE_VISIT", "TOTAL_WEB_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_PAGE_VISIT", "TOTAL_WEB_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "WEB_SIGNUP_COST_PER_ACTION", "WEB_SIGNUP_ROAS", "TOTAL_WEB_SIGNUP", "TOTAL_WEB_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SIGNUP", "TOTAL_WEB_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SIGNUP", "TOTAL_WEB_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SIGNUP", "TOTAL_WEB_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "INAPP_SIGNUP_COST_PER_ACTION", "INAPP_SIGNUP_ROAS", "TOTAL_INAPP_SIGNUP", "TOTAL_INAPP_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SIGNUP", "TOTAL_INAPP_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SIGNUP", "TOTAL_INAPP_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SIGNUP", "TOTAL_INAPP_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "OFFLINE_SIGNUP_COST_PER_ACTION", "OFFLINE_SIGNUP_ROAS", "TOTAL_OFFLINE_SIGNUP", "TOTAL_OFFLINE_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_SIGNUP", "TOTAL_OFFLINE_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_SIGNUP", "TOTAL_OFFLINE_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "WEB_WATCH_VIDEO_COST_PER_ACTION", "WEB_WATCH_VIDEO_ROAS", "TOTAL_WEB_WATCH_VIDEO", "TOTAL_WEB_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_WATCH_VIDEO", "TOTAL_WEB_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_WATCH_VIDEO", "TOTAL_WEB_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "WEB_LEAD_COST_PER_ACTION", "WEB_LEAD_ROAS", "TOTAL_WEB_LEAD", "TOTAL_WEB_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_LEAD", "TOTAL_WEB_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_LEAD", "TOTAL_WEB_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_LEAD", "TOTAL_WEB_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "OFFLINE_LEAD_COST_PER_ACTION", "OFFLINE_LEAD_ROAS", "TOTAL_OFFLINE_LEAD", "TOTAL_OFFLINE_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_LEAD", "TOTAL_OFFLINE_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_LEAD", "TOTAL_OFFLINE_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_LEAD", "TOTAL_OFFLINE_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "WEB_SEARCH_COST_PER_ACTION", "WEB_SEARCH_ROAS", "TOTAL_WEB_SEARCH", "TOTAL_WEB_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SEARCH", "TOTAL_WEB_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SEARCH", "TOTAL_WEB_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SEARCH", "TOTAL_WEB_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "INAPP_SEARCH_COST_PER_ACTION", "INAPP_SEARCH_ROAS", "TOTAL_INAPP_SEARCH", "TOTAL_INAPP_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SEARCH", "TOTAL_INAPP_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SEARCH", "TOTAL_INAPP_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SEARCH", "TOTAL_INAPP_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "WEB_VIEW_CATEGORY_COST_PER_ACTION", "WEB_VIEW_CATEGORY_ROAS", "TOTAL_WEB_VIEW_CATEGORY", "TOTAL_WEB_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_VIEW_CATEGORY", "TOTAL_WEB_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_VIEW_CATEGORY", "TOTAL_WEB_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "WEB_CUSTOM_COST_PER_ACTION", "WEB_CUSTOM_ROAS", "TOTAL_WEB_CUSTOM", "TOTAL_WEB_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CUSTOM", "TOTAL_WEB_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CUSTOM", "TOTAL_WEB_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CUSTOM", "TOTAL_WEB_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CUSTOM_COST_PER_ACTION", "OFFLINE_CUSTOM_ROAS", "TOTAL_OFFLINE_CUSTOM", "TOTAL_OFFLINE_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CUSTOM", "TOTAL_OFFLINE_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CUSTOM", "TOTAL_OFFLINE_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "WEB_UNKNOWN_COST_PER_ACTION", "WEB_UNKNOWN_ROAS", "TOTAL_WEB_UNKNOWN", "TOTAL_WEB_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_UNKNOWN", "TOTAL_WEB_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_UNKNOWN", "TOTAL_WEB_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_UNKNOWN", "TOTAL_WEB_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_UNKNOWN_COST_PER_ACTION", "INAPP_UNKNOWN_ROAS", "TOTAL_INAPP_UNKNOWN", "TOTAL_INAPP_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_UNKNOWN", "TOTAL_INAPP_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_UNKNOWN", "TOTAL_INAPP_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "OFFLINE_UNKNOWN_COST_PER_ACTION", "OFFLINE_UNKNOWN_ROAS", "TOTAL_OFFLINE_UNKNOWN", "TOTAL_OFFLINE_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_UNKNOWN", "TOTAL_OFFLINE_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_UNKNOWN", "TOTAL_OFFLINE_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_APP_INSTALL_COST_PER_ACTION", "INAPP_APP_INSTALL_ROAS", "TOTAL_INAPP_APP_INSTALL", "TOTAL_INAPP_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_APP_INSTALL", "TOTAL_INAPP_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_APP_INSTALL", "TOTAL_INAPP_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "IDEA_PIN_PRODUCT_TAG_VISIT_1", "IDEA_PIN_PRODUCT_TAG_VISIT_2", "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT", "LEADS", "COST_PER_LEAD", "QUIZ_COMPLETED", "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH", "SHOWCASE_SUBPIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_IMPRESSION", "SHOWCASE_SUBPIN_IMPRESSION", "SHOWCASE_SUBPAGE_SWIPE_LEFT", "SHOWCASE_SUBPAGE_SWIPE_RIGHT", "SHOWCASE_SUBPIN_SWIPE_LEFT", "SHOWCASE_SUBPIN_SWIPE_RIGHT", "SHOWCASE_SUBPAGE_REPIN", "SHOWCASE_SUBPIN_REPIN", "SHOWCASE_SUBPAGE_CLOSEUP", "SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD", "SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD", "SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION", "TOTAL_CHECKOUT_CONVERSION_RATE", "TOTAL_VIEW_CATEGORY_CONVERSION_RATE", "TOTAL_ADD_TO_CART_CONVERSION_RATE", "TOTAL_SIGNUP_CONVERSION_RATE", "TOTAL_PAGE_VISIT_CONVERSION_RATE", "TOTAL_LEAD_CONVERSION_RATE", "TOTAL_SEARCH_CONVERSION_RATE", "TOTAL_WATCH_VIDEO_CONVERSION_RATE", "TOTAL_UNKNOWN_CONVERSION_RATE", "TOTAL_CUSTOM_CONVERSION_RATE", ] # noqa: E501 + args[0] (str): Reporting columns., must be one of ["SPEND_IN_MICRO_DOLLAR", "PAID_IMPRESSION", "SPEND_IN_DOLLAR", "CPC_IN_MICRO_DOLLAR", "ECPC_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "CTR", "ECTR", "OUTBOUND_CTR", "COST_PER_OUTBOUND_CLICK", "CAMPAIGN_NAME", "CAMPAIGN_STATUS", "PIN_PROMOTION_STATUS", "AD_STATUS", "PIN_ID", "TOTAL_ENGAGEMENT", "ENGAGEMENT_1", "ENGAGEMENT_2", "ECPE_IN_DOLLAR", "ENGAGEMENT_RATE", "EENGAGEMENT_RATE", "ECPM_IN_MICRO_DOLLAR", "REPIN_RATE", "CTR_2", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_ACCOUNT_ID", "PIN_PROMOTION_ID", "AD_ID", "AD_GROUP_ID", "CAMPAIGN_ENTITY_STATUS", "CAMPAIGN_MANAGED_STATUS", "CAMPAIGN_OBJECTIVE_TYPE", "CPM_IN_MICRO_DOLLAR", "CPM_IN_DOLLAR", "AD_GROUP_NAME", "AD_GROUP_STATUS", "AD_GROUP_ENTITY_STATUS", "PRODUCT_GROUP_ID", "PRODUCT_GROUP_STATUS", "ORDER_LINE_ID", "ORDER_LINE_NAME", "CLICKTHROUGH_1", "REPIN_1", "IMPRESSION_1", "IMPRESSION_1_GROSS", "CLICKTHROUGH_1_GROSS", "OUTBOUND_CLICK_1", "CLICKTHROUGH_2", "REPIN_2", "IMPRESSION_2", "OUTBOUND_CLICK_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY", "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT", "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_CUSTOM", "TOTAL_ENGAGEMENT_ADD_TO_CART", "TOTAL_ENGAGEMENT_LEAD", "TOTAL_ENGAGEMENT_SEARCH", "TOTAL_ENGAGEMENT_WATCH_VIDEO", "TOTAL_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_ENGAGEMENT_APP_INSTALL", "TOTAL_ENGAGEMENT_UNKNOWN", "TOTAL_CLICK_PAGE_VISIT", "TOTAL_CLICK_SIGNUP", "TOTAL_CLICK_CHECKOUT", "TOTAL_CLICK_CUSTOM", "TOTAL_CLICK_ADD_TO_CART", "TOTAL_CLICK_LEAD", "TOTAL_CLICK_SEARCH", "TOTAL_CLICK_WATCH_VIDEO", "TOTAL_CLICK_VIEW_CATEGORY", "TOTAL_CLICK_APP_INSTALL", "TOTAL_CLICK_UNKNOWN", "TOTAL_VIEW_PAGE_VISIT", "TOTAL_VIEW_SIGNUP", "TOTAL_VIEW_CHECKOUT", "TOTAL_VIEW_CUSTOM", "TOTAL_VIEW_ADD_TO_CART", "TOTAL_VIEW_LEAD", "TOTAL_VIEW_SEARCH", "TOTAL_VIEW_WATCH_VIDEO", "TOTAL_VIEW_VIEW_CATEGORY", "TOTAL_VIEW_APP_INSTALL", "TOTAL_VIEW_UNKNOWN", "TOTAL_CONVERSIONS", "TOTAL_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CONVERSIONS_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT_QUANTITY", "TOTAL_ENGAGEMENT_SIGNUP_QUANTITY", "TOTAL_ENGAGEMENT_CHECKOUT_QUANTITY", "TOTAL_ENGAGEMENT_CUSTOM_QUANTITY", "TOTAL_ENGAGEMENT_ADD_TO_CART_QUANTITY", "TOTAL_ENGAGEMENT_LEAD_QUANTITY", "TOTAL_ENGAGEMENT_SEARCH_QUANTITY", "TOTAL_ENGAGEMENT_WATCH_VIDEO_QUANTITY", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_QUANTITY", "TOTAL_ENGAGEMENT_UNKNOWN_QUANTITY", "TOTAL_CLICK_PAGE_VISIT_QUANTITY", "TOTAL_CLICK_SIGNUP_QUANTITY", "TOTAL_CLICK_CHECKOUT_QUANTITY", "TOTAL_CLICK_CUSTOM_QUANTITY", "TOTAL_CLICK_ADD_TO_CART_QUANTITY", "TOTAL_CLICK_LEAD_QUANTITY", "TOTAL_CLICK_SEARCH_QUANTITY", "TOTAL_CLICK_WATCH_VIDEO_QUANTITY", "TOTAL_CLICK_VIEW_CATEGORY_QUANTITY", "TOTAL_CLICK_UNKNOWN_QUANTITY", "TOTAL_VIEW_PAGE_VISIT_QUANTITY", "TOTAL_VIEW_SIGNUP_QUANTITY", "TOTAL_VIEW_CHECKOUT_QUANTITY", "TOTAL_VIEW_CUSTOM_QUANTITY", "TOTAL_VIEW_ADD_TO_CART_QUANTITY", "TOTAL_VIEW_LEAD_QUANTITY", "TOTAL_VIEW_SEARCH_QUANTITY", "TOTAL_VIEW_WATCH_VIDEO_QUANTITY", "TOTAL_VIEW_VIEW_CATEGORY_QUANTITY", "TOTAL_VIEW_UNKNOWN_QUANTITY", "TOTAL_CONVERSIONS_QUANTITY", "TOTAL_WEB_SESSIONS", "WEB_SESSIONS_1", "WEB_SESSIONS_2", "ONSITE_CHECKOUTS_1", "PIN_PROMOTION_NAME", "AD_NAME", "CAMPAIGN_LIFETIME_SPEND_CAP", "CAMPAIGN_DAILY_SPEND_CAP", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT", "TOTAL_SIGNUP", "TOTAL_CHECKOUT", "TOTAL_CUSTOM", "TOTAL_ADD_TO_CART", "TOTAL_LEAD", "TOTAL_SEARCH", "TOTAL_WATCH_VIDEO", "TOTAL_VIEW_CATEGORY", "TOTAL_APP_INSTALL", "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_QUANTITY", "PAGE_VISIT_COST_PER_ACTION", "APP_INSTALL_COST_PER_ACTION", "PAGE_VISIT_ROAS", "CHECKOUT_ROAS", "CUSTOM_ROAS", "VIDEO_3SEC_VIEWS_1", "VIDEO_P100_COMPLETE_1", "VIDEO_P0_COMBINED_1", "VIDEO_P25_COMBINED_1", "VIDEO_P50_COMBINED_1", "VIDEO_P75_COMBINED_1", "VIDEO_P95_COMBINED_1", "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2", "VIDEO_P25_COMBINED_2", "VIDEO_P50_COMBINED_2", "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2", "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH", "CPV_IN_MICRO_DOLLAR", "ECPV_IN_DOLLAR", "CPCV_IN_MICRO_DOLLAR", "ECPCV_IN_DOLLAR", "CPCV_P95_IN_MICRO_DOLLAR", "ECPCV_P95_IN_DOLLAR", "TOTAL_VIDEO_3SEC_VIEWS", "TOTAL_VIDEO_P100_COMPLETE", "TOTAL_VIDEO_P0_COMBINED", "TOTAL_VIDEO_P25_COMBINED", "TOTAL_VIDEO_P50_COMBINED", "TOTAL_VIDEO_P75_COMBINED", "TOTAL_VIDEO_P95_COMBINED", "TOTAL_VIDEO_MRC_VIEWS", "VIDEO_AVG_WATCHTIME_IN_SECOND_1", "VIDEO_AVG_WATCHTIME_IN_SECOND_2", "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", "TOTAL_DESTINATION_VIEWS", "TOTAL_REPIN_RATE", "WEB_CHECKOUT_COST_PER_ACTION", "WEB_CHECKOUT_ROAS", "TOTAL_WEB_CHECKOUT", "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CHECKOUT", "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CHECKOUT", "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CHECKOUT", "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "INAPP_CHECKOUT_COST_PER_ACTION", "INAPP_CHECKOUT_ROAS", "TOTAL_INAPP_CHECKOUT", "TOTAL_INAPP_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_CHECKOUT", "TOTAL_INAPP_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_CHECKOUT", "TOTAL_INAPP_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CHECKOUT_COST_PER_ACTION", "OFFLINE_CHECKOUT_ROAS", "TOTAL_OFFLINE_CHECKOUT", "TOTAL_OFFLINE_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CHECKOUT", "TOTAL_OFFLINE_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CHECKOUT", "TOTAL_OFFLINE_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "PINTEREST_CHECKOUT_COST_PER_ACTION", "PINTEREST_CHECKOUT_ROAS", "TOTAL_PINTEREST_CHECKOUT", "TOTAL_PINTEREST_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "WEB_ADD_TO_CART_COST_PER_ACTION", "WEB_ADD_TO_CART_ROAS", "TOTAL_WEB_ADD_TO_CART", "TOTAL_WEB_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_ADD_TO_CART", "TOTAL_WEB_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_ADD_TO_CART", "TOTAL_WEB_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "INAPP_ADD_TO_CART_COST_PER_ACTION", "INAPP_ADD_TO_CART_ROAS", "TOTAL_INAPP_ADD_TO_CART", "TOTAL_INAPP_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_ADD_TO_CART", "TOTAL_INAPP_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_ADD_TO_CART", "TOTAL_INAPP_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "WEB_PAGE_VISIT_COST_PER_ACTION", "WEB_PAGE_VISIT_ROAS", "TOTAL_WEB_PAGE_VISIT", "TOTAL_WEB_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_PAGE_VISIT", "TOTAL_WEB_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_PAGE_VISIT", "TOTAL_WEB_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "WEB_SIGNUP_COST_PER_ACTION", "WEB_SIGNUP_ROAS", "TOTAL_WEB_SIGNUP", "TOTAL_WEB_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SIGNUP", "TOTAL_WEB_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SIGNUP", "TOTAL_WEB_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SIGNUP", "TOTAL_WEB_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "INAPP_SIGNUP_COST_PER_ACTION", "INAPP_SIGNUP_ROAS", "TOTAL_INAPP_SIGNUP", "TOTAL_INAPP_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SIGNUP", "TOTAL_INAPP_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SIGNUP", "TOTAL_INAPP_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SIGNUP", "TOTAL_INAPP_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "OFFLINE_SIGNUP_COST_PER_ACTION", "OFFLINE_SIGNUP_ROAS", "TOTAL_OFFLINE_SIGNUP", "TOTAL_OFFLINE_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_SIGNUP", "TOTAL_OFFLINE_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_SIGNUP", "TOTAL_OFFLINE_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "WEB_WATCH_VIDEO_COST_PER_ACTION", "WEB_WATCH_VIDEO_ROAS", "TOTAL_WEB_WATCH_VIDEO", "TOTAL_WEB_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_WATCH_VIDEO", "TOTAL_WEB_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_WATCH_VIDEO", "TOTAL_WEB_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "WEB_LEAD_COST_PER_ACTION", "WEB_LEAD_ROAS", "TOTAL_WEB_LEAD", "TOTAL_WEB_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_LEAD", "TOTAL_WEB_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_LEAD", "TOTAL_WEB_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_LEAD", "TOTAL_WEB_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "OFFLINE_LEAD_COST_PER_ACTION", "OFFLINE_LEAD_ROAS", "TOTAL_OFFLINE_LEAD", "TOTAL_OFFLINE_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_LEAD", "TOTAL_OFFLINE_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_LEAD", "TOTAL_OFFLINE_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_LEAD", "TOTAL_OFFLINE_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "WEB_SEARCH_COST_PER_ACTION", "WEB_SEARCH_ROAS", "TOTAL_WEB_SEARCH", "TOTAL_WEB_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SEARCH", "TOTAL_WEB_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SEARCH", "TOTAL_WEB_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SEARCH", "TOTAL_WEB_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "INAPP_SEARCH_COST_PER_ACTION", "INAPP_SEARCH_ROAS", "TOTAL_INAPP_SEARCH", "TOTAL_INAPP_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SEARCH", "TOTAL_INAPP_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SEARCH", "TOTAL_INAPP_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SEARCH", "TOTAL_INAPP_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "WEB_VIEW_CATEGORY_COST_PER_ACTION", "WEB_VIEW_CATEGORY_ROAS", "TOTAL_WEB_VIEW_CATEGORY", "TOTAL_WEB_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_VIEW_CATEGORY", "TOTAL_WEB_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_VIEW_CATEGORY", "TOTAL_WEB_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "WEB_CUSTOM_COST_PER_ACTION", "WEB_CUSTOM_ROAS", "TOTAL_WEB_CUSTOM", "TOTAL_WEB_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CUSTOM", "TOTAL_WEB_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CUSTOM", "TOTAL_WEB_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CUSTOM", "TOTAL_WEB_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CUSTOM_COST_PER_ACTION", "OFFLINE_CUSTOM_ROAS", "TOTAL_OFFLINE_CUSTOM", "TOTAL_OFFLINE_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CUSTOM", "TOTAL_OFFLINE_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CUSTOM", "TOTAL_OFFLINE_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "WEB_UNKNOWN_COST_PER_ACTION", "WEB_UNKNOWN_ROAS", "TOTAL_WEB_UNKNOWN", "TOTAL_WEB_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_UNKNOWN", "TOTAL_WEB_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_UNKNOWN", "TOTAL_WEB_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_UNKNOWN", "TOTAL_WEB_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_UNKNOWN_COST_PER_ACTION", "INAPP_UNKNOWN_ROAS", "TOTAL_INAPP_UNKNOWN", "TOTAL_INAPP_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_UNKNOWN", "TOTAL_INAPP_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_UNKNOWN", "TOTAL_INAPP_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "OFFLINE_UNKNOWN_COST_PER_ACTION", "OFFLINE_UNKNOWN_ROAS", "TOTAL_OFFLINE_UNKNOWN", "TOTAL_OFFLINE_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_UNKNOWN", "TOTAL_OFFLINE_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_UNKNOWN", "TOTAL_OFFLINE_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_APP_INSTALL_COST_PER_ACTION", "INAPP_APP_INSTALL_ROAS", "TOTAL_INAPP_APP_INSTALL", "TOTAL_INAPP_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_APP_INSTALL", "TOTAL_INAPP_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_APP_INSTALL", "TOTAL_INAPP_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "IDEA_PIN_PRODUCT_TAG_VISIT_1", "IDEA_PIN_PRODUCT_TAG_VISIT_2", "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT", "LEADS", "COST_PER_LEAD", "QUIZ_COMPLETED", "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH", "SHOWCASE_SUBPIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_IMPRESSION", "SHOWCASE_SUBPIN_IMPRESSION", "SHOWCASE_SUBPAGE_SWIPE_LEFT", "SHOWCASE_SUBPAGE_SWIPE_RIGHT", "SHOWCASE_SUBPIN_SWIPE_LEFT", "SHOWCASE_SUBPIN_SWIPE_RIGHT", "SHOWCASE_SUBPAGE_REPIN", "SHOWCASE_SUBPIN_REPIN", "SHOWCASE_SUBPAGE_CLOSEUP", "SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD", "SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD", "SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION", "TOTAL_CHECKOUT_CONVERSION_RATE", "TOTAL_VIEW_CATEGORY_CONVERSION_RATE", "TOTAL_ADD_TO_CART_CONVERSION_RATE", "TOTAL_SIGNUP_CONVERSION_RATE", "TOTAL_PAGE_VISIT_CONVERSION_RATE", "TOTAL_LEAD_CONVERSION_RATE", "TOTAL_SEARCH_CONVERSION_RATE", "TOTAL_WATCH_VIDEO_CONVERSION_RATE", "TOTAL_UNKNOWN_CONVERSION_RATE", "TOTAL_CUSTOM_CONVERSION_RATE", "STANDARD_AD_FEED_ITEM_ID", ] # noqa: E501 Keyword Args: - value (str): Reporting columns., must be one of ["SPEND_IN_MICRO_DOLLAR", "PAID_IMPRESSION", "SPEND_IN_DOLLAR", "CPC_IN_MICRO_DOLLAR", "ECPC_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "CTR", "ECTR", "OUTBOUND_CTR", "COST_PER_OUTBOUND_CLICK", "CAMPAIGN_NAME", "CAMPAIGN_STATUS", "PIN_PROMOTION_STATUS", "AD_STATUS", "PIN_ID", "TOTAL_ENGAGEMENT", "ENGAGEMENT_1", "ENGAGEMENT_2", "ECPE_IN_DOLLAR", "ENGAGEMENT_RATE", "EENGAGEMENT_RATE", "ECPM_IN_MICRO_DOLLAR", "REPIN_RATE", "CTR_2", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_ACCOUNT_ID", "PIN_PROMOTION_ID", "AD_ID", "AD_GROUP_ID", "CAMPAIGN_ENTITY_STATUS", "CAMPAIGN_MANAGED_STATUS", "CAMPAIGN_OBJECTIVE_TYPE", "CPM_IN_MICRO_DOLLAR", "CPM_IN_DOLLAR", "AD_GROUP_NAME", "AD_GROUP_STATUS", "AD_GROUP_ENTITY_STATUS", "PRODUCT_GROUP_ID", "ORDER_LINE_ID", "ORDER_LINE_NAME", "CLICKTHROUGH_1", "REPIN_1", "IMPRESSION_1", "IMPRESSION_1_GROSS", "CLICKTHROUGH_1_GROSS", "OUTBOUND_CLICK_1", "CLICKTHROUGH_2", "REPIN_2", "IMPRESSION_2", "OUTBOUND_CLICK_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY", "TOTAL_ENGAGEMENT_PAGE_VISIT", "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_CUSTOM", "TOTAL_ENGAGEMENT_ADD_TO_CART", "TOTAL_ENGAGEMENT_LEAD", "TOTAL_ENGAGEMENT_SEARCH", "TOTAL_ENGAGEMENT_WATCH_VIDEO", "TOTAL_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_ENGAGEMENT_APP_INSTALL", "TOTAL_ENGAGEMENT_UNKNOWN", "TOTAL_CLICK_PAGE_VISIT", "TOTAL_CLICK_SIGNUP", "TOTAL_CLICK_CHECKOUT", "TOTAL_CLICK_CUSTOM", "TOTAL_CLICK_ADD_TO_CART", "TOTAL_CLICK_LEAD", "TOTAL_CLICK_SEARCH", "TOTAL_CLICK_WATCH_VIDEO", "TOTAL_CLICK_VIEW_CATEGORY", "TOTAL_CLICK_APP_INSTALL", "TOTAL_CLICK_UNKNOWN", "TOTAL_VIEW_PAGE_VISIT", "TOTAL_VIEW_SIGNUP", "TOTAL_VIEW_CHECKOUT", "TOTAL_VIEW_CUSTOM", "TOTAL_VIEW_ADD_TO_CART", "TOTAL_VIEW_LEAD", "TOTAL_VIEW_SEARCH", "TOTAL_VIEW_WATCH_VIDEO", "TOTAL_VIEW_VIEW_CATEGORY", "TOTAL_VIEW_APP_INSTALL", "TOTAL_VIEW_UNKNOWN", "TOTAL_CONVERSIONS", "TOTAL_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CONVERSIONS_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT_QUANTITY", "TOTAL_ENGAGEMENT_SIGNUP_QUANTITY", "TOTAL_ENGAGEMENT_CHECKOUT_QUANTITY", "TOTAL_ENGAGEMENT_CUSTOM_QUANTITY", "TOTAL_ENGAGEMENT_ADD_TO_CART_QUANTITY", "TOTAL_ENGAGEMENT_LEAD_QUANTITY", "TOTAL_ENGAGEMENT_SEARCH_QUANTITY", "TOTAL_ENGAGEMENT_WATCH_VIDEO_QUANTITY", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_QUANTITY", "TOTAL_ENGAGEMENT_UNKNOWN_QUANTITY", "TOTAL_CLICK_PAGE_VISIT_QUANTITY", "TOTAL_CLICK_SIGNUP_QUANTITY", "TOTAL_CLICK_CHECKOUT_QUANTITY", "TOTAL_CLICK_CUSTOM_QUANTITY", "TOTAL_CLICK_ADD_TO_CART_QUANTITY", "TOTAL_CLICK_LEAD_QUANTITY", "TOTAL_CLICK_SEARCH_QUANTITY", "TOTAL_CLICK_WATCH_VIDEO_QUANTITY", "TOTAL_CLICK_VIEW_CATEGORY_QUANTITY", "TOTAL_CLICK_UNKNOWN_QUANTITY", "TOTAL_VIEW_PAGE_VISIT_QUANTITY", "TOTAL_VIEW_SIGNUP_QUANTITY", "TOTAL_VIEW_CHECKOUT_QUANTITY", "TOTAL_VIEW_CUSTOM_QUANTITY", "TOTAL_VIEW_ADD_TO_CART_QUANTITY", "TOTAL_VIEW_LEAD_QUANTITY", "TOTAL_VIEW_SEARCH_QUANTITY", "TOTAL_VIEW_WATCH_VIDEO_QUANTITY", "TOTAL_VIEW_VIEW_CATEGORY_QUANTITY", "TOTAL_VIEW_UNKNOWN_QUANTITY", "TOTAL_CONVERSIONS_QUANTITY", "TOTAL_WEB_SESSIONS", "WEB_SESSIONS_1", "WEB_SESSIONS_2", "ONSITE_CHECKOUTS_1", "PIN_PROMOTION_NAME", "AD_NAME", "CAMPAIGN_LIFETIME_SPEND_CAP", "CAMPAIGN_DAILY_SPEND_CAP", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT", "TOTAL_SIGNUP", "TOTAL_CHECKOUT", "TOTAL_CUSTOM", "TOTAL_LEAD", "TOTAL_APP_INSTALL", "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_QUANTITY", "PAGE_VISIT_COST_PER_ACTION", "APP_INSTALL_COST_PER_ACTION", "PAGE_VISIT_ROAS", "CHECKOUT_ROAS", "CUSTOM_ROAS", "VIDEO_3SEC_VIEWS_1", "VIDEO_P100_COMPLETE_1", "VIDEO_P0_COMBINED_1", "VIDEO_P25_COMBINED_1", "VIDEO_P50_COMBINED_1", "VIDEO_P75_COMBINED_1", "VIDEO_P95_COMBINED_1", "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2", "VIDEO_P25_COMBINED_2", "VIDEO_P50_COMBINED_2", "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2", "VIDEO_LENGTH", "CPV_IN_MICRO_DOLLAR", "ECPV_IN_DOLLAR", "CPCV_IN_MICRO_DOLLAR", "ECPCV_IN_DOLLAR", "CPCV_P95_IN_MICRO_DOLLAR", "ECPCV_P95_IN_DOLLAR", "TOTAL_VIDEO_3SEC_VIEWS", "TOTAL_VIDEO_P100_COMPLETE", "TOTAL_VIDEO_P0_COMBINED", "TOTAL_VIDEO_P25_COMBINED", "TOTAL_VIDEO_P50_COMBINED", "TOTAL_VIDEO_P75_COMBINED", "TOTAL_VIDEO_P95_COMBINED", "TOTAL_VIDEO_MRC_VIEWS", "VIDEO_AVG_WATCHTIME_IN_SECOND_1", "VIDEO_AVG_WATCHTIME_IN_SECOND_2", "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", "TOTAL_REPIN_RATE", "WEB_CHECKOUT_COST_PER_ACTION", "WEB_CHECKOUT_ROAS", "TOTAL_WEB_CHECKOUT", "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CHECKOUT", "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CHECKOUT", "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CHECKOUT", "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "INAPP_CHECKOUT_COST_PER_ACTION", "INAPP_CHECKOUT_ROAS", "TOTAL_INAPP_CHECKOUT", "TOTAL_INAPP_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_CHECKOUT", "TOTAL_INAPP_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_CHECKOUT", "TOTAL_INAPP_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CHECKOUT_COST_PER_ACTION", "OFFLINE_CHECKOUT_ROAS", "TOTAL_OFFLINE_CHECKOUT", "TOTAL_OFFLINE_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CHECKOUT", "TOTAL_OFFLINE_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CHECKOUT", "TOTAL_OFFLINE_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "PINTEREST_CHECKOUT_COST_PER_ACTION", "PINTEREST_CHECKOUT_ROAS", "TOTAL_PINTEREST_CHECKOUT", "TOTAL_PINTEREST_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "WEB_ADD_TO_CART_COST_PER_ACTION", "WEB_ADD_TO_CART_ROAS", "TOTAL_WEB_ADD_TO_CART", "TOTAL_WEB_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_ADD_TO_CART", "TOTAL_WEB_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_ADD_TO_CART", "TOTAL_WEB_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "INAPP_ADD_TO_CART_COST_PER_ACTION", "INAPP_ADD_TO_CART_ROAS", "TOTAL_INAPP_ADD_TO_CART", "TOTAL_INAPP_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_ADD_TO_CART", "TOTAL_INAPP_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_ADD_TO_CART", "TOTAL_INAPP_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "WEB_PAGE_VISIT_COST_PER_ACTION", "WEB_PAGE_VISIT_ROAS", "TOTAL_WEB_PAGE_VISIT", "TOTAL_WEB_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_PAGE_VISIT", "TOTAL_WEB_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_PAGE_VISIT", "TOTAL_WEB_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "WEB_SIGNUP_COST_PER_ACTION", "WEB_SIGNUP_ROAS", "TOTAL_WEB_SIGNUP", "TOTAL_WEB_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SIGNUP", "TOTAL_WEB_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SIGNUP", "TOTAL_WEB_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SIGNUP", "TOTAL_WEB_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "INAPP_SIGNUP_COST_PER_ACTION", "INAPP_SIGNUP_ROAS", "TOTAL_INAPP_SIGNUP", "TOTAL_INAPP_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SIGNUP", "TOTAL_INAPP_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SIGNUP", "TOTAL_INAPP_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SIGNUP", "TOTAL_INAPP_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "OFFLINE_SIGNUP_COST_PER_ACTION", "OFFLINE_SIGNUP_ROAS", "TOTAL_OFFLINE_SIGNUP", "TOTAL_OFFLINE_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_SIGNUP", "TOTAL_OFFLINE_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_SIGNUP", "TOTAL_OFFLINE_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "WEB_WATCH_VIDEO_COST_PER_ACTION", "WEB_WATCH_VIDEO_ROAS", "TOTAL_WEB_WATCH_VIDEO", "TOTAL_WEB_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_WATCH_VIDEO", "TOTAL_WEB_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_WATCH_VIDEO", "TOTAL_WEB_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "WEB_LEAD_COST_PER_ACTION", "WEB_LEAD_ROAS", "TOTAL_WEB_LEAD", "TOTAL_WEB_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_LEAD", "TOTAL_WEB_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_LEAD", "TOTAL_WEB_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_LEAD", "TOTAL_WEB_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "OFFLINE_LEAD_COST_PER_ACTION", "OFFLINE_LEAD_ROAS", "TOTAL_OFFLINE_LEAD", "TOTAL_OFFLINE_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_LEAD", "TOTAL_OFFLINE_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_LEAD", "TOTAL_OFFLINE_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_LEAD", "TOTAL_OFFLINE_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "WEB_SEARCH_COST_PER_ACTION", "WEB_SEARCH_ROAS", "TOTAL_WEB_SEARCH", "TOTAL_WEB_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SEARCH", "TOTAL_WEB_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SEARCH", "TOTAL_WEB_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SEARCH", "TOTAL_WEB_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "INAPP_SEARCH_COST_PER_ACTION", "INAPP_SEARCH_ROAS", "TOTAL_INAPP_SEARCH", "TOTAL_INAPP_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SEARCH", "TOTAL_INAPP_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SEARCH", "TOTAL_INAPP_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SEARCH", "TOTAL_INAPP_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "WEB_VIEW_CATEGORY_COST_PER_ACTION", "WEB_VIEW_CATEGORY_ROAS", "TOTAL_WEB_VIEW_CATEGORY", "TOTAL_WEB_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_VIEW_CATEGORY", "TOTAL_WEB_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_VIEW_CATEGORY", "TOTAL_WEB_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "WEB_CUSTOM_COST_PER_ACTION", "WEB_CUSTOM_ROAS", "TOTAL_WEB_CUSTOM", "TOTAL_WEB_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CUSTOM", "TOTAL_WEB_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CUSTOM", "TOTAL_WEB_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CUSTOM", "TOTAL_WEB_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CUSTOM_COST_PER_ACTION", "OFFLINE_CUSTOM_ROAS", "TOTAL_OFFLINE_CUSTOM", "TOTAL_OFFLINE_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CUSTOM", "TOTAL_OFFLINE_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CUSTOM", "TOTAL_OFFLINE_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "WEB_UNKNOWN_COST_PER_ACTION", "WEB_UNKNOWN_ROAS", "TOTAL_WEB_UNKNOWN", "TOTAL_WEB_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_UNKNOWN", "TOTAL_WEB_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_UNKNOWN", "TOTAL_WEB_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_UNKNOWN", "TOTAL_WEB_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_UNKNOWN_COST_PER_ACTION", "INAPP_UNKNOWN_ROAS", "TOTAL_INAPP_UNKNOWN", "TOTAL_INAPP_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_UNKNOWN", "TOTAL_INAPP_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_UNKNOWN", "TOTAL_INAPP_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "OFFLINE_UNKNOWN_COST_PER_ACTION", "OFFLINE_UNKNOWN_ROAS", "TOTAL_OFFLINE_UNKNOWN", "TOTAL_OFFLINE_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_UNKNOWN", "TOTAL_OFFLINE_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_UNKNOWN", "TOTAL_OFFLINE_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_APP_INSTALL_COST_PER_ACTION", "INAPP_APP_INSTALL_ROAS", "TOTAL_INAPP_APP_INSTALL", "TOTAL_INAPP_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_APP_INSTALL", "TOTAL_INAPP_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_APP_INSTALL", "TOTAL_INAPP_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "IDEA_PIN_PRODUCT_TAG_VISIT_1", "IDEA_PIN_PRODUCT_TAG_VISIT_2", "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT", "LEADS", "COST_PER_LEAD", "QUIZ_COMPLETED", "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH", "SHOWCASE_SUBPIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_IMPRESSION", "SHOWCASE_SUBPIN_IMPRESSION", "SHOWCASE_SUBPAGE_SWIPE_LEFT", "SHOWCASE_SUBPAGE_SWIPE_RIGHT", "SHOWCASE_SUBPIN_SWIPE_LEFT", "SHOWCASE_SUBPIN_SWIPE_RIGHT", "SHOWCASE_SUBPAGE_REPIN", "SHOWCASE_SUBPIN_REPIN", "SHOWCASE_SUBPAGE_CLOSEUP", "SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD", "SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD", "SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION", "TOTAL_CHECKOUT_CONVERSION_RATE", "TOTAL_VIEW_CATEGORY_CONVERSION_RATE", "TOTAL_ADD_TO_CART_CONVERSION_RATE", "TOTAL_SIGNUP_CONVERSION_RATE", "TOTAL_PAGE_VISIT_CONVERSION_RATE", "TOTAL_LEAD_CONVERSION_RATE", "TOTAL_SEARCH_CONVERSION_RATE", "TOTAL_WATCH_VIDEO_CONVERSION_RATE", "TOTAL_UNKNOWN_CONVERSION_RATE", "TOTAL_CUSTOM_CONVERSION_RATE", ] # noqa: E501 + value (str): Reporting columns., must be one of ["SPEND_IN_MICRO_DOLLAR", "PAID_IMPRESSION", "SPEND_IN_DOLLAR", "CPC_IN_MICRO_DOLLAR", "ECPC_IN_MICRO_DOLLAR", "ECPC_IN_DOLLAR", "CTR", "ECTR", "OUTBOUND_CTR", "COST_PER_OUTBOUND_CLICK", "CAMPAIGN_NAME", "CAMPAIGN_STATUS", "PIN_PROMOTION_STATUS", "AD_STATUS", "PIN_ID", "TOTAL_ENGAGEMENT", "ENGAGEMENT_1", "ENGAGEMENT_2", "ECPE_IN_DOLLAR", "ENGAGEMENT_RATE", "EENGAGEMENT_RATE", "ECPM_IN_MICRO_DOLLAR", "REPIN_RATE", "CTR_2", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_ACCOUNT_ID", "PIN_PROMOTION_ID", "AD_ID", "AD_GROUP_ID", "CAMPAIGN_ENTITY_STATUS", "CAMPAIGN_MANAGED_STATUS", "CAMPAIGN_OBJECTIVE_TYPE", "CPM_IN_MICRO_DOLLAR", "CPM_IN_DOLLAR", "AD_GROUP_NAME", "AD_GROUP_STATUS", "AD_GROUP_ENTITY_STATUS", "PRODUCT_GROUP_ID", "PRODUCT_GROUP_STATUS", "ORDER_LINE_ID", "ORDER_LINE_NAME", "CLICKTHROUGH_1", "REPIN_1", "IMPRESSION_1", "IMPRESSION_1_GROSS", "CLICKTHROUGH_1_GROSS", "OUTBOUND_CLICK_1", "CLICKTHROUGH_2", "REPIN_2", "IMPRESSION_2", "OUTBOUND_CLICK_2", "TOTAL_CLICKTHROUGH", "TOTAL_IMPRESSION", "TOTAL_IMPRESSION_USER", "TOTAL_IMPRESSION_FREQUENCY", "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT", "TOTAL_ENGAGEMENT_SIGNUP", "TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_ENGAGEMENT_CUSTOM", "TOTAL_ENGAGEMENT_ADD_TO_CART", "TOTAL_ENGAGEMENT_LEAD", "TOTAL_ENGAGEMENT_SEARCH", "TOTAL_ENGAGEMENT_WATCH_VIDEO", "TOTAL_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_ENGAGEMENT_APP_INSTALL", "TOTAL_ENGAGEMENT_UNKNOWN", "TOTAL_CLICK_PAGE_VISIT", "TOTAL_CLICK_SIGNUP", "TOTAL_CLICK_CHECKOUT", "TOTAL_CLICK_CUSTOM", "TOTAL_CLICK_ADD_TO_CART", "TOTAL_CLICK_LEAD", "TOTAL_CLICK_SEARCH", "TOTAL_CLICK_WATCH_VIDEO", "TOTAL_CLICK_VIEW_CATEGORY", "TOTAL_CLICK_APP_INSTALL", "TOTAL_CLICK_UNKNOWN", "TOTAL_VIEW_PAGE_VISIT", "TOTAL_VIEW_SIGNUP", "TOTAL_VIEW_CHECKOUT", "TOTAL_VIEW_CUSTOM", "TOTAL_VIEW_ADD_TO_CART", "TOTAL_VIEW_LEAD", "TOTAL_VIEW_SEARCH", "TOTAL_VIEW_WATCH_VIDEO", "TOTAL_VIEW_VIEW_CATEGORY", "TOTAL_VIEW_APP_INSTALL", "TOTAL_VIEW_UNKNOWN", "TOTAL_CONVERSIONS", "TOTAL_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_CONVERSIONS_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_PAGE_VISIT_QUANTITY", "TOTAL_ENGAGEMENT_SIGNUP_QUANTITY", "TOTAL_ENGAGEMENT_CHECKOUT_QUANTITY", "TOTAL_ENGAGEMENT_CUSTOM_QUANTITY", "TOTAL_ENGAGEMENT_ADD_TO_CART_QUANTITY", "TOTAL_ENGAGEMENT_LEAD_QUANTITY", "TOTAL_ENGAGEMENT_SEARCH_QUANTITY", "TOTAL_ENGAGEMENT_WATCH_VIDEO_QUANTITY", "TOTAL_ENGAGEMENT_VIEW_CATEGORY_QUANTITY", "TOTAL_ENGAGEMENT_UNKNOWN_QUANTITY", "TOTAL_CLICK_PAGE_VISIT_QUANTITY", "TOTAL_CLICK_SIGNUP_QUANTITY", "TOTAL_CLICK_CHECKOUT_QUANTITY", "TOTAL_CLICK_CUSTOM_QUANTITY", "TOTAL_CLICK_ADD_TO_CART_QUANTITY", "TOTAL_CLICK_LEAD_QUANTITY", "TOTAL_CLICK_SEARCH_QUANTITY", "TOTAL_CLICK_WATCH_VIDEO_QUANTITY", "TOTAL_CLICK_VIEW_CATEGORY_QUANTITY", "TOTAL_CLICK_UNKNOWN_QUANTITY", "TOTAL_VIEW_PAGE_VISIT_QUANTITY", "TOTAL_VIEW_SIGNUP_QUANTITY", "TOTAL_VIEW_CHECKOUT_QUANTITY", "TOTAL_VIEW_CUSTOM_QUANTITY", "TOTAL_VIEW_ADD_TO_CART_QUANTITY", "TOTAL_VIEW_LEAD_QUANTITY", "TOTAL_VIEW_SEARCH_QUANTITY", "TOTAL_VIEW_WATCH_VIDEO_QUANTITY", "TOTAL_VIEW_VIEW_CATEGORY_QUANTITY", "TOTAL_VIEW_UNKNOWN_QUANTITY", "TOTAL_CONVERSIONS_QUANTITY", "TOTAL_WEB_SESSIONS", "WEB_SESSIONS_1", "WEB_SESSIONS_2", "ONSITE_CHECKOUTS_1", "PIN_PROMOTION_NAME", "AD_NAME", "CAMPAIGN_LIFETIME_SPEND_CAP", "CAMPAIGN_DAILY_SPEND_CAP", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_PAGE_VISIT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SIGNUP_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CHECKOUT_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_CUSTOM_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_ADD_TO_CART_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_LEAD_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_SEARCH_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_WATCH_VIDEO_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_VIEW_CATEGORY_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_APP_INSTALL_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_DESKTOP_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_MOBILE_ACTION_TO_TABLET_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_DESKTOP_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_MOBILE_CONVERSION", "TOTAL_UNKNOWN_TABLET_ACTION_TO_TABLET_CONVERSION", "TOTAL_PAGE_VISIT", "TOTAL_SIGNUP", "TOTAL_CHECKOUT", "TOTAL_CUSTOM", "TOTAL_ADD_TO_CART", "TOTAL_LEAD", "TOTAL_SEARCH", "TOTAL_WATCH_VIDEO", "TOTAL_VIEW_CATEGORY", "TOTAL_APP_INSTALL", "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT_QUANTITY", "PAGE_VISIT_COST_PER_ACTION", "APP_INSTALL_COST_PER_ACTION", "PAGE_VISIT_ROAS", "CHECKOUT_ROAS", "CUSTOM_ROAS", "VIDEO_3SEC_VIEWS_1", "VIDEO_P100_COMPLETE_1", "VIDEO_P0_COMBINED_1", "VIDEO_P25_COMBINED_1", "VIDEO_P50_COMBINED_1", "VIDEO_P75_COMBINED_1", "VIDEO_P95_COMBINED_1", "VIDEO_MRC_VIEWS_1", "VIDEO_3SEC_VIEWS_2", "VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2", "VIDEO_P25_COMBINED_2", "VIDEO_P50_COMBINED_2", "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2", "VIDEO_MRC_VIEWS_2", "PAID_VIDEO_VIEWABLE_RATE", "VIDEO_LENGTH", "CPV_IN_MICRO_DOLLAR", "ECPV_IN_DOLLAR", "CPCV_IN_MICRO_DOLLAR", "ECPCV_IN_DOLLAR", "CPCV_P95_IN_MICRO_DOLLAR", "ECPCV_P95_IN_DOLLAR", "TOTAL_VIDEO_3SEC_VIEWS", "TOTAL_VIDEO_P100_COMPLETE", "TOTAL_VIDEO_P0_COMBINED", "TOTAL_VIDEO_P25_COMBINED", "TOTAL_VIDEO_P50_COMBINED", "TOTAL_VIDEO_P75_COMBINED", "TOTAL_VIDEO_P95_COMBINED", "TOTAL_VIDEO_MRC_VIEWS", "VIDEO_AVG_WATCHTIME_IN_SECOND_1", "VIDEO_AVG_WATCHTIME_IN_SECOND_2", "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", "TOTAL_DESTINATION_VIEWS", "TOTAL_REPIN_RATE", "WEB_CHECKOUT_COST_PER_ACTION", "WEB_CHECKOUT_ROAS", "TOTAL_WEB_CHECKOUT", "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CHECKOUT", "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CHECKOUT", "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CHECKOUT", "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "INAPP_CHECKOUT_COST_PER_ACTION", "INAPP_CHECKOUT_ROAS", "TOTAL_INAPP_CHECKOUT", "TOTAL_INAPP_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_CHECKOUT", "TOTAL_INAPP_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT", "TOTAL_INAPP_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_CHECKOUT", "TOTAL_INAPP_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CHECKOUT_COST_PER_ACTION", "OFFLINE_CHECKOUT_ROAS", "TOTAL_OFFLINE_CHECKOUT", "TOTAL_OFFLINE_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CHECKOUT", "TOTAL_OFFLINE_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT", "TOTAL_OFFLINE_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CHECKOUT", "TOTAL_OFFLINE_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "PINTEREST_CHECKOUT_COST_PER_ACTION", "PINTEREST_CHECKOUT_ROAS", "TOTAL_PINTEREST_CHECKOUT", "TOTAL_PINTEREST_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "WEB_ADD_TO_CART_COST_PER_ACTION", "WEB_ADD_TO_CART_ROAS", "TOTAL_WEB_ADD_TO_CART", "TOTAL_WEB_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_ADD_TO_CART", "TOTAL_WEB_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART", "TOTAL_WEB_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_ADD_TO_CART", "TOTAL_WEB_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "INAPP_ADD_TO_CART_COST_PER_ACTION", "INAPP_ADD_TO_CART_ROAS", "TOTAL_INAPP_ADD_TO_CART", "TOTAL_INAPP_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_ADD_TO_CART", "TOTAL_INAPP_CLICK_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART", "TOTAL_INAPP_ENGAGEMENT_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_ADD_TO_CART", "TOTAL_INAPP_VIEW_ADD_TO_CART_VALUE_IN_MICRO_DOLLAR", "WEB_PAGE_VISIT_COST_PER_ACTION", "WEB_PAGE_VISIT_ROAS", "TOTAL_WEB_PAGE_VISIT", "TOTAL_WEB_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_PAGE_VISIT", "TOTAL_WEB_CLICK_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT", "TOTAL_WEB_ENGAGEMENT_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_PAGE_VISIT", "TOTAL_WEB_VIEW_PAGE_VISIT_VALUE_IN_MICRO_DOLLAR", "WEB_SIGNUP_COST_PER_ACTION", "WEB_SIGNUP_ROAS", "TOTAL_WEB_SIGNUP", "TOTAL_WEB_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SIGNUP", "TOTAL_WEB_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SIGNUP", "TOTAL_WEB_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SIGNUP", "TOTAL_WEB_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "INAPP_SIGNUP_COST_PER_ACTION", "INAPP_SIGNUP_ROAS", "TOTAL_INAPP_SIGNUP", "TOTAL_INAPP_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SIGNUP", "TOTAL_INAPP_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SIGNUP", "TOTAL_INAPP_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SIGNUP", "TOTAL_INAPP_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "OFFLINE_SIGNUP_COST_PER_ACTION", "OFFLINE_SIGNUP_ROAS", "TOTAL_OFFLINE_SIGNUP", "TOTAL_OFFLINE_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_SIGNUP", "TOTAL_OFFLINE_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP", "TOTAL_OFFLINE_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_SIGNUP", "TOTAL_OFFLINE_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "WEB_WATCH_VIDEO_COST_PER_ACTION", "WEB_WATCH_VIDEO_ROAS", "TOTAL_WEB_WATCH_VIDEO", "TOTAL_WEB_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_WATCH_VIDEO", "TOTAL_WEB_CLICK_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO", "TOTAL_WEB_ENGAGEMENT_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_WATCH_VIDEO", "TOTAL_WEB_VIEW_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", "WEB_LEAD_COST_PER_ACTION", "WEB_LEAD_ROAS", "TOTAL_WEB_LEAD", "TOTAL_WEB_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_LEAD", "TOTAL_WEB_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_LEAD", "TOTAL_WEB_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_LEAD", "TOTAL_WEB_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "OFFLINE_LEAD_COST_PER_ACTION", "OFFLINE_LEAD_ROAS", "TOTAL_OFFLINE_LEAD", "TOTAL_OFFLINE_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_LEAD", "TOTAL_OFFLINE_CLICK_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_LEAD", "TOTAL_OFFLINE_ENGAGEMENT_LEAD_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_LEAD", "TOTAL_OFFLINE_VIEW_LEAD_VALUE_IN_MICRO_DOLLAR", "WEB_SEARCH_COST_PER_ACTION", "WEB_SEARCH_ROAS", "TOTAL_WEB_SEARCH", "TOTAL_WEB_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_SEARCH", "TOTAL_WEB_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_SEARCH", "TOTAL_WEB_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_SEARCH", "TOTAL_WEB_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "INAPP_SEARCH_COST_PER_ACTION", "INAPP_SEARCH_ROAS", "TOTAL_INAPP_SEARCH", "TOTAL_INAPP_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_SEARCH", "TOTAL_INAPP_CLICK_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_SEARCH", "TOTAL_INAPP_ENGAGEMENT_SEARCH_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_SEARCH", "TOTAL_INAPP_VIEW_SEARCH_VALUE_IN_MICRO_DOLLAR", "WEB_VIEW_CATEGORY_COST_PER_ACTION", "WEB_VIEW_CATEGORY_ROAS", "TOTAL_WEB_VIEW_CATEGORY", "TOTAL_WEB_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_VIEW_CATEGORY", "TOTAL_WEB_CLICK_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY", "TOTAL_WEB_ENGAGEMENT_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_VIEW_CATEGORY", "TOTAL_WEB_VIEW_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", "WEB_CUSTOM_COST_PER_ACTION", "WEB_CUSTOM_ROAS", "TOTAL_WEB_CUSTOM", "TOTAL_WEB_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CUSTOM", "TOTAL_WEB_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CUSTOM", "TOTAL_WEB_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CUSTOM", "TOTAL_WEB_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "OFFLINE_CUSTOM_COST_PER_ACTION", "OFFLINE_CUSTOM_ROAS", "TOTAL_OFFLINE_CUSTOM", "TOTAL_OFFLINE_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_CUSTOM", "TOTAL_OFFLINE_CLICK_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM", "TOTAL_OFFLINE_ENGAGEMENT_CUSTOM_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_CUSTOM", "TOTAL_OFFLINE_VIEW_CUSTOM_VALUE_IN_MICRO_DOLLAR", "WEB_UNKNOWN_COST_PER_ACTION", "WEB_UNKNOWN_ROAS", "TOTAL_WEB_UNKNOWN", "TOTAL_WEB_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_UNKNOWN", "TOTAL_WEB_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_UNKNOWN", "TOTAL_WEB_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_UNKNOWN", "TOTAL_WEB_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_UNKNOWN_COST_PER_ACTION", "INAPP_UNKNOWN_ROAS", "TOTAL_INAPP_UNKNOWN", "TOTAL_INAPP_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_UNKNOWN", "TOTAL_INAPP_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN", "TOTAL_INAPP_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_UNKNOWN", "TOTAL_INAPP_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "OFFLINE_UNKNOWN_COST_PER_ACTION", "OFFLINE_UNKNOWN_ROAS", "TOTAL_OFFLINE_UNKNOWN", "TOTAL_OFFLINE_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_CLICK_UNKNOWN", "TOTAL_OFFLINE_CLICK_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN", "TOTAL_OFFLINE_ENGAGEMENT_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "TOTAL_OFFLINE_VIEW_UNKNOWN", "TOTAL_OFFLINE_VIEW_UNKNOWN_VALUE_IN_MICRO_DOLLAR", "INAPP_APP_INSTALL_COST_PER_ACTION", "INAPP_APP_INSTALL_ROAS", "TOTAL_INAPP_APP_INSTALL", "TOTAL_INAPP_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_CLICK_APP_INSTALL", "TOTAL_INAPP_CLICK_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL", "TOTAL_INAPP_ENGAGEMENT_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "TOTAL_INAPP_VIEW_APP_INSTALL", "TOTAL_INAPP_VIEW_APP_INSTALL_VALUE_IN_MICRO_DOLLAR", "IDEA_PIN_PRODUCT_TAG_VISIT_1", "IDEA_PIN_PRODUCT_TAG_VISIT_2", "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT", "LEADS", "COST_PER_LEAD", "QUIZ_COMPLETED", "QUIZ_COMPLETION_RATE", "SHOWCASE_PIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_CLICKTHROUGH", "SHOWCASE_SUBPIN_CLICKTHROUGH", "SHOWCASE_SUBPAGE_IMPRESSION", "SHOWCASE_SUBPIN_IMPRESSION", "SHOWCASE_SUBPAGE_SWIPE_LEFT", "SHOWCASE_SUBPAGE_SWIPE_RIGHT", "SHOWCASE_SUBPIN_SWIPE_LEFT", "SHOWCASE_SUBPIN_SWIPE_RIGHT", "SHOWCASE_SUBPAGE_REPIN", "SHOWCASE_SUBPIN_REPIN", "SHOWCASE_SUBPAGE_CLOSEUP", "SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD", "SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD", "SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION", "TOTAL_CHECKOUT_CONVERSION_RATE", "TOTAL_VIEW_CATEGORY_CONVERSION_RATE", "TOTAL_ADD_TO_CART_CONVERSION_RATE", "TOTAL_SIGNUP_CONVERSION_RATE", "TOTAL_PAGE_VISIT_CONVERSION_RATE", "TOTAL_LEAD_CONVERSION_RATE", "TOTAL_SEARCH_CONVERSION_RATE", "TOTAL_WATCH_VIDEO_CONVERSION_RATE", "TOTAL_UNKNOWN_CONVERSION_RATE", "TOTAL_CUSTOM_CONVERSION_RATE", "STANDARD_AD_FEED_ITEM_ID", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/openapi_generated/pinterest_client/model/respond_to_invites_response_array.py b/openapi_generated/pinterest_client/model/respond_to_invites_response_array.py new file mode 100644 index 0000000..e0c9130 --- /dev/null +++ b/openapi_generated/pinterest_client/model/respond_to_invites_response_array.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.respond_to_invites_response_array_items import RespondToInvitesResponseArrayItems + globals()['RespondToInvitesResponseArrayItems'] = RespondToInvitesResponseArrayItems + + +class RespondToInvitesResponseArray(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([RespondToInvitesResponseArrayItems],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RespondToInvitesResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([RespondToInvitesResponseArrayItems]): List of invite/request accept/decline status. If there is an error, an exception object will be returned. If the invite/request was successfully accepted/declined, an invite object will be returned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RespondToInvitesResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([RespondToInvitesResponseArrayItems]): List of invite/request accept/decline status. If there is an error, an exception object will be returned. If the invite/request was successfully accepted/declined, an invite object will be returned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/respond_to_invites_response_array_items.py b/openapi_generated/pinterest_client/model/respond_to_invites_response_array_items.py new file mode 100644 index 0000000..ec62d5c --- /dev/null +++ b/openapi_generated/pinterest_client/model/respond_to_invites_response_array_items.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.base_invite_data_response import BaseInviteDataResponse + from openapi_generated.pinterest_client.model.invite_exception_response import InviteExceptionResponse + globals()['BaseInviteDataResponse'] = BaseInviteDataResponse + globals()['InviteExceptionResponse'] = InviteExceptionResponse + + +class RespondToInvitesResponseArrayItems(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'exception': (InviteExceptionResponse,), # noqa: E501 + 'invite': (BaseInviteDataResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'exception': 'exception', # noqa: E501 + 'invite': 'invite', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RespondToInvitesResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exception (InviteExceptionResponse): [optional] # noqa: E501 + invite (BaseInviteDataResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RespondToInvitesResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exception (InviteExceptionResponse): [optional] # noqa: E501 + invite (BaseInviteDataResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/role.py b/openapi_generated/pinterest_client/model/role.py new file mode 100644 index 0000000..f4bc0a0 --- /dev/null +++ b/openapi_generated/pinterest_client/model/role.py @@ -0,0 +1,297 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class Role(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'UNKNOWN': "UNKNOWN", + 'OWNER': "OWNER", + 'ADMIN': "ADMIN", + 'ANALYST': "ANALYST", + 'SOS_READER': "SOS_READER", + 'FINANCE_MANAGER': "FINANCE_MANAGER", + 'AUDIENCE_MANAGER': "AUDIENCE_MANAGER", + 'CAMPAIGN_MANAGER': "CAMPAIGN_MANAGER", + 'CATALOGS_MANAGER': "CATALOGS_MANAGER", + 'RESTRICTED_OWNER': "RESTRICTED_OWNER", + 'PROFILE_MANAGER': "PROFILE_MANAGER", + 'PROFILE_PUBLISHER': "PROFILE_PUBLISHER", + 'RESOURCE_PINNER_LIST_OWNER': "RESOURCE_PINNER_LIST_OWNER", + 'RESOURCE_PINNER_LIST_READER': "RESOURCE_PINNER_LIST_READER", + 'BIZ_PINNER_LIST_SHARER': "BIZ_PINNER_LIST_SHARER", + 'RESOURCE_CONVERSION_TAGS_READER': "RESOURCE_CONVERSION_TAGS_READER", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """Role - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): An internal role type used on business access, EMPLOYEE, ADMIN.., must be one of ["UNKNOWN", "OWNER", "ADMIN", "ANALYST", "SOS_READER", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "RESTRICTED_OWNER", "PROFILE_MANAGER", "PROFILE_PUBLISHER", "RESOURCE_PINNER_LIST_OWNER", "RESOURCE_PINNER_LIST_READER", "BIZ_PINNER_LIST_SHARER", "RESOURCE_CONVERSION_TAGS_READER", ] # noqa: E501 + + Keyword Args: + value (str): An internal role type used on business access, EMPLOYEE, ADMIN.., must be one of ["UNKNOWN", "OWNER", "ADMIN", "ANALYST", "SOS_READER", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "RESTRICTED_OWNER", "PROFILE_MANAGER", "PROFILE_PUBLISHER", "RESOURCE_PINNER_LIST_OWNER", "RESOURCE_PINNER_LIST_READER", "BIZ_PINNER_LIST_SHARER", "RESOURCE_CONVERSION_TAGS_READER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """Role - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): An internal role type used on business access, EMPLOYEE, ADMIN.., must be one of ["UNKNOWN", "OWNER", "ADMIN", "ANALYST", "SOS_READER", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "RESTRICTED_OWNER", "PROFILE_MANAGER", "PROFILE_PUBLISHER", "RESOURCE_PINNER_LIST_OWNER", "RESOURCE_PINNER_LIST_READER", "BIZ_PINNER_LIST_SHARER", "RESOURCE_CONVERSION_TAGS_READER", ] # noqa: E501 + + Keyword Args: + value (str): An internal role type used on business access, EMPLOYEE, ADMIN.., must be one of ["UNKNOWN", "OWNER", "ADMIN", "ANALYST", "SOS_READER", "FINANCE_MANAGER", "AUDIENCE_MANAGER", "CAMPAIGN_MANAGER", "CATALOGS_MANAGER", "RESTRICTED_OWNER", "PROFILE_MANAGER", "PROFILE_PUBLISHER", "RESOURCE_PINNER_LIST_OWNER", "RESOURCE_PINNER_LIST_READER", "BIZ_PINNER_LIST_SHARER", "RESOURCE_CONVERSION_TAGS_READER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/shared_audience.py b/openapi_generated/pinterest_client/model/shared_audience.py new file mode 100644 index 0000000..0bfc8fd --- /dev/null +++ b/openapi_generated/pinterest_client/model/shared_audience.py @@ -0,0 +1,329 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.operation_type import OperationType + from openapi_generated.pinterest_client.model.shared_audience1 import SharedAudience1 + from openapi_generated.pinterest_client.model.shared_audience_common import SharedAudienceCommon + globals()['OperationType'] = OperationType + globals()['SharedAudience1'] = SharedAudience1 + globals()['SharedAudienceCommon'] = SharedAudienceCommon + + +class SharedAudience(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('audience_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'audience_id': (str,), # noqa: E501 + 'operation_type': (OperationType,), # noqa: E501 + 'recipient_account_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audience_id': 'audience_id', # noqa: E501 + 'operation_type': 'operation_type', # noqa: E501 + 'recipient_account_ids': 'recipient_account_ids', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SharedAudience - a model defined in OpenAPI + + Keyword Args: + audience_id (str): Unique identifier of an audience + operation_type (OperationType): + recipient_account_ids ([str]): List of ad account IDs to share with or revoke from. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SharedAudience - a model defined in OpenAPI + + Keyword Args: + audience_id (str): Unique identifier of an audience + operation_type (OperationType): + recipient_account_ids ([str]): List of ad account IDs to share with or revoke from. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/shared_audience1.py b/openapi_generated/pinterest_client/model/shared_audience1.py new file mode 100644 index 0000000..2f911d0 --- /dev/null +++ b/openapi_generated/pinterest_client/model/shared_audience1.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class SharedAudience1(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'recipient_account_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'recipient_account_ids': 'recipient_account_ids', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, recipient_account_ids, *args, **kwargs): # noqa: E501 + """SharedAudience1 - a model defined in OpenAPI + + Args: + recipient_account_ids ([str]): List of ad account IDs to share with or revoke from. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.recipient_account_ids = recipient_account_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, recipient_account_ids, *args, **kwargs): # noqa: E501 + """SharedAudience1 - a model defined in OpenAPI + + Args: + recipient_account_ids ([str]): List of ad account IDs to share with or revoke from. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.recipient_account_ids = recipient_account_ids + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/shared_audience_account.py b/openapi_generated/pinterest_client/model/shared_audience_account.py new file mode 100644 index 0000000..a248bae --- /dev/null +++ b/openapi_generated/pinterest_client/model/shared_audience_account.py @@ -0,0 +1,289 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class SharedAudienceAccount(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('account_type',): { + 'AD_ACCOUNT': "AD_ACCOUNT", + 'BUSINESS_ACCOUNT': "BUSINESS_ACCOUNT", + }, + } + + validations = { + ('account_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'account_id': (str,), # noqa: E501 + 'account_name': (str,), # noqa: E501 + 'account_type': (str,), # noqa: E501 + 'shared_on_timestamp': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'account_id': 'account_id', # noqa: E501 + 'account_name': 'account_name', # noqa: E501 + 'account_type': 'account_type', # noqa: E501 + 'shared_on_timestamp': 'shared_on_timestamp', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, account_id, account_name, account_type, shared_on_timestamp, *args, **kwargs): # noqa: E501 + """SharedAudienceAccount - a model defined in OpenAPI + + Args: + account_id (str): Account ID (ad account or business ID). + account_name (str): Account name. + account_type (str): account type + shared_on_timestamp (int): Epoch timestamp in seconds for the shared audience event + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.account_id = account_id + self.account_name = account_name + self.account_type = account_type + self.shared_on_timestamp = shared_on_timestamp + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, account_id, account_name, account_type, shared_on_timestamp, *args, **kwargs): # noqa: E501 + """SharedAudienceAccount - a model defined in OpenAPI + + Args: + account_id (str): Account ID (ad account or business ID). + account_name (str): Account name. + account_type (str): account type + shared_on_timestamp (int): Epoch timestamp in seconds for the shared audience event + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.account_id = account_id + self.account_name = account_name + self.account_type = account_type + self.shared_on_timestamp = shared_on_timestamp + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/shared_audience_common.py b/openapi_generated/pinterest_client/model/shared_audience_common.py new file mode 100644 index 0000000..103c4f3 --- /dev/null +++ b/openapi_generated/pinterest_client/model/shared_audience_common.py @@ -0,0 +1,271 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.operation_type import OperationType + globals()['OperationType'] = OperationType + + +class SharedAudienceCommon(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('audience_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'audience_id': (str,), # noqa: E501 + 'operation_type': (OperationType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audience_id': 'audience_id', # noqa: E501 + 'operation_type': 'operation_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SharedAudienceCommon - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + audience_id (str): Unique identifier of an audience. [optional] # noqa: E501 + operation_type (OperationType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SharedAudienceCommon - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + audience_id (str): Unique identifier of an audience. [optional] # noqa: E501 + operation_type (OperationType): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/shared_audience_response.py b/openapi_generated/pinterest_client/model/shared_audience_response.py new file mode 100644 index 0000000..00cd0a2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/shared_audience_response.py @@ -0,0 +1,324 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.role import Role + from openapi_generated.pinterest_client.model.shared_audience_response1 import SharedAudienceResponse1 + from openapi_generated.pinterest_client.model.shared_audience_response_common import SharedAudienceResponseCommon + globals()['Role'] = Role + globals()['SharedAudienceResponse1'] = SharedAudienceResponse1 + globals()['SharedAudienceResponseCommon'] = SharedAudienceResponseCommon + + +class SharedAudienceResponse(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'audience_id': (str,), # noqa: E501 + 'permissions': ([Role],), # noqa: E501 + 'recipient_account_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audience_id': 'audience_id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + 'recipient_account_ids': 'recipient_account_ids', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SharedAudienceResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + audience_id (str): Audience ID that was shared. [optional] # noqa: E501 + permissions ([Role]): [optional] # noqa: E501 + recipient_account_ids ([str]): Account IDs that received the audience. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SharedAudienceResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + audience_id (str): Audience ID that was shared. [optional] # noqa: E501 + permissions ([Role]): [optional] # noqa: E501 + recipient_account_ids ([str]): Account IDs that received the audience. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/shared_audience_response1.py b/openapi_generated/pinterest_client/model/shared_audience_response1.py new file mode 100644 index 0000000..7b4c0de --- /dev/null +++ b/openapi_generated/pinterest_client/model/shared_audience_response1.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class SharedAudienceResponse1(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'recipient_account_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'recipient_account_ids': 'recipient_account_ids', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SharedAudienceResponse1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + recipient_account_ids ([str]): Account IDs that received the audience. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SharedAudienceResponse1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + recipient_account_ids ([str]): Account IDs that received the audience. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/shared_audience_response_common.py b/openapi_generated/pinterest_client/model/shared_audience_response_common.py new file mode 100644 index 0000000..865408e --- /dev/null +++ b/openapi_generated/pinterest_client/model/shared_audience_response_common.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.role import Role + globals()['Role'] = Role + + +class SharedAudienceResponseCommon(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'audience_id': (str,), # noqa: E501 + 'permissions': ([Role],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audience_id': 'audience_id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SharedAudienceResponseCommon - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + audience_id (str): Audience ID that was shared. [optional] # noqa: E501 + permissions ([Role]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SharedAudienceResponseCommon - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + audience_id (str): Audience ID that was shared. [optional] # noqa: E501 + permissions ([Role]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/single_interest_targeting_option_response.py b/openapi_generated/pinterest_client/model/single_interest_targeting_option_response.py index fff3376..f1764c7 100644 --- a/openapi_generated/pinterest_client/model/single_interest_targeting_option_response.py +++ b/openapi_generated/pinterest_client/model/single_interest_targeting_option_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/ssio_account_address.py b/openapi_generated/pinterest_client/model/ssio_account_address.py new file mode 100644 index 0000000..56c3a1e --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_account_address.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class SSIOAccountAddress(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'display': (str,), # noqa: E501 + 'purpose': (str,), # noqa: E501 + 'address_id': (str,), # noqa: E501 + 'order_legal_entity': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'display': 'display', # noqa: E501 + 'purpose': 'purpose', # noqa: E501 + 'address_id': 'address_id', # noqa: E501 + 'order_legal_entity': 'order_legal_entity', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOAccountAddress - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + display (str): Address display. [optional] # noqa: E501 + purpose (str): Purpose for which the address is used, usually Billing or Businness. [optional] # noqa: E501 + address_id (str): Salesforce id for address. [optional] # noqa: E501 + order_legal_entity (str): Legal entity for this insertion order. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOAccountAddress - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + display (str): Address display. [optional] # noqa: E501 + purpose (str): Purpose for which the address is used, usually Billing or Businness. [optional] # noqa: E501 + address_id (str): Salesforce id for address. [optional] # noqa: E501 + order_legal_entity (str): Legal entity for this insertion order. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ssio_account_item.py b/openapi_generated/pinterest_client/model/ssio_account_item.py new file mode 100644 index 0000000..5505d33 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_account_item.py @@ -0,0 +1,294 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.ssio_account_address import SSIOAccountAddress + globals()['SSIOAccountAddress'] = SSIOAccountAddress + + +class SSIOAccountItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'io_terms_id': (str,), # noqa: E501 + 'io_terms': (str,), # noqa: E501 + 'us_terms_id': (str,), # noqa: E501 + 'us_terms': (str,), # noqa: E501 + 'row_terms_id': (str,), # noqa: E501 + 'row_terms': (str,), # noqa: E501 + 'io_type': (str,), # noqa: E501 + 'addresses': ([SSIOAccountAddress],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'io_terms_id': 'io_terms_id', # noqa: E501 + 'io_terms': 'io_terms', # noqa: E501 + 'us_terms_id': 'us_terms_id', # noqa: E501 + 'us_terms': 'us_terms', # noqa: E501 + 'row_terms_id': 'row_terms_id', # noqa: E501 + 'row_terms': 'row_terms', # noqa: E501 + 'io_type': 'io_type', # noqa: E501 + 'addresses': 'addresses', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOAccountItem - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Salesforce id for billto_info. [optional] # noqa: E501 + io_terms_id (str): Salesforce id for IO Terms and Conditions. [optional] # noqa: E501 + io_terms (str): Salesforce text for IO Terms and Conditions. [optional] # noqa: E501 + us_terms_id (str): Salesforce id for US Terms and Conditions. [optional] # noqa: E501 + us_terms (str): Salesforce text for US Terms and Conditions. [optional] # noqa: E501 + row_terms_id (str): Salesforce id for Rest of the World Terms and Conditions. [optional] # noqa: E501 + row_terms (str): Salesforce text for Rest of the World Terms and Conditions. [optional] # noqa: E501 + io_type (str): Insertion Order Type - Pinterest Paper or Agency Paper. [optional] # noqa: E501 + addresses ([SSIOAccountAddress]): Address information that is associated with this account.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOAccountItem - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Salesforce id for billto_info. [optional] # noqa: E501 + io_terms_id (str): Salesforce id for IO Terms and Conditions. [optional] # noqa: E501 + io_terms (str): Salesforce text for IO Terms and Conditions. [optional] # noqa: E501 + us_terms_id (str): Salesforce id for US Terms and Conditions. [optional] # noqa: E501 + us_terms (str): Salesforce text for US Terms and Conditions. [optional] # noqa: E501 + row_terms_id (str): Salesforce id for Rest of the World Terms and Conditions. [optional] # noqa: E501 + row_terms (str): Salesforce text for Rest of the World Terms and Conditions. [optional] # noqa: E501 + io_type (str): Insertion Order Type - Pinterest Paper or Agency Paper. [optional] # noqa: E501 + addresses ([SSIOAccountAddress]): Address information that is associated with this account.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ssio_account_pmp_name.py b/openapi_generated/pinterest_client/model/ssio_account_pmp_name.py new file mode 100644 index 0000000..4807f23 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_account_pmp_name.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class SSIOAccountPMPName(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOAccountPMPName - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Display name. [optional] # noqa: E501 + id (str): Salesforce id for PMP. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOAccountPMPName - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Display name. [optional] # noqa: E501 + id (str): Salesforce id for PMP. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ssio_account_response.py b/openapi_generated/pinterest_client/model/ssio_account_response.py new file mode 100644 index 0000000..a026b8c --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_account_response.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.ssio_account_item import SSIOAccountItem + from openapi_generated.pinterest_client.model.ssio_account_pmp_name import SSIOAccountPMPName + globals()['SSIOAccountItem'] = SSIOAccountItem + globals()['SSIOAccountPMPName'] = SSIOAccountPMPName + + +class SSIOAccountResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'eligible': (bool,), # noqa: E501 + 'can_edit': (bool,), # noqa: E501 + 'billto_infos': ([SSIOAccountItem],), # noqa: E501 + 'currency': (str,), # noqa: E501 + 'pmp_names': ([SSIOAccountPMPName],), # noqa: E501 + 'error': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'eligible': 'eligible', # noqa: E501 + 'can_edit': 'can_edit', # noqa: E501 + 'billto_infos': 'billto_infos', # noqa: E501 + 'currency': 'currency', # noqa: E501 + 'pmp_names': 'pmp_names', # noqa: E501 + 'error': 'error', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOAccountResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + eligible (bool): Advertiser eligible to create order lines. [optional] # noqa: E501 + can_edit (bool): Advertiser eligible to update order lines. [optional] # noqa: E501 + billto_infos ([SSIOAccountItem]): An array of Salesforce account information that includes address, io terms, etc.. [optional] # noqa: E501 + currency (str): [optional] # noqa: E501 + pmp_names ([SSIOAccountPMPName]): [optional] # noqa: E501 + error (str): Error indicator from Salesforce which could be \"No Error\". [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOAccountResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + eligible (bool): Advertiser eligible to create order lines. [optional] # noqa: E501 + can_edit (bool): Advertiser eligible to update order lines. [optional] # noqa: E501 + billto_infos ([SSIOAccountItem]): An array of Salesforce account information that includes address, io terms, etc.. [optional] # noqa: E501 + currency (str): [optional] # noqa: E501 + pmp_names ([SSIOAccountPMPName]): [optional] # noqa: E501 + error (str): Error indicator from Salesforce which could be \"No Error\". [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ssio_create_insertion_order_request.py b/openapi_generated/pinterest_client/model/ssio_create_insertion_order_request.py new file mode 100644 index 0000000..ee1633d --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_create_insertion_order_request.py @@ -0,0 +1,414 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.currency import Currency + from openapi_generated.pinterest_client.model.ssio_create_insertion_order_request_all_of import SSIOCreateInsertionOrderRequestAllOf + from openapi_generated.pinterest_client.model.ssio_insertion_order_common import SSIOInsertionOrderCommon + globals()['Currency'] = Currency + globals()['SSIOCreateInsertionOrderRequestAllOf'] = SSIOCreateInsertionOrderRequestAllOf + globals()['SSIOInsertionOrderCommon'] = SSIOInsertionOrderCommon + + +class SSIOCreateInsertionOrderRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('order_line_type',): { + 'BUDGET': "BUDGET", + 'PERPETUALS': "PERPETUALS", + }, + } + + validations = { + ('start_date',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 + }, + }, + ('end_date',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'start_date': (str,), # noqa: E501 + 'po_number': (str,), # noqa: E501 + 'billing_contact_firstname': (str,), # noqa: E501 + 'billing_contact_lastname': (str,), # noqa: E501 + 'billing_contact_email': (str,), # noqa: E501 + 'media_contact_firstname': (str,), # noqa: E501 + 'media_contact_lastname': (str,), # noqa: E501 + 'media_contact_email': (str,), # noqa: E501 + 'pmp_id': (str,), # noqa: E501 + 'order_name': (str,), # noqa: E501 + 'order_line_type': (str,), # noqa: E501 + 'accepted_terms_id': (str,), # noqa: E501 + 'billto_company_id': (str,), # noqa: E501 + 'billto_business_address_id': (str,), # noqa: E501 + 'billto_billing_address_id': (str,), # noqa: E501 + 'currency_info': (Currency,), # noqa: E501 + 'end_date': (str,), # noqa: E501 + 'budget_amount': (float,), # noqa: E501 + 'agency_link': (str,), # noqa: E501 + 'user_email': (str,), # noqa: E501 + 'accepted_terms_time': (int,), # noqa: E501 + 'estimated_monthly_spend': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'start_date': 'start_date', # noqa: E501 + 'po_number': 'po_number', # noqa: E501 + 'billing_contact_firstname': 'billing_contact_firstname', # noqa: E501 + 'billing_contact_lastname': 'billing_contact_lastname', # noqa: E501 + 'billing_contact_email': 'billing_contact_email', # noqa: E501 + 'media_contact_firstname': 'media_contact_firstname', # noqa: E501 + 'media_contact_lastname': 'media_contact_lastname', # noqa: E501 + 'media_contact_email': 'media_contact_email', # noqa: E501 + 'pmp_id': 'pmp_id', # noqa: E501 + 'order_name': 'order_name', # noqa: E501 + 'order_line_type': 'order_line_type', # noqa: E501 + 'accepted_terms_id': 'accepted_terms_id', # noqa: E501 + 'billto_company_id': 'billto_company_id', # noqa: E501 + 'billto_business_address_id': 'billto_business_address_id', # noqa: E501 + 'billto_billing_address_id': 'billto_billing_address_id', # noqa: E501 + 'currency_info': 'currency_info', # noqa: E501 + 'end_date': 'end_date', # noqa: E501 + 'budget_amount': 'budget_amount', # noqa: E501 + 'agency_link': 'agency_link', # noqa: E501 + 'user_email': 'user_email', # noqa: E501 + 'accepted_terms_time': 'accepted_terms_time', # noqa: E501 + 'estimated_monthly_spend': 'estimated_monthly_spend', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOCreateInsertionOrderRequest - a model defined in OpenAPI + + Keyword Args: + start_date (str): Starting date of time period. Format: YYYY-MM-DD + po_number (str): The po number + billing_contact_firstname (str): The billing contact first name + billing_contact_lastname (str): The billing contact last name + billing_contact_email (str): The billing contact email + media_contact_firstname (str): The media contact first name + media_contact_lastname (str): The media contact last name + media_contact_email (str): The media contact email + pmp_id (str): The pmp id + order_name (str): The order name + order_line_type (str): Type can be Budget or Perpetual + accepted_terms_id (str): The SFDC id for the terms + billto_company_id (str): The bill-to company id + billto_business_address_id (str): The bill-to business address id + billto_billing_address_id (str): The bill-to billing address id + currency_info (Currency): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + end_date (str): End date of time period. Format: YYYY-MM-DD. [optional] # noqa: E501 + budget_amount (float): If Budget order line, the budget amount.. [optional] # noqa: E501 + agency_link (str): URL link for agency. [optional] # noqa: E501 + user_email (str): The email of user submitting the insertion order. [optional] # noqa: E501 + accepted_terms_time (int): The UTC timestamp (to the nearest sec) of when terms were accepted. [optional] # noqa: E501 + estimated_monthly_spend (float): If Ongoing (perpetual) order line, the estimated monthly spend. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOCreateInsertionOrderRequest - a model defined in OpenAPI + + Keyword Args: + start_date (str): Starting date of time period. Format: YYYY-MM-DD + po_number (str): The po number + billing_contact_firstname (str): The billing contact first name + billing_contact_lastname (str): The billing contact last name + billing_contact_email (str): The billing contact email + media_contact_firstname (str): The media contact first name + media_contact_lastname (str): The media contact last name + media_contact_email (str): The media contact email + pmp_id (str): The pmp id + order_name (str): The order name + order_line_type (str): Type can be Budget or Perpetual + accepted_terms_id (str): The SFDC id for the terms + billto_company_id (str): The bill-to company id + billto_business_address_id (str): The bill-to business address id + billto_billing_address_id (str): The bill-to billing address id + currency_info (Currency): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + end_date (str): End date of time period. Format: YYYY-MM-DD. [optional] # noqa: E501 + budget_amount (float): If Budget order line, the budget amount.. [optional] # noqa: E501 + agency_link (str): URL link for agency. [optional] # noqa: E501 + user_email (str): The email of user submitting the insertion order. [optional] # noqa: E501 + accepted_terms_time (int): The UTC timestamp (to the nearest sec) of when terms were accepted. [optional] # noqa: E501 + estimated_monthly_spend (float): If Ongoing (perpetual) order line, the estimated monthly spend. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/ssio_create_insertion_order_request_all_of.py b/openapi_generated/pinterest_client/model/ssio_create_insertion_order_request_all_of.py new file mode 100644 index 0000000..879b14e --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_create_insertion_order_request_all_of.py @@ -0,0 +1,322 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.currency import Currency + globals()['Currency'] = Currency + + +class SSIOCreateInsertionOrderRequestAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('order_line_type',): { + 'BUDGET': "BUDGET", + 'PERPETUALS': "PERPETUALS", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pmp_id': (str,), # noqa: E501 + 'order_name': (str,), # noqa: E501 + 'order_line_type': (str,), # noqa: E501 + 'accepted_terms_id': (str,), # noqa: E501 + 'billto_company_id': (str,), # noqa: E501 + 'billto_business_address_id': (str,), # noqa: E501 + 'billto_billing_address_id': (str,), # noqa: E501 + 'currency_info': (Currency,), # noqa: E501 + 'accepted_terms_time': (int,), # noqa: E501 + 'estimated_monthly_spend': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pmp_id': 'pmp_id', # noqa: E501 + 'order_name': 'order_name', # noqa: E501 + 'order_line_type': 'order_line_type', # noqa: E501 + 'accepted_terms_id': 'accepted_terms_id', # noqa: E501 + 'billto_company_id': 'billto_company_id', # noqa: E501 + 'billto_business_address_id': 'billto_business_address_id', # noqa: E501 + 'billto_billing_address_id': 'billto_billing_address_id', # noqa: E501 + 'currency_info': 'currency_info', # noqa: E501 + 'accepted_terms_time': 'accepted_terms_time', # noqa: E501 + 'estimated_monthly_spend': 'estimated_monthly_spend', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pmp_id, order_name, order_line_type, accepted_terms_id, billto_company_id, billto_business_address_id, billto_billing_address_id, currency_info, *args, **kwargs): # noqa: E501 + """SSIOCreateInsertionOrderRequestAllOf - a model defined in OpenAPI + + Args: + pmp_id (str): The pmp id + order_name (str): The order name + order_line_type (str): Type can be Budget or Perpetual + accepted_terms_id (str): The SFDC id for the terms + billto_company_id (str): The bill-to company id + billto_business_address_id (str): The bill-to business address id + billto_billing_address_id (str): The bill-to billing address id + currency_info (Currency): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + accepted_terms_time (int): The UTC timestamp (to the nearest sec) of when terms were accepted. [optional] # noqa: E501 + estimated_monthly_spend (float): If Ongoing (perpetual) order line, the estimated monthly spend. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pmp_id = pmp_id + self.order_name = order_name + self.order_line_type = order_line_type + self.accepted_terms_id = accepted_terms_id + self.billto_company_id = billto_company_id + self.billto_business_address_id = billto_business_address_id + self.billto_billing_address_id = billto_billing_address_id + self.currency_info = currency_info + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pmp_id, order_name, order_line_type, accepted_terms_id, billto_company_id, billto_business_address_id, billto_billing_address_id, currency_info, *args, **kwargs): # noqa: E501 + """SSIOCreateInsertionOrderRequestAllOf - a model defined in OpenAPI + + Args: + pmp_id (str): The pmp id + order_name (str): The order name + order_line_type (str): Type can be Budget or Perpetual + accepted_terms_id (str): The SFDC id for the terms + billto_company_id (str): The bill-to company id + billto_business_address_id (str): The bill-to business address id + billto_billing_address_id (str): The bill-to billing address id + currency_info (Currency): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + accepted_terms_time (int): The UTC timestamp (to the nearest sec) of when terms were accepted. [optional] # noqa: E501 + estimated_monthly_spend (float): If Ongoing (perpetual) order line, the estimated monthly spend. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pmp_id = pmp_id + self.order_name = order_name + self.order_line_type = order_line_type + self.accepted_terms_id = accepted_terms_id + self.billto_company_id = billto_company_id + self.billto_business_address_id = billto_business_address_id + self.billto_billing_address_id = billto_billing_address_id + self.currency_info = currency_info + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ssio_create_insertion_order_response.py b/openapi_generated/pinterest_client/model/ssio_create_insertion_order_response.py new file mode 100644 index 0000000..eb6aaaf --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_create_insertion_order_response.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class SSIOCreateInsertionOrderResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pin_order_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pin_order_id': 'pin_order_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOCreateInsertionOrderResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + pin_order_id (str): Salesforce order id. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOCreateInsertionOrderResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + pin_order_id (str): Salesforce order id. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ssio_edit_insertion_order_request.py b/openapi_generated/pinterest_client/model/ssio_edit_insertion_order_request.py new file mode 100644 index 0000000..4040a08 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_edit_insertion_order_request.py @@ -0,0 +1,384 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.ssio_edit_insertion_order_request_all_of import SSIOEditInsertionOrderRequestAllOf + from openapi_generated.pinterest_client.model.ssio_insertion_order_common import SSIOInsertionOrderCommon + globals()['SSIOEditInsertionOrderRequestAllOf'] = SSIOEditInsertionOrderRequestAllOf + globals()['SSIOInsertionOrderCommon'] = SSIOInsertionOrderCommon + + +class SSIOEditInsertionOrderRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('start_date',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 + }, + }, + ('end_date',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'start_date': (str,), # noqa: E501 + 'end_date': (str,), # noqa: E501 + 'po_number': (str,), # noqa: E501 + 'budget_amount': (float,), # noqa: E501 + 'billing_contact_firstname': (str,), # noqa: E501 + 'billing_contact_lastname': (str,), # noqa: E501 + 'billing_contact_email': (str,), # noqa: E501 + 'media_contact_firstname': (str,), # noqa: E501 + 'media_contact_lastname': (str,), # noqa: E501 + 'media_contact_email': (str,), # noqa: E501 + 'agency_link': (str,), # noqa: E501 + 'user_email': (str,), # noqa: E501 + 'oracle_line_id': (str,), # noqa: E501 + 'salesforce_order_id': (str,), # noqa: E501 + 'salesforce_order_line_id': (str,), # noqa: E501 + 'ads_manager_order_line_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'start_date': 'start_date', # noqa: E501 + 'end_date': 'end_date', # noqa: E501 + 'po_number': 'po_number', # noqa: E501 + 'budget_amount': 'budget_amount', # noqa: E501 + 'billing_contact_firstname': 'billing_contact_firstname', # noqa: E501 + 'billing_contact_lastname': 'billing_contact_lastname', # noqa: E501 + 'billing_contact_email': 'billing_contact_email', # noqa: E501 + 'media_contact_firstname': 'media_contact_firstname', # noqa: E501 + 'media_contact_lastname': 'media_contact_lastname', # noqa: E501 + 'media_contact_email': 'media_contact_email', # noqa: E501 + 'agency_link': 'agency_link', # noqa: E501 + 'user_email': 'user_email', # noqa: E501 + 'oracle_line_id': 'oracle_line_id', # noqa: E501 + 'salesforce_order_id': 'salesforce_order_id', # noqa: E501 + 'salesforce_order_line_id': 'salesforce_order_line_id', # noqa: E501 + 'ads_manager_order_line_id': 'ads_manager_order_line_id', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOEditInsertionOrderRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + start_date (str): Starting date of time period. Format: YYYY-MM-DD. [optional] # noqa: E501 + end_date (str): End date of time period. Format: YYYY-MM-DD. [optional] # noqa: E501 + po_number (str): The po number. [optional] # noqa: E501 + budget_amount (float): If Budget order line, the budget amount.. [optional] # noqa: E501 + billing_contact_firstname (str): The billing contact first name. [optional] # noqa: E501 + billing_contact_lastname (str): The billing contact last name. [optional] # noqa: E501 + billing_contact_email (str): The billing contact email. [optional] # noqa: E501 + media_contact_firstname (str): The media contact first name. [optional] # noqa: E501 + media_contact_lastname (str): The media contact last name. [optional] # noqa: E501 + media_contact_email (str): The media contact email. [optional] # noqa: E501 + agency_link (str): URL link for agency. [optional] # noqa: E501 + user_email (str): The email of user submitting the insertion order. [optional] # noqa: E501 + oracle_line_id (str): LineId in the Oracle DB. [optional] # noqa: E501 + salesforce_order_id (str): OrderId in SFDC. [optional] # noqa: E501 + salesforce_order_line_id (str): OrderLineId in SFDC. [optional] # noqa: E501 + ads_manager_order_line_id (str): Ads manager OrderLineId. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOEditInsertionOrderRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + start_date (str): Starting date of time period. Format: YYYY-MM-DD. [optional] # noqa: E501 + end_date (str): End date of time period. Format: YYYY-MM-DD. [optional] # noqa: E501 + po_number (str): The po number. [optional] # noqa: E501 + budget_amount (float): If Budget order line, the budget amount.. [optional] # noqa: E501 + billing_contact_firstname (str): The billing contact first name. [optional] # noqa: E501 + billing_contact_lastname (str): The billing contact last name. [optional] # noqa: E501 + billing_contact_email (str): The billing contact email. [optional] # noqa: E501 + media_contact_firstname (str): The media contact first name. [optional] # noqa: E501 + media_contact_lastname (str): The media contact last name. [optional] # noqa: E501 + media_contact_email (str): The media contact email. [optional] # noqa: E501 + agency_link (str): URL link for agency. [optional] # noqa: E501 + user_email (str): The email of user submitting the insertion order. [optional] # noqa: E501 + oracle_line_id (str): LineId in the Oracle DB. [optional] # noqa: E501 + salesforce_order_id (str): OrderId in SFDC. [optional] # noqa: E501 + salesforce_order_line_id (str): OrderLineId in SFDC. [optional] # noqa: E501 + ads_manager_order_line_id (str): Ads manager OrderLineId. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/ssio_edit_insertion_order_request_all_of.py b/openapi_generated/pinterest_client/model/ssio_edit_insertion_order_request_all_of.py new file mode 100644 index 0000000..48025ad --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_edit_insertion_order_request_all_of.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class SSIOEditInsertionOrderRequestAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'oracle_line_id': (str,), # noqa: E501 + 'salesforce_order_id': (str,), # noqa: E501 + 'salesforce_order_line_id': (str,), # noqa: E501 + 'ads_manager_order_line_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'oracle_line_id': 'oracle_line_id', # noqa: E501 + 'salesforce_order_id': 'salesforce_order_id', # noqa: E501 + 'salesforce_order_line_id': 'salesforce_order_line_id', # noqa: E501 + 'ads_manager_order_line_id': 'ads_manager_order_line_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOEditInsertionOrderRequestAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + oracle_line_id (str): LineId in the Oracle DB. [optional] # noqa: E501 + salesforce_order_id (str): OrderId in SFDC. [optional] # noqa: E501 + salesforce_order_line_id (str): OrderLineId in SFDC. [optional] # noqa: E501 + ads_manager_order_line_id (str): Ads manager OrderLineId. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOEditInsertionOrderRequestAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + oracle_line_id (str): LineId in the Oracle DB. [optional] # noqa: E501 + salesforce_order_id (str): OrderId in SFDC. [optional] # noqa: E501 + salesforce_order_line_id (str): OrderLineId in SFDC. [optional] # noqa: E501 + ads_manager_order_line_id (str): Ads manager OrderLineId. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ssio_edit_insertion_order_response.py b/openapi_generated/pinterest_client/model/ssio_edit_insertion_order_response.py new file mode 100644 index 0000000..05a1811 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_edit_insertion_order_response.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class SSIOEditInsertionOrderResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pin_order_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pin_order_id': 'pin_order_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOEditInsertionOrderResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + pin_order_id (str): Salesforce order id. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOEditInsertionOrderResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + pin_order_id (str): Salesforce order id. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ssio_insertion_order_common.py b/openapi_generated/pinterest_client/model/ssio_insertion_order_common.py new file mode 100644 index 0000000..6a48db7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_insertion_order_common.py @@ -0,0 +1,310 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class SSIOInsertionOrderCommon(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('start_date',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 + }, + }, + ('end_date',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'start_date': (str,), # noqa: E501 + 'end_date': (str,), # noqa: E501 + 'po_number': (str,), # noqa: E501 + 'budget_amount': (float,), # noqa: E501 + 'billing_contact_firstname': (str,), # noqa: E501 + 'billing_contact_lastname': (str,), # noqa: E501 + 'billing_contact_email': (str,), # noqa: E501 + 'media_contact_firstname': (str,), # noqa: E501 + 'media_contact_lastname': (str,), # noqa: E501 + 'media_contact_email': (str,), # noqa: E501 + 'agency_link': (str,), # noqa: E501 + 'user_email': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'start_date': 'start_date', # noqa: E501 + 'end_date': 'end_date', # noqa: E501 + 'po_number': 'po_number', # noqa: E501 + 'budget_amount': 'budget_amount', # noqa: E501 + 'billing_contact_firstname': 'billing_contact_firstname', # noqa: E501 + 'billing_contact_lastname': 'billing_contact_lastname', # noqa: E501 + 'billing_contact_email': 'billing_contact_email', # noqa: E501 + 'media_contact_firstname': 'media_contact_firstname', # noqa: E501 + 'media_contact_lastname': 'media_contact_lastname', # noqa: E501 + 'media_contact_email': 'media_contact_email', # noqa: E501 + 'agency_link': 'agency_link', # noqa: E501 + 'user_email': 'user_email', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOInsertionOrderCommon - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + start_date (str): Starting date of time period. Format: YYYY-MM-DD. [optional] # noqa: E501 + end_date (str): End date of time period. Format: YYYY-MM-DD. [optional] # noqa: E501 + po_number (str): The po number. [optional] # noqa: E501 + budget_amount (float): If Budget order line, the budget amount.. [optional] # noqa: E501 + billing_contact_firstname (str): The billing contact first name. [optional] # noqa: E501 + billing_contact_lastname (str): The billing contact last name. [optional] # noqa: E501 + billing_contact_email (str): The billing contact email. [optional] # noqa: E501 + media_contact_firstname (str): The media contact first name. [optional] # noqa: E501 + media_contact_lastname (str): The media contact last name. [optional] # noqa: E501 + media_contact_email (str): The media contact email. [optional] # noqa: E501 + agency_link (str): URL link for agency. [optional] # noqa: E501 + user_email (str): The email of user submitting the insertion order. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOInsertionOrderCommon - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + start_date (str): Starting date of time period. Format: YYYY-MM-DD. [optional] # noqa: E501 + end_date (str): End date of time period. Format: YYYY-MM-DD. [optional] # noqa: E501 + po_number (str): The po number. [optional] # noqa: E501 + budget_amount (float): If Budget order line, the budget amount.. [optional] # noqa: E501 + billing_contact_firstname (str): The billing contact first name. [optional] # noqa: E501 + billing_contact_lastname (str): The billing contact last name. [optional] # noqa: E501 + billing_contact_email (str): The billing contact email. [optional] # noqa: E501 + media_contact_firstname (str): The media contact first name. [optional] # noqa: E501 + media_contact_lastname (str): The media contact last name. [optional] # noqa: E501 + media_contact_email (str): The media contact email. [optional] # noqa: E501 + agency_link (str): URL link for agency. [optional] # noqa: E501 + user_email (str): The email of user submitting the insertion order. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ssio_insertion_order_status.py b/openapi_generated/pinterest_client/model/ssio_insertion_order_status.py new file mode 100644 index 0000000..e2e8f25 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_insertion_order_status.py @@ -0,0 +1,264 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class SSIOInsertionOrderStatus(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pin_order_id': (str,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'creation_time': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pin_order_id': 'pin_order_id', # noqa: E501 + 'status': 'status', # noqa: E501 + 'creation_time': 'creation_time', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOInsertionOrderStatus - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + pin_order_id (str): Salesforce order id. [optional] # noqa: E501 + status (str): Salesforce insertion order status. [optional] # noqa: E501 + creation_time (str, none_type): Salesforce insertion order creation time. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOInsertionOrderStatus - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + pin_order_id (str): Salesforce order id. [optional] # noqa: E501 + status (str): Salesforce insertion order status. [optional] # noqa: E501 + creation_time (str, none_type): Salesforce insertion order creation time. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/ssio_insertion_order_status_response.py b/openapi_generated/pinterest_client/model/ssio_insertion_order_status_response.py new file mode 100644 index 0000000..6f210af --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_insertion_order_status_response.py @@ -0,0 +1,320 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.ssio_insertion_order_status import SSIOInsertionOrderStatus + globals()['SSIOInsertionOrderStatus'] = SSIOInsertionOrderStatus + + +class SSIOInsertionOrderStatusResponse(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pin_order_id': (str,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'creation_time': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pin_order_id': 'pin_order_id', # noqa: E501 + 'status': 'status', # noqa: E501 + 'creation_time': 'creation_time', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOInsertionOrderStatusResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + pin_order_id (str): Salesforce order id. [optional] # noqa: E501 + status (str): Salesforce insertion order status. [optional] # noqa: E501 + creation_time (str, none_type): Salesforce insertion order creation time. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOInsertionOrderStatusResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + pin_order_id (str): Salesforce order id. [optional] # noqa: E501 + status (str): Salesforce insertion order status. [optional] # noqa: E501 + creation_time (str, none_type): Salesforce insertion order creation time. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/ssio_order_line.py b/openapi_generated/pinterest_client/model/ssio_order_line.py new file mode 100644 index 0000000..4a7d398 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ssio_order_line.py @@ -0,0 +1,356 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.currency import Currency + globals()['Currency'] = Currency + + +class SSIOOrderLine(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('last_modified_date_time',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{3})Z$', # noqa: E501 + }, + }, + ('accepted_terms_time',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{3})Z$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'salesforce_order_line_id': (str, none_type,), # noqa: E501 + 'ads_manager_order_line_id': (str, none_type,), # noqa: E501 + 'pin_order_id': (str, none_type,), # noqa: E501 + 'last_modified_date_time': (str, none_type,), # noqa: E501 + 'start_date': (date, none_type,), # noqa: E501 + 'end_date': (date, none_type,), # noqa: E501 + 'bill_to_company_name': (str, none_type,), # noqa: E501 + 'billing_contact_firstname': (str, none_type,), # noqa: E501 + 'billing_contact_lastname': (str, none_type,), # noqa: E501 + 'billing_contact_email': (str, none_type,), # noqa: E501 + 'media_contact_email': (str, none_type,), # noqa: E501 + 'media_contact_firstname': (str, none_type,), # noqa: E501 + 'media_contact_lastname': (str, none_type,), # noqa: E501 + 'currency_info': (Currency,), # noqa: E501 + 'agency_link': (str, none_type,), # noqa: E501 + 'po_number': (str, none_type,), # noqa: E501 + 'order_name': (str, none_type,), # noqa: E501 + 'pmp_name': (str, none_type,), # noqa: E501 + 'accepted_terms_id': (str, none_type,), # noqa: E501 + 'accepted_terms_time': (str, none_type,), # noqa: E501 + 'budget_amount': (float, none_type,), # noqa: E501 + 'estimated_monthly_spend': (float, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'salesforce_order_line_id': 'salesforce_order_line_id', # noqa: E501 + 'ads_manager_order_line_id': 'ads_manager_order_line_id', # noqa: E501 + 'pin_order_id': 'pin_order_id', # noqa: E501 + 'last_modified_date_time': 'last_modified_date_time', # noqa: E501 + 'start_date': 'start_date', # noqa: E501 + 'end_date': 'end_date', # noqa: E501 + 'bill_to_company_name': 'bill_to_company_name', # noqa: E501 + 'billing_contact_firstname': 'billing_contact_firstname', # noqa: E501 + 'billing_contact_lastname': 'billing_contact_lastname', # noqa: E501 + 'billing_contact_email': 'billing_contact_email', # noqa: E501 + 'media_contact_email': 'media_contact_email', # noqa: E501 + 'media_contact_firstname': 'media_contact_firstname', # noqa: E501 + 'media_contact_lastname': 'media_contact_lastname', # noqa: E501 + 'currency_info': 'currency_info', # noqa: E501 + 'agency_link': 'agency_link', # noqa: E501 + 'po_number': 'po_number', # noqa: E501 + 'order_name': 'order_name', # noqa: E501 + 'pmp_name': 'pmp_name', # noqa: E501 + 'accepted_terms_id': 'accepted_terms_id', # noqa: E501 + 'accepted_terms_time': 'accepted_terms_time', # noqa: E501 + 'budget_amount': 'budget_amount', # noqa: E501 + 'estimated_monthly_spend': 'estimated_monthly_spend', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SSIOOrderLine - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + salesforce_order_line_id (str, none_type): OrderLineId in SFDC. [optional] # noqa: E501 + ads_manager_order_line_id (str, none_type): Ads manager OrderLineId. [optional] # noqa: E501 + pin_order_id (str, none_type): The pin order id associated with the order line in SFDC. [optional] # noqa: E501 + last_modified_date_time (str, none_type): Last modified date.. [optional] # noqa: E501 + start_date (date, none_type): Start date of the order line.. [optional] # noqa: E501 + end_date (date, none_type): End date of the order line.. [optional] # noqa: E501 + bill_to_company_name (str, none_type): Bill To Company name. [optional] # noqa: E501 + billing_contact_firstname (str, none_type): Billing contact first name. [optional] # noqa: E501 + billing_contact_lastname (str, none_type): Billing contact last name. [optional] # noqa: E501 + billing_contact_email (str, none_type): Billing contact email. [optional] # noqa: E501 + media_contact_email (str, none_type): Billing media email. [optional] # noqa: E501 + media_contact_firstname (str, none_type): Billing contact first name. [optional] # noqa: E501 + media_contact_lastname (str, none_type): Billing contact first name. [optional] # noqa: E501 + currency_info (Currency): [optional] # noqa: E501 + agency_link (str, none_type): Agency link. [optional] # noqa: E501 + po_number (str, none_type): The po number. [optional] # noqa: E501 + order_name (str, none_type): The order name. [optional] # noqa: E501 + pmp_name (str, none_type): The Pinterest marketing partner name. [optional] # noqa: E501 + accepted_terms_id (str, none_type): The SFDC id for the terms. [optional] # noqa: E501 + accepted_terms_time (str, none_type): The UTC timestamp (to the nearest sec) of when terms were accepted. [optional] # noqa: E501 + budget_amount (float, none_type): If Budget order line, the budget amount.. [optional] # noqa: E501 + estimated_monthly_spend (float, none_type): If Ongoing (perpetual) order line, the estimated monthly spend. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SSIOOrderLine - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + salesforce_order_line_id (str, none_type): OrderLineId in SFDC. [optional] # noqa: E501 + ads_manager_order_line_id (str, none_type): Ads manager OrderLineId. [optional] # noqa: E501 + pin_order_id (str, none_type): The pin order id associated with the order line in SFDC. [optional] # noqa: E501 + last_modified_date_time (str, none_type): Last modified date.. [optional] # noqa: E501 + start_date (date, none_type): Start date of the order line.. [optional] # noqa: E501 + end_date (date, none_type): End date of the order line.. [optional] # noqa: E501 + bill_to_company_name (str, none_type): Bill To Company name. [optional] # noqa: E501 + billing_contact_firstname (str, none_type): Billing contact first name. [optional] # noqa: E501 + billing_contact_lastname (str, none_type): Billing contact last name. [optional] # noqa: E501 + billing_contact_email (str, none_type): Billing contact email. [optional] # noqa: E501 + media_contact_email (str, none_type): Billing media email. [optional] # noqa: E501 + media_contact_firstname (str, none_type): Billing contact first name. [optional] # noqa: E501 + media_contact_lastname (str, none_type): Billing contact first name. [optional] # noqa: E501 + currency_info (Currency): [optional] # noqa: E501 + agency_link (str, none_type): Agency link. [optional] # noqa: E501 + po_number (str, none_type): The po number. [optional] # noqa: E501 + order_name (str, none_type): The order name. [optional] # noqa: E501 + pmp_name (str, none_type): The Pinterest marketing partner name. [optional] # noqa: E501 + accepted_terms_id (str, none_type): The SFDC id for the terms. [optional] # noqa: E501 + accepted_terms_time (str, none_type): The UTC timestamp (to the nearest sec) of when terms were accepted. [optional] # noqa: E501 + budget_amount (float, none_type): If Budget order line, the budget amount.. [optional] # noqa: E501 + estimated_monthly_spend (float, none_type): If Ongoing (perpetual) order line, the estimated monthly spend. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/summary_pin.py b/openapi_generated/pinterest_client/model/summary_pin.py new file mode 100644 index 0000000..4a91e9a --- /dev/null +++ b/openapi_generated/pinterest_client/model/summary_pin.py @@ -0,0 +1,285 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.pin_media import PinMedia + globals()['PinMedia'] = PinMedia + + +class SummaryPin(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('alt_text',): { + 'max_length': 500, + }, + ('link',): { + 'max_length': 2048, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'media': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'alt_text': (str, none_type,), # noqa: E501 + 'link': (str, none_type,), # noqa: E501 + 'title': (str, none_type,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'media': 'media', # noqa: E501 + 'alt_text': 'alt_text', # noqa: E501 + 'link': 'link', # noqa: E501 + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + } + + read_only_vars = { + 'media', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SummaryPin - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + media ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + alt_text (str, none_type): [optional] # noqa: E501 + link (str, none_type): [optional] # noqa: E501 + title (str, none_type): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SummaryPin - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + media ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + alt_text (str, none_type): [optional] # noqa: E501 + link (str, none_type): [optional] # noqa: E501 + title (str, none_type): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/targeting_advertiser_country.py b/openapi_generated/pinterest_client/model/targeting_advertiser_country.py new file mode 100644 index 0000000..e87c5ef --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_advertiser_country.py @@ -0,0 +1,320 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class TargetingAdvertiserCountry(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'None': None, + 'US': "US", + 'GB': "GB", + 'CA': "CA", + 'IE': "IE", + 'AU': "AU", + 'NZ': "NZ", + 'FR': "FR", + 'SE': "SE", + 'IL': "IL", + 'DE': "DE", + 'AT': "AT", + 'IT': "IT", + 'ES': "ES", + 'NL': "NL", + 'BE': "BE", + 'PT': "PT", + 'CH': "CH", + 'HK': "HK", + 'JP': "JP", + 'KR': "KR", + 'SG': "SG", + 'NO': "NO", + 'DK': "DK", + 'FI': "FI", + 'CY': "CY", + 'LU': "LU", + 'MT': "MT", + 'PL': "PL", + 'RO': "RO", + 'HU': "HU", + 'CZ': "CZ", + 'GR': "GR", + 'SK': "SK", + 'BR': "BR", + 'MX': "MX", + 'AR': "AR", + 'CL': "CL", + 'CO': "CO", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """TargetingAdvertiserCountry - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Advertiser's ISO two character country code.., must be one of ["US", "GB", "CA", "IE", "AU", "NZ", "FR", "SE", "IL", "DE", "AT", "IT", "ES", "NL", "BE", "PT", "CH", "HK", "JP", "KR", "SG", "NO", "DK", "FI", "CY", "LU", "MT", "PL", "RO", "HU", "CZ", "GR", "SK", "BR", "MX", "AR", "CL", "CO", ] # noqa: E501 + + Keyword Args: + value (str): Advertiser's ISO two character country code.., must be one of ["US", "GB", "CA", "IE", "AU", "NZ", "FR", "SE", "IL", "DE", "AT", "IT", "ES", "NL", "BE", "PT", "CH", "HK", "JP", "KR", "SG", "NO", "DK", "FI", "CY", "LU", "MT", "PL", "RO", "HU", "CZ", "GR", "SK", "BR", "MX", "AR", "CL", "CO", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """TargetingAdvertiserCountry - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Advertiser's ISO two character country code.., must be one of ["US", "GB", "CA", "IE", "AU", "NZ", "FR", "SE", "IL", "DE", "AT", "IT", "ES", "NL", "BE", "PT", "CH", "HK", "JP", "KR", "SG", "NO", "DK", "FI", "CY", "LU", "MT", "PL", "RO", "HU", "CZ", "GR", "SK", "BR", "MX", "AR", "CL", "CO", ] # noqa: E501 + + Keyword Args: + value (str): Advertiser's ISO two character country code.., must be one of ["US", "GB", "CA", "IE", "AU", "NZ", "FR", "SE", "IL", "DE", "AT", "IT", "ES", "NL", "BE", "PT", "CH", "HK", "JP", "KR", "SG", "NO", "DK", "FI", "CY", "LU", "MT", "PL", "RO", "HU", "CZ", "GR", "SK", "BR", "MX", "AR", "CL", "CO", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/targeting_option_response.py b/openapi_generated/pinterest_client/model/targeting_option_response.py index 9732a10..7c32c4c 100644 --- a/openapi_generated/pinterest_client/model/targeting_option_response.py +++ b/openapi_generated/pinterest_client/model/targeting_option_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/targeting_spec.py b/openapi_generated/pinterest_client/model/targeting_spec.py index fa8208a..53d9291 100644 --- a/openapi_generated/pinterest_client/model/targeting_spec.py +++ b/openapi_generated/pinterest_client/model/targeting_spec.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -142,7 +142,7 @@ def discriminator(): 'age_bucket': 'AGE_BUCKET', # noqa: E501 'apptype': 'APPTYPE', # noqa: E501 'audience_exclude': 'AUDIENCE_EXCLUDE', # noqa: E501 - 'audience_include': 'AUDIENCE_INCLUDE'', # noqa: E501 + 'audience_include': 'AUDIENCE_INCLUDE', # noqa: E501 'gender': 'GENDER', # noqa: E501 'geo': 'GEO', # noqa: E501 'interest': 'INTEREST', # noqa: E501 @@ -198,10 +198,10 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 audience_exclude ([str], none_type): Excluded customer list IDs. Used to drive new customer acquisition goals. For example: [\"2542620905475\"]. Audience lists need to have at least 100 people with Pinterest accounts in them. If the AUDIENCE_EXCLUDE field is missing, the default behavior in terms of ad delivery is that **No users will be excluded**.. [optional] # noqa: E501 audience_include ([str], none_type): Targeted customer list IDs. For example: [\"2542620905473\"]. Audience lists need to have at least 100 people with Pinterest accounts in them Audience lists need to have at least 100 people with Pinterest accounts in them. If the AUDIENCE_INCLUDE field is missing, the default behavior in terms of ad delivery is that **All users will be included**.. [optional] # noqa: E501 gender ([str], none_type): Targeted genders. Values: [\"unknown\",\"male\",\"female\"]. If the GENDER field is missing, the default behavior in terms of ad delivery is that **All genders will be targeted**.. [optional] # noqa: E501 - geo ([str], none_type): Location region codes, e.g., \"BE-VOV\" (East Flanders, Belgium) For complete list, click here or postal codes, e.g., \"US-94107\". Use either region codes or postal codes but not both. If the GEO field is missing, the default behavior in terms of ad delivery is that **No geos will be selected**.. [optional] # noqa: E501 + geo ([str], none_type): Location region codes, e.g., \"BE-VOV\" (East Flanders, Belgium) For complete list, click here or postal codes, e.g., \"US-94107\". Use either region codes or postal codes but not both. At least one of LOCATION or GEO must be specified. If the GEO field is missing, then only LOCATION values will be targeted (see LOCATION field below).. [optional] # noqa: E501 interest ([str]): Array of interest object IDs. If the INTEREST field is missing, the default behavior in terms of ad delivery is that **All interests will be targeted**.. [optional] # noqa: E501 - locale ([str], none_type): 24 ISO 639-1 two letter language codes. If the LOCALE field is missing, the default behavior in terms of ad delivery is that **All languages will be target, only english non-sublanguage will be targeted**.. [optional] # noqa: E501 - location ([str], none_type): 22 ISO Alpha 2 two letter country codes or US Nielsen DMA (Designated Market Area) codes (location region codes) (e.g., [\"US\", \"807\"]). For complete list, click here. Location-Country and Location-Metro codes apply. If the LOCATION field is missing, the default behavior in terms of ad delivery is that **Selects default country if not specified (US) and all regions within that country**.. [optional] # noqa: E501 + locale ([str], none_type): 24 ISO 639-1 two letter language codes. If the LOCALE field is missing, the default behavior in terms of ad delivery is that **All languages will be targeted, only english non-sublanguage will be targeted**.. [optional] # noqa: E501 + location ([str], none_type): 22 ISO Alpha 2 two letter country codes or US Nielsen DMA (Designated Market Area) codes (location region codes) (e.g., [\"US\", \"807\"]). For complete list, click here. Location-Country and Location-Metro codes apply. At least one of LOCATION or GEO must be specified. If the LOCATION field is missing, then only GEO values will be targeted (see GEO field above).. [optional] # noqa: E501 shopping_retargeting ([TargetingSpecSHOPPINGRETARGETING], none_type): Array of object: lookback_window [Integer]: Number of days ago to start lookback timeframe for dynamic retargeting tag_types [Array of integer]: Event types to target for dynamic retargeting exclusion_window [Integer]: Number of days ago to stop lookback timeframe for dynamic retargeting. [optional] # noqa: E501 targeting_strategy ([str], none_type): [optional] # noqa: E501 """ @@ -290,10 +290,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 audience_exclude ([str], none_type): Excluded customer list IDs. Used to drive new customer acquisition goals. For example: [\"2542620905475\"]. Audience lists need to have at least 100 people with Pinterest accounts in them. If the AUDIENCE_EXCLUDE field is missing, the default behavior in terms of ad delivery is that **No users will be excluded**.. [optional] # noqa: E501 audience_include ([str], none_type): Targeted customer list IDs. For example: [\"2542620905473\"]. Audience lists need to have at least 100 people with Pinterest accounts in them Audience lists need to have at least 100 people with Pinterest accounts in them. If the AUDIENCE_INCLUDE field is missing, the default behavior in terms of ad delivery is that **All users will be included**.. [optional] # noqa: E501 gender ([str], none_type): Targeted genders. Values: [\"unknown\",\"male\",\"female\"]. If the GENDER field is missing, the default behavior in terms of ad delivery is that **All genders will be targeted**.. [optional] # noqa: E501 - geo ([str], none_type): Location region codes, e.g., \"BE-VOV\" (East Flanders, Belgium) For complete list, click here or postal codes, e.g., \"US-94107\". Use either region codes or postal codes but not both. If the GEO field is missing, the default behavior in terms of ad delivery is that **No geos will be selected**.. [optional] # noqa: E501 + geo ([str], none_type): Location region codes, e.g., \"BE-VOV\" (East Flanders, Belgium) For complete list, click here or postal codes, e.g., \"US-94107\". Use either region codes or postal codes but not both. At least one of LOCATION or GEO must be specified. If the GEO field is missing, then only LOCATION values will be targeted (see LOCATION field below).. [optional] # noqa: E501 interest ([str]): Array of interest object IDs. If the INTEREST field is missing, the default behavior in terms of ad delivery is that **All interests will be targeted**.. [optional] # noqa: E501 - locale ([str], none_type): 24 ISO 639-1 two letter language codes. If the LOCALE field is missing, the default behavior in terms of ad delivery is that **All languages will be target, only english non-sublanguage will be targeted**.. [optional] # noqa: E501 - location ([str], none_type): 22 ISO Alpha 2 two letter country codes or US Nielsen DMA (Designated Market Area) codes (location region codes) (e.g., [\"US\", \"807\"]). For complete list, click here. Location-Country and Location-Metro codes apply. If the LOCATION field is missing, the default behavior in terms of ad delivery is that **Selects default country if not specified (US) and all regions within that country**.. [optional] # noqa: E501 + locale ([str], none_type): 24 ISO 639-1 two letter language codes. If the LOCALE field is missing, the default behavior in terms of ad delivery is that **All languages will be targeted, only english non-sublanguage will be targeted**.. [optional] # noqa: E501 + location ([str], none_type): 22 ISO Alpha 2 two letter country codes or US Nielsen DMA (Designated Market Area) codes (location region codes) (e.g., [\"US\", \"807\"]). For complete list, click here. Location-Country and Location-Metro codes apply. At least one of LOCATION or GEO must be specified. If the LOCATION field is missing, then only GEO values will be targeted (see GEO field above).. [optional] # noqa: E501 shopping_retargeting ([TargetingSpecSHOPPINGRETARGETING], none_type): Array of object: lookback_window [Integer]: Number of days ago to start lookback timeframe for dynamic retargeting tag_types [Array of integer]: Event types to target for dynamic retargeting exclusion_window [Integer]: Number of days ago to stop lookback timeframe for dynamic retargeting. [optional] # noqa: E501 targeting_strategy ([str], none_type): [optional] # noqa: E501 """ diff --git a/openapi_generated/pinterest_client/model/targeting_spec_app_type.py b/openapi_generated/pinterest_client/model/targeting_spec_app_type.py new file mode 100644 index 0000000..bf67c55 --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_spec_app_type.py @@ -0,0 +1,287 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class TargetingSpecAppType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'ANDROID_MOBILE': "android_mobile", + 'ANDROID_TABLET': "android_tablet", + 'IPAD': "ipad", + 'IPHONE': "iphone", + 'WEB': "web", + 'WEB_MOBILE': "web_mobile", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """TargetingSpecAppType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["android_mobile", "android_tablet", "ipad", "iphone", "web", "web_mobile", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["android_mobile", "android_tablet", "ipad", "iphone", "web", "web_mobile", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """TargetingSpecAppType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["android_mobile", "android_tablet", "ipad", "iphone", "web", "web_mobile", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["android_mobile", "android_tablet", "ipad", "iphone", "web", "web_mobile", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/targeting_spec_shoppingretargeting.py b/openapi_generated/pinterest_client/model/targeting_spec_shoppingretargeting.py index 447d92a..c2e118f 100644 --- a/openapi_generated/pinterest_client/model/targeting_spec_shoppingretargeting.py +++ b/openapi_generated/pinterest_client/model/targeting_spec_shoppingretargeting.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/targeting_template_audience_sizing.py b/openapi_generated/pinterest_client/model/targeting_template_audience_sizing.py new file mode 100644 index 0000000..cdc4777 --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_audience_sizing.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.targeting_template_audience_sizing_reach_estimate import TargetingTemplateAudienceSizingReachEstimate + globals()['TargetingTemplateAudienceSizingReachEstimate'] = TargetingTemplateAudienceSizingReachEstimate + + +class TargetingTemplateAudienceSizing(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'reach_estimate': (TargetingTemplateAudienceSizingReachEstimate,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'reach_estimate': 'reach_estimate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TargetingTemplateAudienceSizing - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + reach_estimate (TargetingTemplateAudienceSizingReachEstimate): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TargetingTemplateAudienceSizing - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + reach_estimate (TargetingTemplateAudienceSizingReachEstimate): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/targeting_template_audience_sizing_reach_estimate.py b/openapi_generated/pinterest_client/model/targeting_template_audience_sizing_reach_estimate.py new file mode 100644 index 0000000..238680d --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_audience_sizing_reach_estimate.py @@ -0,0 +1,264 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class TargetingTemplateAudienceSizingReachEstimate(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'estimate': (int,), # noqa: E501 + 'lower_bound': (int,), # noqa: E501 + 'upper_bound': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'estimate': 'estimate', # noqa: E501 + 'lower_bound': 'lower_bound', # noqa: E501 + 'upper_bound': 'upper_bound', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TargetingTemplateAudienceSizingReachEstimate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + estimate (int): [optional] # noqa: E501 + lower_bound (int): [optional] # noqa: E501 + upper_bound (int): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TargetingTemplateAudienceSizingReachEstimate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + estimate (int): [optional] # noqa: E501 + lower_bound (int): [optional] # noqa: E501 + upper_bound (int): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/targeting_template_common.py b/openapi_generated/pinterest_client/model/targeting_template_common.py new file mode 100644 index 0000000..eb760fd --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_common.py @@ -0,0 +1,288 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.placement_group_type import PlacementGroupType + from openapi_generated.pinterest_client.model.targeting_spec import TargetingSpec + from openapi_generated.pinterest_client.model.targeting_template_keyword import TargetingTemplateKeyword + from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls + globals()['PlacementGroupType'] = PlacementGroupType + globals()['TargetingSpec'] = TargetingSpec + globals()['TargetingTemplateKeyword'] = TargetingTemplateKeyword + globals()['TrackingUrls'] = TrackingUrls + + +class TargetingTemplateCommon(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'auto_targeting_enabled': (bool,), # noqa: E501 + 'targeting_attributes': (TargetingSpec,), # noqa: E501 + 'placement_group': (PlacementGroupType,), # noqa: E501 + 'keywords': ([TargetingTemplateKeyword],), # noqa: E501 + 'tracking_urls': (TrackingUrls,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'auto_targeting_enabled': 'auto_targeting_enabled', # noqa: E501 + 'targeting_attributes': 'targeting_attributes', # noqa: E501 + 'placement_group': 'placement_group', # noqa: E501 + 'keywords': 'keywords', # noqa: E501 + 'tracking_urls': 'tracking_urls', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TargetingTemplateCommon - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): targeting template name. [optional] # noqa: E501 + auto_targeting_enabled (bool): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] if omitted the server will use the default value of True # noqa: E501 + targeting_attributes (TargetingSpec): [optional] # noqa: E501 + placement_group (PlacementGroupType): [optional] # noqa: E501 + keywords ([TargetingTemplateKeyword]): [optional] # noqa: E501 + tracking_urls (TrackingUrls): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TargetingTemplateCommon - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): targeting template name. [optional] # noqa: E501 + auto_targeting_enabled (bool): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] if omitted the server will use the default value of True # noqa: E501 + targeting_attributes (TargetingSpec): [optional] # noqa: E501 + placement_group (PlacementGroupType): [optional] # noqa: E501 + keywords ([TargetingTemplateKeyword]): [optional] # noqa: E501 + tracking_urls (TrackingUrls): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/targeting_template_create.py b/openapi_generated/pinterest_client/model/targeting_template_create.py new file mode 100644 index 0000000..377711c --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_create.py @@ -0,0 +1,342 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.placement_group_type import PlacementGroupType + from openapi_generated.pinterest_client.model.targeting_spec import TargetingSpec + from openapi_generated.pinterest_client.model.targeting_template_common import TargetingTemplateCommon + from openapi_generated.pinterest_client.model.targeting_template_create_all_of import TargetingTemplateCreateAllOf + from openapi_generated.pinterest_client.model.targeting_template_keyword import TargetingTemplateKeyword + from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls + globals()['PlacementGroupType'] = PlacementGroupType + globals()['TargetingSpec'] = TargetingSpec + globals()['TargetingTemplateCommon'] = TargetingTemplateCommon + globals()['TargetingTemplateCreateAllOf'] = TargetingTemplateCreateAllOf + globals()['TargetingTemplateKeyword'] = TargetingTemplateKeyword + globals()['TrackingUrls'] = TrackingUrls + + +class TargetingTemplateCreate(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'targeting_attributes': (TargetingSpec,), # noqa: E501 + 'auto_targeting_enabled': (bool,), # noqa: E501 + 'placement_group': (PlacementGroupType,), # noqa: E501 + 'keywords': ([TargetingTemplateKeyword],), # noqa: E501 + 'tracking_urls': (TrackingUrls,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'targeting_attributes': 'targeting_attributes', # noqa: E501 + 'auto_targeting_enabled': 'auto_targeting_enabled', # noqa: E501 + 'placement_group': 'placement_group', # noqa: E501 + 'keywords': 'keywords', # noqa: E501 + 'tracking_urls': 'tracking_urls', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TargetingTemplateCreate - a model defined in OpenAPI + + Keyword Args: + name (str): Name of targeting template. + targeting_attributes (TargetingSpec): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + auto_targeting_enabled (bool): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] if omitted the server will use the default value of True # noqa: E501 + placement_group (PlacementGroupType): [optional] # noqa: E501 + keywords ([TargetingTemplateKeyword]): [optional] # noqa: E501 + tracking_urls (TrackingUrls): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TargetingTemplateCreate - a model defined in OpenAPI + + Keyword Args: + name (str): Name of targeting template. + targeting_attributes (TargetingSpec): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + auto_targeting_enabled (bool): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] if omitted the server will use the default value of True # noqa: E501 + placement_group (PlacementGroupType): [optional] # noqa: E501 + keywords ([TargetingTemplateKeyword]): [optional] # noqa: E501 + tracking_urls (TrackingUrls): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/targeting_template_create_all_of.py b/openapi_generated/pinterest_client/model/targeting_template_create_all_of.py new file mode 100644 index 0000000..9c3536e --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_create_all_of.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.targeting_spec import TargetingSpec + globals()['TargetingSpec'] = TargetingSpec + + +class TargetingTemplateCreateAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'targeting_attributes': (TargetingSpec,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'targeting_attributes': 'targeting_attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, targeting_attributes, *args, **kwargs): # noqa: E501 + """TargetingTemplateCreateAllOf - a model defined in OpenAPI + + Args: + name (str): Name of targeting template. + targeting_attributes (TargetingSpec): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.targeting_attributes = targeting_attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, targeting_attributes, *args, **kwargs): # noqa: E501 + """TargetingTemplateCreateAllOf - a model defined in OpenAPI + + Args: + name (str): Name of targeting template. + targeting_attributes (TargetingSpec): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.targeting_attributes = targeting_attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/targeting_template_get_response_data.py b/openapi_generated/pinterest_client/model/targeting_template_get_response_data.py new file mode 100644 index 0000000..ad33a5f --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_get_response_data.py @@ -0,0 +1,382 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.placement_group_type import PlacementGroupType + from openapi_generated.pinterest_client.model.targeting_spec import TargetingSpec + from openapi_generated.pinterest_client.model.targeting_template_audience_sizing import TargetingTemplateAudienceSizing + from openapi_generated.pinterest_client.model.targeting_template_get_response_data1 import TargetingTemplateGetResponseData1 + from openapi_generated.pinterest_client.model.targeting_template_keyword import TargetingTemplateKeyword + from openapi_generated.pinterest_client.model.targeting_template_response_data import TargetingTemplateResponseData + from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls + globals()['PlacementGroupType'] = PlacementGroupType + globals()['TargetingSpec'] = TargetingSpec + globals()['TargetingTemplateAudienceSizing'] = TargetingTemplateAudienceSizing + globals()['TargetingTemplateGetResponseData1'] = TargetingTemplateGetResponseData1 + globals()['TargetingTemplateKeyword'] = TargetingTemplateKeyword + globals()['TargetingTemplateResponseData'] = TargetingTemplateResponseData + globals()['TrackingUrls'] = TrackingUrls + + +class TargetingTemplateGetResponseData(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('ad_account_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'auto_targeting_enabled': (bool,), # noqa: E501 + 'targeting_attributes': (TargetingSpec,), # noqa: E501 + 'placement_group': (PlacementGroupType,), # noqa: E501 + 'keywords': ([TargetingTemplateKeyword],), # noqa: E501 + 'tracking_urls': (TrackingUrls,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'created_time': (int,), # noqa: E501 + 'updated_time': (int,), # noqa: E501 + 'ad_account_id': (str,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'sizing': (TargetingTemplateAudienceSizing,), # noqa: E501 + 'valid': (bool, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'auto_targeting_enabled': 'auto_targeting_enabled', # noqa: E501 + 'targeting_attributes': 'targeting_attributes', # noqa: E501 + 'placement_group': 'placement_group', # noqa: E501 + 'keywords': 'keywords', # noqa: E501 + 'tracking_urls': 'tracking_urls', # noqa: E501 + 'id': 'id', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + 'updated_time': 'updated_time', # noqa: E501 + 'ad_account_id': 'ad_account_id', # noqa: E501 + 'status': 'status', # noqa: E501 + 'sizing': 'sizing', # noqa: E501 + 'valid': 'valid', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TargetingTemplateGetResponseData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): targeting template name. [optional] # noqa: E501 + auto_targeting_enabled (bool): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] if omitted the server will use the default value of True # noqa: E501 + targeting_attributes (TargetingSpec): [optional] # noqa: E501 + placement_group (PlacementGroupType): [optional] # noqa: E501 + keywords ([TargetingTemplateKeyword]): [optional] # noqa: E501 + tracking_urls (TrackingUrls): [optional] # noqa: E501 + id (str): Targeting template ID.. [optional] # noqa: E501 + created_time (int): Targeting template created time. Unix timestamp in seconds.. [optional] # noqa: E501 + updated_time (int): Targeting template updated time.Unix timestamp in seconds.. [optional] # noqa: E501 + ad_account_id (str): The ID of the advertiser that this targeting template belongs to.. [optional] # noqa: E501 + status (str): Indicate targeting template is active or Deleted. [optional] # noqa: E501 + sizing (TargetingTemplateAudienceSizing): [optional] # noqa: E501 + valid (bool, none_type): Inform if the targeting template is valid (ex. would be false if has revoked audience). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TargetingTemplateGetResponseData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): targeting template name. [optional] # noqa: E501 + auto_targeting_enabled (bool): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] if omitted the server will use the default value of True # noqa: E501 + targeting_attributes (TargetingSpec): [optional] # noqa: E501 + placement_group (PlacementGroupType): [optional] # noqa: E501 + keywords ([TargetingTemplateKeyword]): [optional] # noqa: E501 + tracking_urls (TrackingUrls): [optional] # noqa: E501 + id (str): Targeting template ID.. [optional] # noqa: E501 + created_time (int): Targeting template created time. Unix timestamp in seconds.. [optional] # noqa: E501 + updated_time (int): Targeting template updated time.Unix timestamp in seconds.. [optional] # noqa: E501 + ad_account_id (str): The ID of the advertiser that this targeting template belongs to.. [optional] # noqa: E501 + status (str): Indicate targeting template is active or Deleted. [optional] # noqa: E501 + sizing (TargetingTemplateAudienceSizing): [optional] # noqa: E501 + valid (bool, none_type): Inform if the targeting template is valid (ex. would be false if has revoked audience). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/targeting_template_get_response_data1.py b/openapi_generated/pinterest_client/model/targeting_template_get_response_data1.py new file mode 100644 index 0000000..e14a1f7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_get_response_data1.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class TargetingTemplateGetResponseData1(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'valid': (bool, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'valid': 'valid', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TargetingTemplateGetResponseData1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + valid (bool, none_type): Inform if the targeting template is valid (ex. would be false if has revoked audience). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TargetingTemplateGetResponseData1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + valid (bool, none_type): Inform if the targeting template is valid (ex. would be false if has revoked audience). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/targeting_template_keyword.py b/openapi_generated/pinterest_client/model/targeting_template_keyword.py new file mode 100644 index 0000000..326913d --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_keyword.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.match_type import MatchType + globals()['MatchType'] = MatchType + + +class TargetingTemplateKeyword(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'match_type': (MatchType,), # noqa: E501 + 'value': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'match_type': 'match_type', # noqa: E501 + 'value': 'value', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TargetingTemplateKeyword - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + match_type (MatchType): [optional] # noqa: E501 + value (str): The keyword targeting (120 chars max).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TargetingTemplateKeyword - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + match_type (MatchType): [optional] # noqa: E501 + value (str): The keyword targeting (120 chars max).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/targeting_template_response_data.py b/openapi_generated/pinterest_client/model/targeting_template_response_data.py new file mode 100644 index 0000000..3bdb05d --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_response_data.py @@ -0,0 +1,378 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.placement_group_type import PlacementGroupType + from openapi_generated.pinterest_client.model.targeting_spec import TargetingSpec + from openapi_generated.pinterest_client.model.targeting_template_audience_sizing import TargetingTemplateAudienceSizing + from openapi_generated.pinterest_client.model.targeting_template_common import TargetingTemplateCommon + from openapi_generated.pinterest_client.model.targeting_template_keyword import TargetingTemplateKeyword + from openapi_generated.pinterest_client.model.targeting_template_response_data1 import TargetingTemplateResponseData1 + from openapi_generated.pinterest_client.model.tracking_urls import TrackingUrls + globals()['PlacementGroupType'] = PlacementGroupType + globals()['TargetingSpec'] = TargetingSpec + globals()['TargetingTemplateAudienceSizing'] = TargetingTemplateAudienceSizing + globals()['TargetingTemplateCommon'] = TargetingTemplateCommon + globals()['TargetingTemplateKeyword'] = TargetingTemplateKeyword + globals()['TargetingTemplateResponseData1'] = TargetingTemplateResponseData1 + globals()['TrackingUrls'] = TrackingUrls + + +class TargetingTemplateResponseData(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('ad_account_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'auto_targeting_enabled': (bool,), # noqa: E501 + 'targeting_attributes': (TargetingSpec,), # noqa: E501 + 'placement_group': (PlacementGroupType,), # noqa: E501 + 'keywords': ([TargetingTemplateKeyword],), # noqa: E501 + 'tracking_urls': (TrackingUrls,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'created_time': (int,), # noqa: E501 + 'updated_time': (int,), # noqa: E501 + 'ad_account_id': (str,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'sizing': (TargetingTemplateAudienceSizing,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'auto_targeting_enabled': 'auto_targeting_enabled', # noqa: E501 + 'targeting_attributes': 'targeting_attributes', # noqa: E501 + 'placement_group': 'placement_group', # noqa: E501 + 'keywords': 'keywords', # noqa: E501 + 'tracking_urls': 'tracking_urls', # noqa: E501 + 'id': 'id', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + 'updated_time': 'updated_time', # noqa: E501 + 'ad_account_id': 'ad_account_id', # noqa: E501 + 'status': 'status', # noqa: E501 + 'sizing': 'sizing', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TargetingTemplateResponseData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): targeting template name. [optional] # noqa: E501 + auto_targeting_enabled (bool): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] if omitted the server will use the default value of True # noqa: E501 + targeting_attributes (TargetingSpec): [optional] # noqa: E501 + placement_group (PlacementGroupType): [optional] # noqa: E501 + keywords ([TargetingTemplateKeyword]): [optional] # noqa: E501 + tracking_urls (TrackingUrls): [optional] # noqa: E501 + id (str): Targeting template ID.. [optional] # noqa: E501 + created_time (int): Targeting template created time. Unix timestamp in seconds.. [optional] # noqa: E501 + updated_time (int): Targeting template updated time.Unix timestamp in seconds.. [optional] # noqa: E501 + ad_account_id (str): The ID of the advertiser that this targeting template belongs to.. [optional] # noqa: E501 + status (str): Indicate targeting template is active or Deleted. [optional] # noqa: E501 + sizing (TargetingTemplateAudienceSizing): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TargetingTemplateResponseData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): targeting template name. [optional] # noqa: E501 + auto_targeting_enabled (bool): Enable auto-targeting for ad group. Also known as \"expanded targeting\".. [optional] if omitted the server will use the default value of True # noqa: E501 + targeting_attributes (TargetingSpec): [optional] # noqa: E501 + placement_group (PlacementGroupType): [optional] # noqa: E501 + keywords ([TargetingTemplateKeyword]): [optional] # noqa: E501 + tracking_urls (TrackingUrls): [optional] # noqa: E501 + id (str): Targeting template ID.. [optional] # noqa: E501 + created_time (int): Targeting template created time. Unix timestamp in seconds.. [optional] # noqa: E501 + updated_time (int): Targeting template updated time.Unix timestamp in seconds.. [optional] # noqa: E501 + ad_account_id (str): The ID of the advertiser that this targeting template belongs to.. [optional] # noqa: E501 + status (str): Indicate targeting template is active or Deleted. [optional] # noqa: E501 + sizing (TargetingTemplateAudienceSizing): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + + ], + 'oneOf': [ + ], + } diff --git a/openapi_generated/pinterest_client/model/targeting_template_response_data1.py b/openapi_generated/pinterest_client/model/targeting_template_response_data1.py new file mode 100644 index 0000000..70eeb90 --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_response_data1.py @@ -0,0 +1,292 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.targeting_template_audience_sizing import TargetingTemplateAudienceSizing + globals()['TargetingTemplateAudienceSizing'] = TargetingTemplateAudienceSizing + + +class TargetingTemplateResponseData1(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('ad_account_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'created_time': (int,), # noqa: E501 + 'updated_time': (int,), # noqa: E501 + 'ad_account_id': (str,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'sizing': (TargetingTemplateAudienceSizing,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + 'updated_time': 'updated_time', # noqa: E501 + 'ad_account_id': 'ad_account_id', # noqa: E501 + 'status': 'status', # noqa: E501 + 'sizing': 'sizing', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TargetingTemplateResponseData1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Targeting template ID.. [optional] # noqa: E501 + created_time (int): Targeting template created time. Unix timestamp in seconds.. [optional] # noqa: E501 + updated_time (int): Targeting template updated time.Unix timestamp in seconds.. [optional] # noqa: E501 + ad_account_id (str): The ID of the advertiser that this targeting template belongs to.. [optional] # noqa: E501 + status (str): Indicate targeting template is active or Deleted. [optional] # noqa: E501 + sizing (TargetingTemplateAudienceSizing): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TargetingTemplateResponseData1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Targeting template ID.. [optional] # noqa: E501 + created_time (int): Targeting template created time. Unix timestamp in seconds.. [optional] # noqa: E501 + updated_time (int): Targeting template updated time.Unix timestamp in seconds.. [optional] # noqa: E501 + ad_account_id (str): The ID of the advertiser that this targeting template belongs to.. [optional] # noqa: E501 + status (str): Indicate targeting template is active or Deleted. [optional] # noqa: E501 + sizing (TargetingTemplateAudienceSizing): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/targeting_template_update_request.py b/openapi_generated/pinterest_client/model/targeting_template_update_request.py new file mode 100644 index 0000000..be3de9b --- /dev/null +++ b/openapi_generated/pinterest_client/model/targeting_template_update_request.py @@ -0,0 +1,278 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class TargetingTemplateUpdateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('operation_type',): { + 'REMOVE': "REMOVE", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'operation_type': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'operation_type': 'operation_type', # noqa: E501 + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """TargetingTemplateUpdateRequest - a model defined in OpenAPI + + Args: + id (str): Targeting template ID + + Keyword Args: + operation_type (str): defaults to "REMOVE", must be one of ["REMOVE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation_type = kwargs.get('operation_type', "REMOVE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.operation_type = operation_type + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """TargetingTemplateUpdateRequest - a model defined in OpenAPI + + Args: + id (str): Targeting template ID + + Keyword Args: + operation_type (str): defaults to "REMOVE", must be one of ["REMOVE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + operation_type = kwargs.get('operation_type', "REMOVE") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.operation_type = operation_type + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/targeting_type_filter.py b/openapi_generated/pinterest_client/model/targeting_type_filter.py index 4fe43c1..6eb0605 100644 --- a/openapi_generated/pinterest_client/model/targeting_type_filter.py +++ b/openapi_generated/pinterest_client/model/targeting_type_filter.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -145,7 +145,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - targeting_types ([AdsAnalyticsTargetingType]): List of targeting types. Requires `level` to be a value ending in `_TARGETING`.. [optional] # noqa: E501 + targeting_types ([AdsAnalyticsTargetingType]): List of targeting types. Requires `level` to be a value ending in `_TARGETING`. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -227,7 +227,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - targeting_types ([AdsAnalyticsTargetingType]): List of targeting types. Requires `level` to be a value ending in `_TARGETING`.. [optional] # noqa: E501 + targeting_types ([AdsAnalyticsTargetingType]): List of targeting types. Requires `level` to be a value ending in `_TARGETING`. [\"AGE_BUCKET_AND_GENDER\"] is in BETA and not yet available to all users.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/openapi_generated/pinterest_client/model/template_response.py b/openapi_generated/pinterest_client/model/template_response.py index 497584c..e258aa6 100644 --- a/openapi_generated/pinterest_client/model/template_response.py +++ b/openapi_generated/pinterest_client/model/template_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -89,7 +89,9 @@ class TemplateResponse(ModelNormal): 'AD_ONLY_PIN': "AD_ONLY_PIN", 'CAMPAIGN_NAME': "CAMPAIGN_NAME", 'CAMPAIGN_STATUS': "CAMPAIGN_STATUS", + 'IS_CAMPAIGN_LEARNING_PHASE': "IS_CAMPAIGN_LEARNING_PHASE", 'DATE': "DATE", + 'DATE_AS_TIMESTAMP': "DATE_AS_TIMESTAMP", 'BUDGET_IN_DOLLAR': "BUDGET_IN_DOLLAR", 'AVAILABLE_BUDGET_IN_DOLLAR': "AVAILABLE_BUDGET_IN_DOLLAR", 'TARGETING_TYPE': "TARGETING_TYPE", @@ -172,8 +174,20 @@ class TemplateResponse(ModelNormal): 'ITEM_ID': "ITEM_ID", 'PRODUCT_ITEM_ID': "PRODUCT_ITEM_ID", 'INTERNAL_PRODUCT_ITEM_ID': "INTERNAL_PRODUCT_ITEM_ID", + 'INTERNAL_PRODUCT_ITEM_ID_STR': "INTERNAL_PRODUCT_ITEM_ID_STR", + 'PRODUCT_ITEM_NAME': "PRODUCT_ITEM_NAME", + 'PRODUCT_ITEM_IMAGE_URL': "PRODUCT_ITEM_IMAGE_URL", + 'PRODUCT_ITEM_PRICE': "PRODUCT_ITEM_PRICE", 'ORDER_LINE_ID': "ORDER_LINE_ID", 'ORDER_LINE_NAME': "ORDER_LINE_NAME", + 'ORDER_LINE_PIN_REV_SHARE': "ORDER_LINE_PIN_REV_SHARE", + 'ORDER_LINE_PAID_TYPE': "ORDER_LINE_PAID_TYPE", + 'SPEND_ORDER_LINE_ID': "SPEND_ORDER_LINE_ID", + 'SPEND_ORDER_LINE_PAID_TYPE': "SPEND_ORDER_LINE_PAID_TYPE", + 'CONVERSION_PRODUCT_ID': "CONVERSION_PRODUCT_ID", + 'CONVERSION_PRODUCT_NAME': "CONVERSION_PRODUCT_NAME", + 'CONVERSION_PRODUCT_BRAND': "CONVERSION_PRODUCT_BRAND", + 'CONVERSION_PRODUCT_CATEGORY': "CONVERSION_PRODUCT_CATEGORY", 'CLICKTHROUGH_1': "CLICKTHROUGH_1", 'REPIN_1': "REPIN_1", 'IMPRESSION_1': "IMPRESSION_1", @@ -213,8 +227,11 @@ class TemplateResponse(ModelNormal): 'TOTAL_SEND': "TOTAL_SEND", 'TOTAL_FLAG': "TOTAL_FLAG", 'TOTAL_IMPRESSION_USER': "TOTAL_IMPRESSION_USER", + 'TOTAL_IMPRESSION_USER_HLL': "TOTAL_IMPRESSION_USER_HLL", 'TOTAL_IMPRESSION_FREQUENCY': "TOTAL_IMPRESSION_FREQUENCY", + 'TOTAL_IMPRESSION_FREQUENCY_HLL': "TOTAL_IMPRESSION_FREQUENCY_HLL", 'TOTAL_OUTBOUND_CLICK': "TOTAL_OUTBOUND_CLICK", + 'COST_PER_OUTBOUND_CLICK_IN_DOLLAR': "COST_PER_OUTBOUND_CLICK_IN_DOLLAR", 'ENGAGEMENT_PAGE_VISIT_1': "ENGAGEMENT_PAGE_VISIT_1", 'ENGAGEMENT_SIGNUP_1': "ENGAGEMENT_SIGNUP_1", 'ENGAGEMENT_CHECKOUT_1': "ENGAGEMENT_CHECKOUT_1", @@ -642,6 +659,8 @@ class TemplateResponse(ModelNormal): 'IS_AUTOMATED_CAMPAIGN': "IS_AUTOMATED_CAMPAIGN", 'IS_PREMIERE_CAMPAIGN': "IS_PREMIERE_CAMPAIGN", 'FLEXIBLE_DAILY_BUDGETS': "FLEXIBLE_DAILY_BUDGETS", + 'IS_PERFORMANCE_PLUS_CAMPAIGN': "IS_PERFORMANCE_PLUS_CAMPAIGN", + 'IS_DCO_FORMAT_ENHANCMENT': "IS_DCO_FORMAT_ENHANCMENT", 'PERCENT_CROSS_DEVICE_CONVERSIONS': "PERCENT_CROSS_DEVICE_CONVERSIONS", 'PAGE_VISIT_PERCENT_CROSS_DEVICE_CONVERSIONS': "PAGE_VISIT_PERCENT_CROSS_DEVICE_CONVERSIONS", 'SIGNUP_PERCENT_CROSS_DEVICE_CONVERSIONS': "SIGNUP_PERCENT_CROSS_DEVICE_CONVERSIONS", @@ -794,6 +813,16 @@ class TemplateResponse(ModelNormal): 'AVERAGE_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR': "AVERAGE_WATCH_VIDEO_VALUE_IN_MICRO_DOLLAR", 'AVERAGE_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR': "AVERAGE_VIEW_CATEGORY_VALUE_IN_MICRO_DOLLAR", 'AVERAGE_UNKNOWN_VALUE_IN_MICRO_DOLLAR': "AVERAGE_UNKNOWN_VALUE_IN_MICRO_DOLLAR", + 'AVERAGE_PAGE_VISIT_VALUE_IN_MICRO_US_DOLLAR': "AVERAGE_PAGE_VISIT_VALUE_IN_MICRO_US_DOLLAR", + 'AVERAGE_SIGNUP_VALUE_IN_MICRO_US_DOLLAR': "AVERAGE_SIGNUP_VALUE_IN_MICRO_US_DOLLAR", + 'AVERAGE_CHECKOUT_VALUE_IN_MICRO_US_DOLLAR': "AVERAGE_CHECKOUT_VALUE_IN_MICRO_US_DOLLAR", + 'AVERAGE_CUSTOM_VALUE_IN_MICRO_US_DOLLAR': "AVERAGE_CUSTOM_VALUE_IN_MICRO_US_DOLLAR", + 'AVERAGE_ADD_TO_CART_VALUE_IN_MICRO_US_DOLLAR': "AVERAGE_ADD_TO_CART_VALUE_IN_MICRO_US_DOLLAR", + 'AVERAGE_LEAD_VALUE_IN_MICRO_US_DOLLAR': "AVERAGE_LEAD_VALUE_IN_MICRO_US_DOLLAR", + 'AVERAGE_SEARCH_VALUE_IN_MICRO_US_DOLLAR': "AVERAGE_SEARCH_VALUE_IN_MICRO_US_DOLLAR", + 'AVERAGE_WATCH_VIDEO_VALUE_IN_MICRO_US_DOLLAR': "AVERAGE_WATCH_VIDEO_VALUE_IN_MICRO_US_DOLLAR", + 'AVERAGE_VIEW_CATEGORY_VALUE_IN_MICRO_US_DOLLAR': "AVERAGE_VIEW_CATEGORY_VALUE_IN_MICRO_US_DOLLAR", + 'AVERAGE_UNKNOWN_VALUE_IN_MICRO_US_DOLLAR': "AVERAGE_UNKNOWN_VALUE_IN_MICRO_US_DOLLAR", 'TOTAL_PAGE_VISIT_VALUE_IN_MICRO_US_DOLLAR': "TOTAL_PAGE_VISIT_VALUE_IN_MICRO_US_DOLLAR", 'TOTAL_SIGNUP_VALUE_IN_MICRO_US_DOLLAR': "TOTAL_SIGNUP_VALUE_IN_MICRO_US_DOLLAR", 'TOTAL_CHECKOUT_VALUE_IN_MICRO_US_DOLLAR': "TOTAL_CHECKOUT_VALUE_IN_MICRO_US_DOLLAR", @@ -929,6 +958,9 @@ class TemplateResponse(ModelNormal): 'VIDEO_AVG_WATCHTIME_2': "VIDEO_AVG_WATCHTIME_2", 'VIDEO_MRC_VIEWS_2': "VIDEO_MRC_VIEWS_2", 'VIDEO_VIEW_RATE_2': "VIDEO_VIEW_RATE_2", + 'PAID_VIDEO_VIEW': "PAID_VIDEO_VIEW", + 'PAID_VIDEO_IMPRESSION': "PAID_VIDEO_IMPRESSION", + 'PAID_VIDEO_VIEWABLE_RATE': "PAID_VIDEO_VIEWABLE_RATE", 'VIDEO_LENGTH': "VIDEO_LENGTH", 'CPV_IN_MICRO_DOLLAR': "CPV_IN_MICRO_DOLLAR", 'CPV_IN_DOLLAR': "CPV_IN_DOLLAR", @@ -1058,6 +1090,7 @@ class TemplateResponse(ModelNormal): 'REPORT_DATE_START': "REPORT_DATE_START", 'REPORT_DATE_END': "REPORT_DATE_END", 'PINNER_LIST_NAME': "PINNER_LIST_NAME", + 'PINNER_LIST_TYPE': "PINNER_LIST_TYPE", 'ORDER_VALUE': "ORDER_VALUE", 'ORDER_QUANTITY': "ORDER_QUANTITY", 'ADVERTISER_NAME': "ADVERTISER_NAME", @@ -1397,6 +1430,8 @@ class TemplateResponse(ModelNormal): 'SHOWCASE_SUBPAGE_CLOSEUP': "SHOWCASE_SUBPAGE_CLOSEUP", 'SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD': "SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD", 'SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD': "SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD", + '_SHOWCASE_SUBPAGE_CLOSEUP_INTERNAL': "_SHOWCASE_SUBPAGE_CLOSEUP_INTERNAL", + 'SHOWCASE_CARD_LANDING': "SHOWCASE_CARD_LANDING", 'SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION': "SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION", 'TOTAL_CHECKOUT_CONVERSION_RATE': "TOTAL_CHECKOUT_CONVERSION_RATE", 'TOTAL_VIEW_CATEGORY_CONVERSION_RATE': "TOTAL_VIEW_CATEGORY_CONVERSION_RATE", @@ -1408,6 +1443,216 @@ class TemplateResponse(ModelNormal): 'TOTAL_WATCH_VIDEO_CONVERSION_RATE': "TOTAL_WATCH_VIDEO_CONVERSION_RATE", 'TOTAL_UNKNOWN_CONVERSION_RATE': "TOTAL_UNKNOWN_CONVERSION_RATE", 'TOTAL_CUSTOM_CONVERSION_RATE': "TOTAL_CUSTOM_CONVERSION_RATE", + 'STANDARD_AD_FEED_ITEM_ID': "STANDARD_AD_FEED_ITEM_ID", + 'IS_STANDARD_FEED_AD': "IS_STANDARD_FEED_AD", + 'TARGETING_GENDER': "TARGETING_GENDER", + 'TARGETING_CREATIVE_TYPE': "TARGETING_CREATIVE_TYPE", + 'TARGETING_COUNTRY': "TARGETING_COUNTRY", + 'TARGETING_LOCATION': "TARGETING_LOCATION", + 'TARGETING_APPTYPE': "TARGETING_APPTYPE", + 'TARGETING_LOCATION_CODE': "TARGETING_LOCATION_CODE", + 'TARGETING_MEDIA_TYPE': "TARGETING_MEDIA_TYPE", + 'TOTAL_CONVERSION_PRODUCT_QUANTITY': "TOTAL_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_CONVERSION_PRODUCT_VALUE': "TOTAL_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE", + 'TOTAL_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'CONVERSION_PRODUCT_COUNT_UNIQUE': "CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_CHECKOUT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE': "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY': "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE': "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", + 'TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE': "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_SIGNUP_CONVERSION_PRODUCT_QUANTITY': "TOTAL_SIGNUP_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE': "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE", + 'TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE': "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_LEAD_CONVERSION_PRODUCT_QUANTITY': "TOTAL_LEAD_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_LEAD_CONVERSION_PRODUCT_VALUE': "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE", + 'TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_LEAD_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_SEARCH_CONVERSION_PRODUCT_QUANTITY': "TOTAL_SEARCH_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE': "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE", + 'TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY': "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE': "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", + 'TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_CUSTOM_CONVERSION_PRODUCT_QUANTITY': "TOTAL_CUSTOM_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE': "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE", + 'TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_UNKNOWN_CONVERSION_PRODUCT_QUANTITY': "TOTAL_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE': "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE", + 'TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS': "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_UNITS", + 'TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD': "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_MICRO_USD", + 'TOTAL_CHECKOUT_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_CHECKOUT_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_SIGNUP_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_SIGNUP_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_LEAD_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_LEAD_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WEB_LEAD_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_SEARCH_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_SEARCH_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_CUSTOM_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_CUSTOM_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_UNKNOWN_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_UNKNOWN_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_COUNT_UNIQUE", + 'TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_COUNT_UNIQUE': "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_COUNT_UNIQUE", }, ('conversion_report_time_type',): { 'AD_ACTION': "TIME_OF_AD_ACTION", diff --git a/openapi_generated/pinterest_client/model/template_response_date_range.py b/openapi_generated/pinterest_client/model/template_response_date_range.py index 1cd0440..26f63bd 100644 --- a/openapi_generated/pinterest_client/model/template_response_date_range.py +++ b/openapi_generated/pinterest_client/model/template_response_date_range.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/template_response_date_range_absolute_date_range.py b/openapi_generated/pinterest_client/model/template_response_date_range_absolute_date_range.py index 65a3760..f463cb8 100644 --- a/openapi_generated/pinterest_client/model/template_response_date_range_absolute_date_range.py +++ b/openapi_generated/pinterest_client/model/template_response_date_range_absolute_date_range.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/template_response_date_range_dynamic_date_range.py b/openapi_generated/pinterest_client/model/template_response_date_range_dynamic_date_range.py index 7451317..c86467c 100644 --- a/openapi_generated/pinterest_client/model/template_response_date_range_dynamic_date_range.py +++ b/openapi_generated/pinterest_client/model/template_response_date_range_dynamic_date_range.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/template_response_date_range_relative_date_range.py b/openapi_generated/pinterest_client/model/template_response_date_range_relative_date_range.py index 3a49c17..5504ace 100644 --- a/openapi_generated/pinterest_client/model/template_response_date_range_relative_date_range.py +++ b/openapi_generated/pinterest_client/model/template_response_date_range_relative_date_range.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/terms_of_service.py b/openapi_generated/pinterest_client/model/terms_of_service.py index 37b7131..6f21587 100644 --- a/openapi_generated/pinterest_client/model/terms_of_service.py +++ b/openapi_generated/pinterest_client/model/terms_of_service.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/terms_suggested_response.py b/openapi_generated/pinterest_client/model/terms_suggested_response.py index d0e75f2..17cbcde 100644 --- a/openapi_generated/pinterest_client/model/terms_suggested_response.py +++ b/openapi_generated/pinterest_client/model/terms_suggested_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/top_pins_analytics_response.py b/openapi_generated/pinterest_client/model/top_pins_analytics_response.py index 8a72015..58dddd2 100644 --- a/openapi_generated/pinterest_client/model/top_pins_analytics_response.py +++ b/openapi_generated/pinterest_client/model/top_pins_analytics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/top_pins_analytics_response_date_availability.py b/openapi_generated/pinterest_client/model/top_pins_analytics_response_date_availability.py index a4059f2..259c272 100644 --- a/openapi_generated/pinterest_client/model/top_pins_analytics_response_date_availability.py +++ b/openapi_generated/pinterest_client/model/top_pins_analytics_response_date_availability.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/top_pins_analytics_response_pins.py b/openapi_generated/pinterest_client/model/top_pins_analytics_response_pins.py index 7dedb82..c4bf800 100644 --- a/openapi_generated/pinterest_client/model/top_pins_analytics_response_pins.py +++ b/openapi_generated/pinterest_client/model/top_pins_analytics_response_pins.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/top_video_pins_analytics_response.py b/openapi_generated/pinterest_client/model/top_video_pins_analytics_response.py index cf45b84..23f7c47 100644 --- a/openapi_generated/pinterest_client/model/top_video_pins_analytics_response.py +++ b/openapi_generated/pinterest_client/model/top_video_pins_analytics_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/top_video_pins_analytics_response_pins.py b/openapi_generated/pinterest_client/model/top_video_pins_analytics_response_pins.py index c95ab6e..7141397 100644 --- a/openapi_generated/pinterest_client/model/top_video_pins_analytics_response_pins.py +++ b/openapi_generated/pinterest_client/model/top_video_pins_analytics_response_pins.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/tracking_urls.py b/openapi_generated/pinterest_client/model/tracking_urls.py index a853200..4aaa4f2 100644 --- a/openapi_generated/pinterest_client/model/tracking_urls.py +++ b/openapi_generated/pinterest_client/model/tracking_urls.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/trend_type.py b/openapi_generated/pinterest_client/model/trend_type.py index 0432640..7d4ec1f 100644 --- a/openapi_generated/pinterest_client/model/trend_type.py +++ b/openapi_generated/pinterest_client/model/trend_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/trending_keywords_response.py b/openapi_generated/pinterest_client/model/trending_keywords_response.py index 40a2482..8c1d5b8 100644 --- a/openapi_generated/pinterest_client/model/trending_keywords_response.py +++ b/openapi_generated/pinterest_client/model/trending_keywords_response.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/trending_keywords_response_trends.py b/openapi_generated/pinterest_client/model/trending_keywords_response_trends.py index aab5615..1e7f543 100644 --- a/openapi_generated/pinterest_client/model/trending_keywords_response_trends.py +++ b/openapi_generated/pinterest_client/model/trending_keywords_response_trends.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/trends_supported_region.py b/openapi_generated/pinterest_client/model/trends_supported_region.py index ed7bc94..47d3210 100644 --- a/openapi_generated/pinterest_client/model/trends_supported_region.py +++ b/openapi_generated/pinterest_client/model/trends_supported_region.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/updatable_item_attributes.py b/openapi_generated/pinterest_client/model/updatable_item_attributes.py index 4b18ef4..2bfc77c 100644 --- a/openapi_generated/pinterest_client/model/updatable_item_attributes.py +++ b/openapi_generated/pinterest_client/model/updatable_item_attributes.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -229,7 +229,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 availability (str): The availability of the product. Must be one of the following values (upper or lowercased): ‘in stock’, ‘out of stock’ , ‘preorder’.. [optional] # noqa: E501 average_review_rating (float, none_type): Average reviews for the item. Can be a number from 1-5.. [optional] # noqa: E501 brand (str, none_type): The brand of the product.. [optional] # noqa: E501 - checkout_enabled (bool, none_type): Set this attribute to FALSE to indicate items that should be excluded from the Pinterest Checkout program. Note, this product is currently being tested and your account must be enrolled. Please contact your Account Manager or contact us for more information.. [optional] # noqa: E501 + checkout_enabled (bool, none_type): This attribute is not supported anymore.. [optional] # noqa: E501 color (str, none_type): The primary color of the product.. [optional] # noqa: E501 condition (str, none_type): The condition of the product. Must be one of the following values (upper or lowercased): ‘new’, ‘used’, or ‘refurbished’.. [optional] # noqa: E501 custom_label_0 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 @@ -355,7 +355,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 availability (str): The availability of the product. Must be one of the following values (upper or lowercased): ‘in stock’, ‘out of stock’ , ‘preorder’.. [optional] # noqa: E501 average_review_rating (float, none_type): Average reviews for the item. Can be a number from 1-5.. [optional] # noqa: E501 brand (str, none_type): The brand of the product.. [optional] # noqa: E501 - checkout_enabled (bool, none_type): Set this attribute to FALSE to indicate items that should be excluded from the Pinterest Checkout program. Note, this product is currently being tested and your account must be enrolled. Please contact your Account Manager or contact us for more information.. [optional] # noqa: E501 + checkout_enabled (bool, none_type): This attribute is not supported anymore.. [optional] # noqa: E501 color (str, none_type): The primary color of the product.. [optional] # noqa: E501 condition (str, none_type): The condition of the product. Must be one of the following values (upper or lowercased): ‘new’, ‘used’, or ‘refurbished’.. [optional] # noqa: E501 custom_label_0 (str, none_type):

    <= 1000 characters

    Custom grouping of products.

    . [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model/update_asset_group_body.py b/openapi_generated/pinterest_client/model/update_asset_group_body.py new file mode 100644 index 0000000..83777f9 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_asset_group_body.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.update_asset_group_body_asset_groups_to_update import UpdateAssetGroupBodyAssetGroupsToUpdate + globals()['UpdateAssetGroupBodyAssetGroupsToUpdate'] = UpdateAssetGroupBodyAssetGroupsToUpdate + + +class UpdateAssetGroupBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_groups_to_update': ([UpdateAssetGroupBodyAssetGroupsToUpdate],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_groups_to_update': 'asset_groups_to_update', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateAssetGroupBody - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_groups_to_update ([UpdateAssetGroupBodyAssetGroupsToUpdate]): A list of asset groups and the data that will be used to update them.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateAssetGroupBody - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_groups_to_update ([UpdateAssetGroupBodyAssetGroupsToUpdate]): A list of asset groups and the data that will be used to update them.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_asset_group_body_asset_groups_to_update.py b/openapi_generated/pinterest_client/model/update_asset_group_body_asset_groups_to_update.py new file mode 100644 index 0000000..ed00913 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_asset_group_body_asset_groups_to_update.py @@ -0,0 +1,288 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_group_types import AssetGroupTypes + globals()['AssetGroupTypes'] = AssetGroupTypes + + +class UpdateAssetGroupBodyAssetGroupsToUpdate(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_group_id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'asset_group_types': (AssetGroupTypes,), # noqa: E501 + 'assets_to_add': ([str],), # noqa: E501 + 'assets_to_remove': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_group_id': 'asset_group_id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'asset_group_types': 'asset_group_types', # noqa: E501 + 'assets_to_add': 'assets_to_add', # noqa: E501 + 'assets_to_remove': 'assets_to_remove', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, asset_group_id, *args, **kwargs): # noqa: E501 + """UpdateAssetGroupBodyAssetGroupsToUpdate - a model defined in OpenAPI + + Args: + asset_group_id (str): Unique identifier of the asset group to update. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Asset Group name. [optional] # noqa: E501 + description (str): Asset group description. [optional] # noqa: E501 + asset_group_types (AssetGroupTypes): [optional] # noqa: E501 + assets_to_add ([str]): A list of asset ids to add to the asset group.. [optional] # noqa: E501 + assets_to_remove ([str]): A list of asset ids to remove from the asset group.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_group_id = asset_group_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, asset_group_id, *args, **kwargs): # noqa: E501 + """UpdateAssetGroupBodyAssetGroupsToUpdate - a model defined in OpenAPI + + Args: + asset_group_id (str): Unique identifier of the asset group to update. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): Asset Group name. [optional] # noqa: E501 + description (str): Asset group description. [optional] # noqa: E501 + asset_group_types (AssetGroupTypes): [optional] # noqa: E501 + assets_to_add ([str]): A list of asset ids to add to the asset group.. [optional] # noqa: E501 + assets_to_remove ([str]): A list of asset ids to remove from the asset group.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_group_id = asset_group_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_asset_group_response.py b/openapi_generated/pinterest_client/model/update_asset_group_response.py new file mode 100644 index 0000000..6d24664 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_asset_group_response.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.asset_group_binding import AssetGroupBinding + from openapi_generated.pinterest_client.model.update_asset_group_response_exceptions import UpdateAssetGroupResponseExceptions + globals()['AssetGroupBinding'] = AssetGroupBinding + globals()['UpdateAssetGroupResponseExceptions'] = UpdateAssetGroupResponseExceptions + + +class UpdateAssetGroupResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'updated_asset_groups': ([AssetGroupBinding],), # noqa: E501 + 'exceptions': ([UpdateAssetGroupResponseExceptions], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'updated_asset_groups': 'updated_asset_groups', # noqa: E501 + 'exceptions': 'exceptions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateAssetGroupResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + updated_asset_groups ([AssetGroupBinding]): A list of successfully edited asset groups.. [optional] # noqa: E501 + exceptions ([UpdateAssetGroupResponseExceptions], none_type): A list of errors associated with the asset groups. Will be returned if there is an error.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateAssetGroupResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + updated_asset_groups ([AssetGroupBinding]): A list of successfully edited asset groups.. [optional] # noqa: E501 + exceptions ([UpdateAssetGroupResponseExceptions], none_type): A list of errors associated with the asset groups. Will be returned if there is an error.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_asset_group_response_exceptions.py b/openapi_generated/pinterest_client/model/update_asset_group_response_exceptions.py new file mode 100644 index 0000000..31133b6 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_asset_group_response_exceptions.py @@ -0,0 +1,264 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class UpdateAssetGroupResponseExceptions(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'asset_group_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'code': 'code', # noqa: E501 + 'message': 'message', # noqa: E501 + 'asset_group_id': 'asset_group_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateAssetGroupResponseExceptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + code (int): Error code associated with the error editing asset group.. [optional] # noqa: E501 + message (str): Error message associated with the error editing asset group.. [optional] # noqa: E501 + asset_group_id (str): Asset group id of the exception.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateAssetGroupResponseExceptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + code (int): Error code associated with the error editing asset group.. [optional] # noqa: E501 + message (str): Error message associated with the error editing asset group.. [optional] # noqa: E501 + asset_group_id (str): Asset group id of the exception.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_invites_results_response_array.py b/openapi_generated/pinterest_client/model/update_invites_results_response_array.py new file mode 100644 index 0000000..b14b613 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_invites_results_response_array.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.update_invites_results_response_array_items import UpdateInvitesResultsResponseArrayItems + globals()['UpdateInvitesResultsResponseArrayItems'] = UpdateInvitesResultsResponseArrayItems + + +class UpdateInvitesResultsResponseArray(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([UpdateInvitesResultsResponseArrayItems],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateInvitesResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([UpdateInvitesResultsResponseArrayItems]): List of invite/Request action status. If there is an error, an exception object will be returned. If the action was successfully completed, an invite object will be returned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateInvitesResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([UpdateInvitesResultsResponseArrayItems]): List of invite/Request action status. If there is an error, an exception object will be returned. If the action was successfully completed, an invite object will be returned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_invites_results_response_array_items.py b/openapi_generated/pinterest_client/model/update_invites_results_response_array_items.py new file mode 100644 index 0000000..e36828c --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_invites_results_response_array_items.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.invite_business_role_binding import InviteBusinessRoleBinding + from openapi_generated.pinterest_client.model.invite_exception_response import InviteExceptionResponse + globals()['InviteBusinessRoleBinding'] = InviteBusinessRoleBinding + globals()['InviteExceptionResponse'] = InviteExceptionResponse + + +class UpdateInvitesResultsResponseArrayItems(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'exception': (InviteExceptionResponse,), # noqa: E501 + 'invite': (InviteBusinessRoleBinding,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'exception': 'exception', # noqa: E501 + 'invite': 'invite', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateInvitesResultsResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exception (InviteExceptionResponse): [optional] # noqa: E501 + invite (InviteBusinessRoleBinding): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateInvitesResultsResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exception (InviteExceptionResponse): [optional] # noqa: E501 + invite (InviteBusinessRoleBinding): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_mask_bid_option_field.py b/openapi_generated/pinterest_client/model/update_mask_bid_option_field.py new file mode 100644 index 0000000..aec2ecd --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_mask_bid_option_field.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class UpdateMaskBidOptionField(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'BID': "BID", + 'APP_TYPE_BID_MULTIPLIER_SET': "APP_TYPE_BID_MULTIPLIER_SET", + 'PLACEMENT_BID_MULTIPLIER_SET': "PLACEMENT_BID_MULTIPLIER_SET", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """UpdateMaskBidOptionField - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): bid option field to apply operation updates to., must be one of ["BID", "APP_TYPE_BID_MULTIPLIER_SET", "PLACEMENT_BID_MULTIPLIER_SET", ] # noqa: E501 + + Keyword Args: + value (str): bid option field to apply operation updates to., must be one of ["BID", "APP_TYPE_BID_MULTIPLIER_SET", "PLACEMENT_BID_MULTIPLIER_SET", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """UpdateMaskBidOptionField - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): bid option field to apply operation updates to., must be one of ["BID", "APP_TYPE_BID_MULTIPLIER_SET", "PLACEMENT_BID_MULTIPLIER_SET", ] # noqa: E501 + + Keyword Args: + value (str): bid option field to apply operation updates to., must be one of ["BID", "APP_TYPE_BID_MULTIPLIER_SET", "PLACEMENT_BID_MULTIPLIER_SET", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/update_mask_field_type.py b/openapi_generated/pinterest_client/model/update_mask_field_type.py new file mode 100644 index 0000000..a9e2ec7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_mask_field_type.py @@ -0,0 +1,324 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class UpdateMaskFieldType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'AD_LINK': "ad_link", + 'ADULT': "adult", + 'AGE_GROUP': "age_group", + 'AVAILABILITY': "availability", + 'AVERAGE_REVIEW_RATING': "average_review_rating", + 'BRAND': "brand", + 'CHECKOUT_ENABLED': "checkout_enabled", + 'COLOR': "color", + 'CONDITION': "condition", + 'CUSTOM_LABEL_0': "custom_label_0", + 'CUSTOM_LABEL_1': "custom_label_1", + 'CUSTOM_LABEL_2': "custom_label_2", + 'CUSTOM_LABEL_3': "custom_label_3", + 'CUSTOM_LABEL_4': "custom_label_4", + 'DESCRIPTION': "description", + 'FREE_SHIPPING_LABEL': "free_shipping_label", + 'FREE_SHIPPING_LIMIT': "free_shipping_limit", + 'GENDER': "gender", + 'GOOGLE_PRODUCT_CATEGORY': "google_product_category", + 'GTIN': "gtin", + 'ITEM_GROUP_ID': "item_group_id", + 'LAST_UPDATED_TIME': "last_updated_time", + 'LINK': "link", + 'MATERIAL': "material", + 'MIN_AD_PRICE': "min_ad_price", + 'MPN': "mpn", + 'NUMBER_OF_RATINGS': "number_of_ratings", + 'NUMBER_OF_REVIEWS': "number_of_reviews", + 'PATTERN': "pattern", + 'PRICE': "price", + 'PRODUCT_TYPE': "product_type", + 'SALE_PRICE': "sale_price", + 'SHIPPING': "shipping", + 'SHIPPING_HEIGHT': "shipping_height", + 'SHIPPING_WEIGHT': "shipping_weight", + 'SHIPPING_WIDTH': "shipping_width", + 'SIZE': "size", + 'SIZE_SYSTEM': "size_system", + 'SIZE_TYPE': "size_type", + 'TAX': "tax", + 'TITLE': "title", + 'VARIANT_NAMES': "variant_names", + 'VARIANT_VALUES': "variant_values", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """UpdateMaskFieldType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The field types supported by the update mask., must be one of ["ad_link", "adult", "age_group", "availability", "average_review_rating", "brand", "checkout_enabled", "color", "condition", "custom_label_0", "custom_label_1", "custom_label_2", "custom_label_3", "custom_label_4", "description", "free_shipping_label", "free_shipping_limit", "gender", "google_product_category", "gtin", "item_group_id", "last_updated_time", "link", "material", "min_ad_price", "mpn", "number_of_ratings", "number_of_reviews", "pattern", "price", "product_type", "sale_price", "shipping", "shipping_height", "shipping_weight", "shipping_width", "size", "size_system", "size_type", "tax", "title", "variant_names", "variant_values", ] # noqa: E501 + + Keyword Args: + value (str): The field types supported by the update mask., must be one of ["ad_link", "adult", "age_group", "availability", "average_review_rating", "brand", "checkout_enabled", "color", "condition", "custom_label_0", "custom_label_1", "custom_label_2", "custom_label_3", "custom_label_4", "description", "free_shipping_label", "free_shipping_limit", "gender", "google_product_category", "gtin", "item_group_id", "last_updated_time", "link", "material", "min_ad_price", "mpn", "number_of_ratings", "number_of_reviews", "pattern", "price", "product_type", "sale_price", "shipping", "shipping_height", "shipping_weight", "shipping_width", "size", "size_system", "size_type", "tax", "title", "variant_names", "variant_values", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """UpdateMaskFieldType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The field types supported by the update mask., must be one of ["ad_link", "adult", "age_group", "availability", "average_review_rating", "brand", "checkout_enabled", "color", "condition", "custom_label_0", "custom_label_1", "custom_label_2", "custom_label_3", "custom_label_4", "description", "free_shipping_label", "free_shipping_limit", "gender", "google_product_category", "gtin", "item_group_id", "last_updated_time", "link", "material", "min_ad_price", "mpn", "number_of_ratings", "number_of_reviews", "pattern", "price", "product_type", "sale_price", "shipping", "shipping_height", "shipping_weight", "shipping_width", "size", "size_system", "size_type", "tax", "title", "variant_names", "variant_values", ] # noqa: E501 + + Keyword Args: + value (str): The field types supported by the update mask., must be one of ["ad_link", "adult", "age_group", "availability", "average_review_rating", "brand", "checkout_enabled", "color", "condition", "custom_label_0", "custom_label_1", "custom_label_2", "custom_label_3", "custom_label_4", "description", "free_shipping_label", "free_shipping_limit", "gender", "google_product_category", "gtin", "item_group_id", "last_updated_time", "link", "material", "min_ad_price", "mpn", "number_of_ratings", "number_of_reviews", "pattern", "price", "product_type", "sale_price", "shipping", "shipping_height", "shipping_weight", "shipping_width", "size", "size_system", "size_type", "tax", "title", "variant_names", "variant_values", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/openapi_generated/pinterest_client/model/update_member_asset_access_body.py b/openapi_generated/pinterest_client/model/update_member_asset_access_body.py new file mode 100644 index 0000000..b7b23ed --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_member_asset_access_body.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.update_member_asset_access_body_accesses import UpdateMemberAssetAccessBodyAccesses + globals()['UpdateMemberAssetAccessBodyAccesses'] = UpdateMemberAssetAccessBodyAccesses + + +class UpdateMemberAssetAccessBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('accesses',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'accesses': ([UpdateMemberAssetAccessBodyAccesses],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'accesses': 'accesses', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, accesses, *args, **kwargs): # noqa: E501 + """UpdateMemberAssetAccessBody - a model defined in OpenAPI + + Args: + accesses ([UpdateMemberAssetAccessBodyAccesses]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.accesses = accesses + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, accesses, *args, **kwargs): # noqa: E501 + """UpdateMemberAssetAccessBody - a model defined in OpenAPI + + Args: + accesses ([UpdateMemberAssetAccessBodyAccesses]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.accesses = accesses + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_member_asset_access_body_accesses.py b/openapi_generated/pinterest_client/model/update_member_asset_access_body_accesses.py new file mode 100644 index 0000000..078072b --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_member_asset_access_body_accesses.py @@ -0,0 +1,296 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.permissions import Permissions + globals()['Permissions'] = Permissions + + +class UpdateMemberAssetAccessBodyAccesses(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_id',): { + 'max_length': 25, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('member_id',): { + 'max_length': 25, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('permissions',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_id': (str,), # noqa: E501 + 'member_id': (str,), # noqa: E501 + 'permissions': ([Permissions],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_id': 'asset_id', # noqa: E501 + 'member_id': 'member_id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, asset_id, member_id, permissions, *args, **kwargs): # noqa: E501 + """UpdateMemberAssetAccessBodyAccesses - a model defined in OpenAPI + + Args: + asset_id (str): Id of the asset to update. + member_id (str): Unique identifier of the member on which to perform the update + permissions ([Permissions]): A non-empty array of permissions to assign to the member. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_id = asset_id + self.member_id = member_id + self.permissions = permissions + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, asset_id, member_id, permissions, *args, **kwargs): # noqa: E501 + """UpdateMemberAssetAccessBodyAccesses - a model defined in OpenAPI + + Args: + asset_id (str): Id of the asset to update. + member_id (str): Unique identifier of the member on which to perform the update + permissions ([Permissions]): A non-empty array of permissions to assign to the member. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.asset_id = asset_id + self.member_id = member_id + self.permissions = permissions + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_member_assets_results_response_array.py b/openapi_generated/pinterest_client/model/update_member_assets_results_response_array.py new file mode 100644 index 0000000..51b9327 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_member_assets_results_response_array.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.update_member_assets_results_response_array_items import UpdateMemberAssetsResultsResponseArrayItems + globals()['UpdateMemberAssetsResultsResponseArrayItems'] = UpdateMemberAssetsResultsResponseArrayItems + + +class UpdateMemberAssetsResultsResponseArray(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([UpdateMemberAssetsResultsResponseArrayItems],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateMemberAssetsResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([UpdateMemberAssetsResultsResponseArrayItems]): List of assigned/updated member asset access. If there is an error, an exception object will be returned. If the action was successfully completed, a response object will be returned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateMemberAssetsResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([UpdateMemberAssetsResultsResponseArrayItems]): List of assigned/updated member asset access. If there is an error, an exception object will be returned. If the action was successfully completed, a response object will be returned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_member_assets_results_response_array_items.py b/openapi_generated/pinterest_client/model/update_member_assets_results_response_array_items.py new file mode 100644 index 0000000..5669e3c --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_member_assets_results_response_array_items.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.users_for_individual_asset_response import UsersForIndividualAssetResponse + globals()['UsersForIndividualAssetResponse'] = UsersForIndividualAssetResponse + + +class UpdateMemberAssetsResultsResponseArrayItems(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'response': (UsersForIndividualAssetResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'response': 'response', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateMemberAssetsResultsResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + response (UsersForIndividualAssetResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateMemberAssetsResultsResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + response (UsersForIndividualAssetResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_member_business_role_body.py b/openapi_generated/pinterest_client/model/update_member_business_role_body.py new file mode 100644 index 0000000..1f91da4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_member_business_role_body.py @@ -0,0 +1,280 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_role_for_members import BusinessRoleForMembers + globals()['BusinessRoleForMembers'] = BusinessRoleForMembers + + +class UpdateMemberBusinessRoleBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('member_id',): { + 'max_length': 25, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'business_role': (BusinessRoleForMembers,), # noqa: E501 + 'member_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'business_role': 'business_role', # noqa: E501 + 'member_id': 'member_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, business_role, member_id, *args, **kwargs): # noqa: E501 + """UpdateMemberBusinessRoleBody - a model defined in OpenAPI + + Args: + business_role (BusinessRoleForMembers): + member_id (str): Unique identifier of the member + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.business_role = business_role + self.member_id = member_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, business_role, member_id, *args, **kwargs): # noqa: E501 + """UpdateMemberBusinessRoleBody - a model defined in OpenAPI + + Args: + business_role (BusinessRoleForMembers): + member_id (str): Unique identifier of the member + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.business_role = business_role + self.member_id = member_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_member_result.py b/openapi_generated/pinterest_client/model/update_member_result.py new file mode 100644 index 0000000..980ed2e --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_member_result.py @@ -0,0 +1,265 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + + +class UpdateMemberResult(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('member_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'business_role': (str,), # noqa: E501 + 'member_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'business_role': 'business_role', # noqa: E501 + 'member_id': 'member_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateMemberResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + business_role (str): The access level a member has to the business. Values are case-sensitive.
    - EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
    - BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.. [optional] # noqa: E501 + member_id (str): Unique identifier of the business member.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateMemberResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + business_role (str): The access level a member has to the business. Values are case-sensitive.
    - EMPLOYEE: Can only view and access assets you assign to them. They cannot see details about other employees, partners, or other assets.
    - BIZ_ADMIN: Have full control of roles and can add employees and partners as well as grant asset access.. [optional] # noqa: E501 + member_id (str): Unique identifier of the business member.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_member_results_response_array.py b/openapi_generated/pinterest_client/model/update_member_results_response_array.py new file mode 100644 index 0000000..8feeb03 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_member_results_response_array.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.update_member_result import UpdateMemberResult + globals()['UpdateMemberResult'] = UpdateMemberResult + + +class UpdateMemberResultsResponseArray(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([UpdateMemberResult],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateMemberResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([UpdateMemberResult]): List of members with updated business access role.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateMemberResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([UpdateMemberResult]): List of members with updated business access role.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_partner_asset_access_body.py b/openapi_generated/pinterest_client/model/update_partner_asset_access_body.py new file mode 100644 index 0000000..79fa83a --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_partner_asset_access_body.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.update_partner_asset_access_body_accesses import UpdatePartnerAssetAccessBodyAccesses + globals()['UpdatePartnerAssetAccessBodyAccesses'] = UpdatePartnerAssetAccessBodyAccesses + + +class UpdatePartnerAssetAccessBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('accesses',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'accesses': ([UpdatePartnerAssetAccessBodyAccesses],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'accesses': 'accesses', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, accesses, *args, **kwargs): # noqa: E501 + """UpdatePartnerAssetAccessBody - a model defined in OpenAPI + + Args: + accesses ([UpdatePartnerAssetAccessBodyAccesses]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.accesses = accesses + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, accesses, *args, **kwargs): # noqa: E501 + """UpdatePartnerAssetAccessBody - a model defined in OpenAPI + + Args: + accesses ([UpdatePartnerAssetAccessBodyAccesses]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.accesses = accesses + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_partner_asset_access_body_accesses.py b/openapi_generated/pinterest_client/model/update_partner_asset_access_body_accesses.py new file mode 100644 index 0000000..6f36f82 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_partner_asset_access_body_accesses.py @@ -0,0 +1,296 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.permissions import Permissions + globals()['Permissions'] = Permissions + + +class UpdatePartnerAssetAccessBodyAccesses(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('partner_id',): { + 'max_length': 25, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('asset_id',): { + 'max_length': 25, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('permissions',): { + 'max_items': 50, + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'partner_id': (str,), # noqa: E501 + 'asset_id': (str,), # noqa: E501 + 'permissions': ([Permissions],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'partner_id': 'partner_id', # noqa: E501 + 'asset_id': 'asset_id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, partner_id, asset_id, permissions, *args, **kwargs): # noqa: E501 + """UpdatePartnerAssetAccessBodyAccesses - a model defined in OpenAPI + + Args: + partner_id (str): Unique identifier of a business partner to update asset access to. + asset_id (str): Unique identifier of the business asset. + permissions ([Permissions]): A non-empty array of permissions to assign to the partner. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.partner_id = partner_id + self.asset_id = asset_id + self.permissions = permissions + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, partner_id, asset_id, permissions, *args, **kwargs): # noqa: E501 + """UpdatePartnerAssetAccessBodyAccesses - a model defined in OpenAPI + + Args: + partner_id (str): Unique identifier of a business partner to update asset access to. + asset_id (str): Unique identifier of the business asset. + permissions ([Permissions]): A non-empty array of permissions to assign to the partner. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.partner_id = partner_id + self.asset_id = asset_id + self.permissions = permissions + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_partner_assets_result.py b/openapi_generated/pinterest_client/model/update_partner_assets_result.py new file mode 100644 index 0000000..a708866 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_partner_assets_result.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.permissions_response import PermissionsResponse + globals()['PermissionsResponse'] = PermissionsResponse + + +class UpdatePartnerAssetsResult(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('partner_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_id': (str,), # noqa: E501 + 'asset_type': (str,), # noqa: E501 + 'partner_id': (str,), # noqa: E501 + 'permissions': (PermissionsResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_id': 'asset_id', # noqa: E501 + 'asset_type': 'asset_type', # noqa: E501 + 'partner_id': 'partner_id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdatePartnerAssetsResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + asset_type (str): Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP.. [optional] # noqa: E501 + partner_id (str): Unique identifier of a business partner.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdatePartnerAssetsResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + asset_type (str): Type of asset. Currently we only support AD_ACCOUNT and PROFILE, and ASSET_GROUP.. [optional] # noqa: E501 + partner_id (str): Unique identifier of a business partner.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_partner_assets_results_response_array.py b/openapi_generated/pinterest_client/model/update_partner_assets_results_response_array.py new file mode 100644 index 0000000..8f838c9 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_partner_assets_results_response_array.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.update_partner_assets_result import UpdatePartnerAssetsResult + globals()['UpdatePartnerAssetsResult'] = UpdatePartnerAssetsResult + + +class UpdatePartnerAssetsResultsResponseArray(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([UpdatePartnerAssetsResult],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdatePartnerAssetsResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([UpdatePartnerAssetsResult]): List of assigned/updated partner asset access.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdatePartnerAssetsResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([UpdatePartnerAssetsResult]): List of assigned/updated partner asset access.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_partner_results_response_array.py b/openapi_generated/pinterest_client/model/update_partner_results_response_array.py new file mode 100644 index 0000000..29d0d23 --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_partner_results_response_array.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.update_partner_results_response_array_items import UpdatePartnerResultsResponseArrayItems + globals()['UpdatePartnerResultsResponseArrayItems'] = UpdatePartnerResultsResponseArrayItems + + +class UpdatePartnerResultsResponseArray(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([UpdatePartnerResultsResponseArrayItems],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdatePartnerResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([UpdatePartnerResultsResponseArrayItems]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdatePartnerResultsResponseArray - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + items ([UpdatePartnerResultsResponseArrayItems]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/update_partner_results_response_array_items.py b/openapi_generated/pinterest_client/model/update_partner_results_response_array_items.py new file mode 100644 index 0000000..fbcf93b --- /dev/null +++ b/openapi_generated/pinterest_client/model/update_partner_results_response_array_items.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_access_error import BusinessAccessError + globals()['BusinessAccessError'] = BusinessAccessError + + +class UpdatePartnerResultsResponseArrayItems(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('member_or_partner_id',): { + 'max_length': 18, + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'exception': (BusinessAccessError,), # noqa: E501 + 'member_or_partner_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'exception': 'exception', # noqa: E501 + 'member_or_partner_id': 'member_or_partner_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdatePartnerResultsResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exception (BusinessAccessError): [optional] # noqa: E501 + member_or_partner_id (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdatePartnerResultsResponseArrayItems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + exception (BusinessAccessError): [optional] # noqa: E501 + member_or_partner_id (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/user_business_role_binding.py b/openapi_generated/pinterest_client/model/user_business_role_binding.py new file mode 100644 index 0000000..acfaa3f --- /dev/null +++ b/openapi_generated/pinterest_client/model/user_business_role_binding.py @@ -0,0 +1,297 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_access_user_summary import BusinessAccessUserSummary + from openapi_generated.pinterest_client.model.business_member_assets_summary import BusinessMemberAssetsSummary + globals()['BusinessAccessUserSummary'] = BusinessAccessUserSummary + globals()['BusinessMemberAssetsSummary'] = BusinessMemberAssetsSummary + + +class UserBusinessRoleBinding(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'assets_summary': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'business_roles': ([str],), # noqa: E501 + 'created_by_business': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'created_by_user': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'created_time': (int, none_type,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'is_shared_partner': (bool,), # noqa: E501 + 'user': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'assets_summary': 'assets_summary', # noqa: E501 + 'business_roles': 'business_roles', # noqa: E501 + 'created_by_business': 'created_by_business', # noqa: E501 + 'created_by_user': 'created_by_user', # noqa: E501 + 'created_time': 'created_time', # noqa: E501 + 'id': 'id', # noqa: E501 + 'is_shared_partner': 'is_shared_partner', # noqa: E501 + 'user': 'user', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserBusinessRoleBinding - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + assets_summary ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + business_roles ([str]): The access level a user has on the business. This can be EMPLOYEE, BIZ_ADMIN, or PARTNER.. [optional] # noqa: E501 + created_by_business ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata for the business that created the business relationship.. [optional] # noqa: E501 + created_by_user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata for the user that created the business relationship.. [optional] # noqa: E501 + created_time (int, none_type): The time the business relationship was created. Returned in milliseconds.. [optional] # noqa: E501 + id (str): Unique identifier of the business member/business partner/employer.. [optional] # noqa: E501 + is_shared_partner (bool): This field is only relevant when business_role=\"PARTNER\".
    If is_shared_partner=FALSE, the partner can access your business assets. If assets_summary is not empty, the assets listed are your business assets the partner has access to.
    If is_shared_partner=TRUE, you can access the partner's business asset. If assets_summary is not empty, the assets listed are the partner's business assets you have access to.. [optional] # noqa: E501 + user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata for the business member/business partner/employer.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserBusinessRoleBinding - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + assets_summary ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + business_roles ([str]): The access level a user has on the business. This can be EMPLOYEE, BIZ_ADMIN, or PARTNER.. [optional] # noqa: E501 + created_by_business ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata for the business that created the business relationship.. [optional] # noqa: E501 + created_by_user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata for the user that created the business relationship.. [optional] # noqa: E501 + created_time (int, none_type): The time the business relationship was created. Returned in milliseconds.. [optional] # noqa: E501 + id (str): Unique identifier of the business member/business partner/employer.. [optional] # noqa: E501 + is_shared_partner (bool): This field is only relevant when business_role=\"PARTNER\".
    If is_shared_partner=FALSE, the partner can access your business assets. If assets_summary is not empty, the assets listed are your business assets the partner has access to.
    If is_shared_partner=TRUE, you can access the partner's business asset. If assets_summary is not empty, the assets listed are the partner's business assets you have access to.. [optional] # noqa: E501 + user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Metadata for the business member/business partner/employer.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/user_following_feed_type.py b/openapi_generated/pinterest_client/model/user_following_feed_type.py index a396923..0ee5685 100644 --- a/openapi_generated/pinterest_client/model/user_following_feed_type.py +++ b/openapi_generated/pinterest_client/model/user_following_feed_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/user_list_operation_type.py b/openapi_generated/pinterest_client/model/user_list_operation_type.py index d54ee6d..24fcf81 100644 --- a/openapi_generated/pinterest_client/model/user_list_operation_type.py +++ b/openapi_generated/pinterest_client/model/user_list_operation_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/user_list_type.py b/openapi_generated/pinterest_client/model/user_list_type.py index b2415f1..4b2b6ba 100644 --- a/openapi_generated/pinterest_client/model/user_list_type.py +++ b/openapi_generated/pinterest_client/model/user_list_type.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/user_single_asset_binding.py b/openapi_generated/pinterest_client/model/user_single_asset_binding.py new file mode 100644 index 0000000..bb66350 --- /dev/null +++ b/openapi_generated/pinterest_client/model/user_single_asset_binding.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.business_access_user_summary import BusinessAccessUserSummary + from openapi_generated.pinterest_client.model.permissions_response import PermissionsResponse + globals()['BusinessAccessUserSummary'] = BusinessAccessUserSummary + globals()['PermissionsResponse'] = PermissionsResponse + + +class UserSingleAssetBinding(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'permissions': (PermissionsResponse,), # noqa: E501 + 'user': (BusinessAccessUserSummary,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'permissions': 'permissions', # noqa: E501 + 'user': 'user', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserSingleAssetBinding - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + permissions (PermissionsResponse): [optional] # noqa: E501 + user (BusinessAccessUserSummary): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserSingleAssetBinding - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + permissions (PermissionsResponse): [optional] # noqa: E501 + user (BusinessAccessUserSummary): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/user_summary.py b/openapi_generated/pinterest_client/model/user_summary.py index defd445..2207afc 100644 --- a/openapi_generated/pinterest_client/model/user_summary.py +++ b/openapi_generated/pinterest_client/model/user_summary.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/user_website_summary.py b/openapi_generated/pinterest_client/model/user_website_summary.py index 1b638b6..1e61eb9 100644 --- a/openapi_generated/pinterest_client/model/user_website_summary.py +++ b/openapi_generated/pinterest_client/model/user_website_summary.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/user_website_verification_code.py b/openapi_generated/pinterest_client/model/user_website_verification_code.py index 2fb88ea..30e1a50 100644 --- a/openapi_generated/pinterest_client/model/user_website_verification_code.py +++ b/openapi_generated/pinterest_client/model/user_website_verification_code.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/user_website_verify_request.py b/openapi_generated/pinterest_client/model/user_website_verify_request.py index f3d91b4..e4baad2 100644 --- a/openapi_generated/pinterest_client/model/user_website_verify_request.py +++ b/openapi_generated/pinterest_client/model/user_website_verify_request.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/model/users_for_individual_asset_response.py b/openapi_generated/pinterest_client/model/users_for_individual_asset_response.py new file mode 100644 index 0000000..e6a7d91 --- /dev/null +++ b/openapi_generated/pinterest_client/model/users_for_individual_asset_response.py @@ -0,0 +1,280 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.14.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from openapi_generated.pinterest_client.exceptions import ApiAttributeError + + +def lazy_import(): + from openapi_generated.pinterest_client.model.permissions_response import PermissionsResponse + globals()['PermissionsResponse'] = PermissionsResponse + + +class UsersForIndividualAssetResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('asset_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('member_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'asset_id': (str,), # noqa: E501 + 'member_id': (str,), # noqa: E501 + 'permissions': (PermissionsResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'asset_id': 'asset_id', # noqa: E501 + 'member_id': 'member_id', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UsersForIndividualAssetResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + member_id (str): Unique identifier of the business member with asset access.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UsersForIndividualAssetResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + asset_id (str): Unique identifier of a business asset.. [optional] # noqa: E501 + member_id (str): Unique identifier of the business member with asset access.. [optional] # noqa: E501 + permissions (PermissionsResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/openapi_generated/pinterest_client/model/video_metadata.py b/openapi_generated/pinterest_client/model/video_metadata.py index 8739ba9..5b2ff97 100644 --- a/openapi_generated/pinterest_client/model/video_metadata.py +++ b/openapi_generated/pinterest_client/model/video_metadata.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -84,6 +84,7 @@ def openapi_types(): return { 'item_type': (str,), # noqa: E501 'cover_image_url': (str,), # noqa: E501 + 'video_url': (str, none_type,), # noqa: E501 'duration': (float,), # noqa: E501 'height': (int,), # noqa: E501 'width': (int,), # noqa: E501 @@ -97,6 +98,7 @@ def discriminator(): attribute_map = { 'item_type': 'item_type', # noqa: E501 'cover_image_url': 'cover_image_url', # noqa: E501 + 'video_url': 'video_url', # noqa: E501 'duration': 'duration', # noqa: E501 'height': 'height', # noqa: E501 'width': 'width', # noqa: E501 @@ -145,6 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) item_type (str): [optional] # noqa: E501 cover_image_url (str): [optional] # noqa: E501 + video_url (str, none_type): Video url (720p).

    Note: This field is limited and not available to all apps.. [optional] # noqa: E501 duration (float): Duration (in milliseconds). [optional] # noqa: E501 height (int): Height (in pixels). [optional] # noqa: E501 width (int): Width (in pixels). [optional] # noqa: E501 @@ -231,6 +234,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) item_type (str): [optional] # noqa: E501 cover_image_url (str): [optional] # noqa: E501 + video_url (str, none_type): Video url (720p).

    Note: This field is limited and not available to all apps.. [optional] # noqa: E501 duration (float): Duration (in milliseconds). [optional] # noqa: E501 height (int): Height (in pixels). [optional] # noqa: E501 width (int): Width (in pixels). [optional] # noqa: E501 diff --git a/openapi_generated/pinterest_client/model_utils.py b/openapi_generated/pinterest_client/model_utils.py index 3d72a1a..dc9f174 100644 --- a/openapi_generated/pinterest_client/model_utils.py +++ b/openapi_generated/pinterest_client/model_utils.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/openapi_generated/pinterest_client/models/__init__.py b/openapi_generated/pinterest_client/models/__init__.py index 20203d5..84d6955 100644 --- a/openapi_generated/pinterest_client/models/__init__.py +++ b/openapi_generated/pinterest_client/models/__init__.py @@ -14,15 +14,25 @@ from openapi_generated.pinterest_client.model.ad_account import AdAccount from openapi_generated.pinterest_client.model.ad_account_analytics_response import AdAccountAnalyticsResponse from openapi_generated.pinterest_client.model.ad_account_create_request import AdAccountCreateRequest +from openapi_generated.pinterest_client.model.ad_account_create_subscription_request import AdAccountCreateSubscriptionRequest +from openapi_generated.pinterest_client.model.ad_account_create_subscription_request_partner_metadata import AdAccountCreateSubscriptionRequestPartnerMetadata +from openapi_generated.pinterest_client.model.ad_account_create_subscription_response import AdAccountCreateSubscriptionResponse +from openapi_generated.pinterest_client.model.ad_account_get_subscription_response import AdAccountGetSubscriptionResponse +from openapi_generated.pinterest_client.model.ad_account_get_subscription_response_all_of import AdAccountGetSubscriptionResponseAllOf +from openapi_generated.pinterest_client.model.ad_account_get_subscription_response_all_of1 import AdAccountGetSubscriptionResponseAllOf1 from openapi_generated.pinterest_client.model.ad_account_owner import AdAccountOwner from openapi_generated.pinterest_client.model.ad_accounts_country_response import AdAccountsCountryResponse from openapi_generated.pinterest_client.model.ad_accounts_country_response_data import AdAccountsCountryResponseData from openapi_generated.pinterest_client.model.ad_array_response import AdArrayResponse from openapi_generated.pinterest_client.model.ad_array_response_element import AdArrayResponseElement from openapi_generated.pinterest_client.model.ad_common import AdCommon +from openapi_generated.pinterest_client.model.ad_country import AdCountry from openapi_generated.pinterest_client.model.ad_create_request import AdCreateRequest from openapi_generated.pinterest_client.model.ad_group_array_response import AdGroupArrayResponse from openapi_generated.pinterest_client.model.ad_group_array_response_element import AdGroupArrayResponseElement +from openapi_generated.pinterest_client.model.ad_group_audience_sizing_request import AdGroupAudienceSizingRequest +from openapi_generated.pinterest_client.model.ad_group_audience_sizing_request_keywords import AdGroupAudienceSizingRequestKeywords +from openapi_generated.pinterest_client.model.ad_group_audience_sizing_response import AdGroupAudienceSizingResponse from openapi_generated.pinterest_client.model.ad_group_common import AdGroupCommon from openapi_generated.pinterest_client.model.ad_group_create_request import AdGroupCreateRequest from openapi_generated.pinterest_client.model.ad_group_create_request_all_of import AdGroupCreateRequestAllOf @@ -41,6 +51,8 @@ from openapi_generated.pinterest_client.model.ad_response_all_of import AdResponseAllOf from openapi_generated.pinterest_client.model.ad_update_request import AdUpdateRequest from openapi_generated.pinterest_client.model.ad_update_request1 import AdUpdateRequest1 +from openapi_generated.pinterest_client.model.ads_analytics_ad_targeting_type import AdsAnalyticsAdTargetingType +from openapi_generated.pinterest_client.model.ads_analytics_campaign_targeting_type import AdsAnalyticsCampaignTargetingType from openapi_generated.pinterest_client.model.ads_analytics_create_async_request import AdsAnalyticsCreateAsyncRequest from openapi_generated.pinterest_client.model.ads_analytics_create_async_request_all_of import AdsAnalyticsCreateAsyncRequestAllOf from openapi_generated.pinterest_client.model.ads_analytics_create_async_request_all_of1 import AdsAnalyticsCreateAsyncRequestAllOf1 @@ -51,11 +63,38 @@ from openapi_generated.pinterest_client.model.ads_analytics_metrics_filter import AdsAnalyticsMetricsFilter from openapi_generated.pinterest_client.model.ads_analytics_response import AdsAnalyticsResponse from openapi_generated.pinterest_client.model.ads_analytics_targeting_type import AdsAnalyticsTargetingType +from openapi_generated.pinterest_client.model.ads_credit_discounts_response import AdsCreditDiscountsResponse +from openapi_generated.pinterest_client.model.ads_credit_redeem_request import AdsCreditRedeemRequest +from openapi_generated.pinterest_client.model.ads_credit_redeem_response import AdsCreditRedeemResponse +from openapi_generated.pinterest_client.model.advanced_auction_bid_options import AdvancedAuctionBidOptions +from openapi_generated.pinterest_client.model.advanced_auction_item import AdvancedAuctionItem +from openapi_generated.pinterest_client.model.advanced_auction_item_all_of import AdvancedAuctionItemAllOf +from openapi_generated.pinterest_client.model.advanced_auction_items import AdvancedAuctionItems +from openapi_generated.pinterest_client.model.advanced_auction_items_get_record import AdvancedAuctionItemsGetRecord +from openapi_generated.pinterest_client.model.advanced_auction_items_get_request import AdvancedAuctionItemsGetRequest +from openapi_generated.pinterest_client.model.advanced_auction_items_submit_delete_record import AdvancedAuctionItemsSubmitDeleteRecord +from openapi_generated.pinterest_client.model.advanced_auction_items_submit_record import AdvancedAuctionItemsSubmitRecord +from openapi_generated.pinterest_client.model.advanced_auction_items_submit_request import AdvancedAuctionItemsSubmitRequest +from openapi_generated.pinterest_client.model.advanced_auction_items_submit_upsert_record import AdvancedAuctionItemsSubmitUpsertRecord +from openapi_generated.pinterest_client.model.advanced_auction_items_submit_upsert_record_all_of import AdvancedAuctionItemsSubmitUpsertRecordAllOf +from openapi_generated.pinterest_client.model.advanced_auction_key import AdvancedAuctionKey +from openapi_generated.pinterest_client.model.advanced_auction_operation import AdvancedAuctionOperation +from openapi_generated.pinterest_client.model.advanced_auction_operation_error import AdvancedAuctionOperationError +from openapi_generated.pinterest_client.model.advanced_auction_processed_item import AdvancedAuctionProcessedItem +from openapi_generated.pinterest_client.model.advanced_auction_processed_item_all_of import AdvancedAuctionProcessedItemAllOf +from openapi_generated.pinterest_client.model.advanced_auction_processed_items import AdvancedAuctionProcessedItems from openapi_generated.pinterest_client.model.age_bucket_list import AgeBucketList from openapi_generated.pinterest_client.model.analytics_daily_metrics import AnalyticsDailyMetrics from openapi_generated.pinterest_client.model.analytics_metrics_response import AnalyticsMetricsResponse from openapi_generated.pinterest_client.model.analytics_response import AnalyticsResponse +from openapi_generated.pinterest_client.model.app_type_multipliers import AppTypeMultipliers +from openapi_generated.pinterest_client.model.asset_group_binding import AssetGroupBinding +from openapi_generated.pinterest_client.model.asset_group_type import AssetGroupType +from openapi_generated.pinterest_client.model.asset_group_types import AssetGroupTypes +from openapi_generated.pinterest_client.model.asset_id_permissions import AssetIdPermissions +from openapi_generated.pinterest_client.model.asset_id_to_permissions import AssetIdToPermissions from openapi_generated.pinterest_client.model.audience import Audience +from openapi_generated.pinterest_client.model.audience_account_type import AudienceAccountType from openapi_generated.pinterest_client.model.audience_category import AudienceCategory from openapi_generated.pinterest_client.model.audience_common import AudienceCommon from openapi_generated.pinterest_client.model.audience_create_custom_request import AudienceCreateCustomRequest @@ -72,17 +111,25 @@ from openapi_generated.pinterest_client.model.audience_insight_type import AudienceInsightType from openapi_generated.pinterest_client.model.audience_insights_response import AudienceInsightsResponse from openapi_generated.pinterest_client.model.audience_rule import AudienceRule +from openapi_generated.pinterest_client.model.audience_share_type import AudienceShareType from openapi_generated.pinterest_client.model.audience_sharing_type import AudienceSharingType +from openapi_generated.pinterest_client.model.audience_subcategory import AudienceSubcategory from openapi_generated.pinterest_client.model.audience_type import AudienceType from openapi_generated.pinterest_client.model.audience_update_operation_type import AudienceUpdateOperationType from openapi_generated.pinterest_client.model.audience_update_request import AudienceUpdateRequest from openapi_generated.pinterest_client.model.audience_update_request1 import AudienceUpdateRequest1 +from openapi_generated.pinterest_client.model.auth_respond_invites_body import AuthRespondInvitesBody +from openapi_generated.pinterest_client.model.auth_respond_invites_body_action import AuthRespondInvitesBodyAction +from openapi_generated.pinterest_client.model.auth_respond_invites_body_invites import AuthRespondInvitesBodyInvites from openapi_generated.pinterest_client.model.availability_filter import AvailabilityFilter +from openapi_generated.pinterest_client.model.base_invite_data_response import BaseInviteDataResponse +from openapi_generated.pinterest_client.model.base_invite_data_response_invite_data import BaseInviteDataResponseInviteData from openapi_generated.pinterest_client.model.batch_operation import BatchOperation from openapi_generated.pinterest_client.model.batch_operation_status import BatchOperationStatus from openapi_generated.pinterest_client.model.bid_floor import BidFloor from openapi_generated.pinterest_client.model.bid_floor_request import BidFloorRequest from openapi_generated.pinterest_client.model.bid_floor_spec import BidFloorSpec +from openapi_generated.pinterest_client.model.billing_profiles_response import BillingProfilesResponse from openapi_generated.pinterest_client.model.board import Board from openapi_generated.pinterest_client.model.board_media import BoardMedia from openapi_generated.pinterest_client.model.board_owner import BoardOwner @@ -96,6 +143,7 @@ from openapi_generated.pinterest_client.model.bulk_download_response import BulkDownloadResponse from openapi_generated.pinterest_client.model.bulk_entity_type import BulkEntityType from openapi_generated.pinterest_client.model.bulk_output_format import BulkOutputFormat +from openapi_generated.pinterest_client.model.bulk_pin_analytics_response import BulkPinAnalyticsResponse from openapi_generated.pinterest_client.model.bulk_reporting_job_status import BulkReportingJobStatus from openapi_generated.pinterest_client.model.bulk_upsert_request import BulkUpsertRequest from openapi_generated.pinterest_client.model.bulk_upsert_request_create import BulkUpsertRequestCreate @@ -103,6 +151,20 @@ from openapi_generated.pinterest_client.model.bulk_upsert_response import BulkUpsertResponse from openapi_generated.pinterest_client.model.bulk_upsert_status import BulkUpsertStatus from openapi_generated.pinterest_client.model.bulk_upsert_status_response import BulkUpsertStatusResponse +from openapi_generated.pinterest_client.model.business_access_error import BusinessAccessError +from openapi_generated.pinterest_client.model.business_access_role import BusinessAccessRole +from openapi_generated.pinterest_client.model.business_access_user_summary import BusinessAccessUserSummary +from openapi_generated.pinterest_client.model.business_member_assets_summary import BusinessMemberAssetsSummary +from openapi_generated.pinterest_client.model.business_member_assets_summary_ad_accounts import BusinessMemberAssetsSummaryAdAccounts +from openapi_generated.pinterest_client.model.business_member_assets_summary_profiles import BusinessMemberAssetsSummaryProfiles +from openapi_generated.pinterest_client.model.business_role import BusinessRole +from openapi_generated.pinterest_client.model.business_role_check_mode import BusinessRoleCheckMode +from openapi_generated.pinterest_client.model.business_role_for_members import BusinessRoleForMembers +from openapi_generated.pinterest_client.model.business_shared_audience import BusinessSharedAudience +from openapi_generated.pinterest_client.model.business_shared_audience1 import BusinessSharedAudience1 +from openapi_generated.pinterest_client.model.business_shared_audience_response import BusinessSharedAudienceResponse +from openapi_generated.pinterest_client.model.business_shared_audience_response1 import BusinessSharedAudienceResponse1 +from openapi_generated.pinterest_client.model.businesses_business_id_members_assets_access_accesses import BusinessesBusinessIdMembersAssetsAccessAccesses from openapi_generated.pinterest_client.model.campaign_common import CampaignCommon from openapi_generated.pinterest_client.model.campaign_create_common import CampaignCreateCommon from openapi_generated.pinterest_client.model.campaign_create_common_all_of import CampaignCreateCommonAllOf @@ -120,13 +182,48 @@ from openapi_generated.pinterest_client.model.campaign_update_request_all_of import CampaignUpdateRequestAllOf from openapi_generated.pinterest_client.model.campaign_update_response import CampaignUpdateResponse from openapi_generated.pinterest_client.model.campaigns_analytics_response import CampaignsAnalyticsResponse -from openapi_generated.pinterest_client.model.catalog_product_group import CatalogProductGroup +from openapi_generated.pinterest_client.model.cancel_invites_body import CancelInvitesBody +from openapi_generated.pinterest_client.model.catalog import Catalog +from openapi_generated.pinterest_client.model.catalog_all_of import CatalogAllOf +from openapi_generated.pinterest_client.model.catalogs_create_creative_assets_item import CatalogsCreateCreativeAssetsItem +from openapi_generated.pinterest_client.model.catalogs_create_hotel_item import CatalogsCreateHotelItem +from openapi_generated.pinterest_client.model.catalogs_create_report_response import CatalogsCreateReportResponse +from openapi_generated.pinterest_client.model.catalogs_create_request import CatalogsCreateRequest +from openapi_generated.pinterest_client.model.catalogs_create_retail_item import CatalogsCreateRetailItem +from openapi_generated.pinterest_client.model.catalogs_creative_assets_attributes import CatalogsCreativeAssetsAttributes +from openapi_generated.pinterest_client.model.catalogs_creative_assets_attributes_all_of import CatalogsCreativeAssetsAttributesAllOf +from openapi_generated.pinterest_client.model.catalogs_creative_assets_batch_item import CatalogsCreativeAssetsBatchItem +from openapi_generated.pinterest_client.model.catalogs_creative_assets_batch_request import CatalogsCreativeAssetsBatchRequest +from openapi_generated.pinterest_client.model.catalogs_creative_assets_feed import CatalogsCreativeAssetsFeed +from openapi_generated.pinterest_client.model.catalogs_creative_assets_feeds_create_request import CatalogsCreativeAssetsFeedsCreateRequest +from openapi_generated.pinterest_client.model.catalogs_creative_assets_feeds_update_request import CatalogsCreativeAssetsFeedsUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_creative_assets_item_error_response import CatalogsCreativeAssetsItemErrorResponse +from openapi_generated.pinterest_client.model.catalogs_creative_assets_item_response import CatalogsCreativeAssetsItemResponse +from openapi_generated.pinterest_client.model.catalogs_creative_assets_items_batch import CatalogsCreativeAssetsItemsBatch +from openapi_generated.pinterest_client.model.catalogs_creative_assets_items_filter import CatalogsCreativeAssetsItemsFilter +from openapi_generated.pinterest_client.model.catalogs_creative_assets_items_post_filter import CatalogsCreativeAssetsItemsPostFilter +from openapi_generated.pinterest_client.model.catalogs_creative_assets_list_products_by_catalog_based_filter_request import CatalogsCreativeAssetsListProductsByCatalogBasedFilterRequest +from openapi_generated.pinterest_client.model.catalogs_creative_assets_product import CatalogsCreativeAssetsProduct +from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group import CatalogsCreativeAssetsProductGroup +from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_create_request import CatalogsCreativeAssetsProductGroupCreateRequest +from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filter_keys import CatalogsCreativeAssetsProductGroupFilterKeys +from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters import CatalogsCreativeAssetsProductGroupFilters +from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters_all_of import CatalogsCreativeAssetsProductGroupFiltersAllOf +from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_filters_any_of import CatalogsCreativeAssetsProductGroupFiltersAnyOf +from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_product_counts import CatalogsCreativeAssetsProductGroupProductCounts +from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_group_update_request import CatalogsCreativeAssetsProductGroupUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_creative_assets_product_metadata import CatalogsCreativeAssetsProductMetadata from openapi_generated.pinterest_client.model.catalogs_db_item import CatalogsDbItem +from openapi_generated.pinterest_client.model.catalogs_delete_creative_assets_item import CatalogsDeleteCreativeAssetsItem +from openapi_generated.pinterest_client.model.catalogs_delete_hotel_item import CatalogsDeleteHotelItem +from openapi_generated.pinterest_client.model.catalogs_delete_retail_item import CatalogsDeleteRetailItem from openapi_generated.pinterest_client.model.catalogs_feed import CatalogsFeed from openapi_generated.pinterest_client.model.catalogs_feed_credentials import CatalogsFeedCredentials +from openapi_generated.pinterest_client.model.catalogs_feed_ingestion import CatalogsFeedIngestion from openapi_generated.pinterest_client.model.catalogs_feed_ingestion_details import CatalogsFeedIngestionDetails from openapi_generated.pinterest_client.model.catalogs_feed_ingestion_errors import CatalogsFeedIngestionErrors from openapi_generated.pinterest_client.model.catalogs_feed_ingestion_info import CatalogsFeedIngestionInfo +from openapi_generated.pinterest_client.model.catalogs_feed_ingestion_warnings import CatalogsFeedIngestionWarnings from openapi_generated.pinterest_client.model.catalogs_feed_processing_result import CatalogsFeedProcessingResult from openapi_generated.pinterest_client.model.catalogs_feed_processing_result_fields import CatalogsFeedProcessingResultFields from openapi_generated.pinterest_client.model.catalogs_feed_processing_schedule import CatalogsFeedProcessingSchedule @@ -138,6 +235,33 @@ from openapi_generated.pinterest_client.model.catalogs_feeds_create_request import CatalogsFeedsCreateRequest from openapi_generated.pinterest_client.model.catalogs_feeds_update_request import CatalogsFeedsUpdateRequest from openapi_generated.pinterest_client.model.catalogs_format import CatalogsFormat +from openapi_generated.pinterest_client.model.catalogs_hotel_address import CatalogsHotelAddress +from openapi_generated.pinterest_client.model.catalogs_hotel_attributes import CatalogsHotelAttributes +from openapi_generated.pinterest_client.model.catalogs_hotel_attributes_all_of import CatalogsHotelAttributesAllOf +from openapi_generated.pinterest_client.model.catalogs_hotel_attributes_all_of_main_image import CatalogsHotelAttributesAllOfMainImage +from openapi_generated.pinterest_client.model.catalogs_hotel_batch_item import CatalogsHotelBatchItem +from openapi_generated.pinterest_client.model.catalogs_hotel_batch_request import CatalogsHotelBatchRequest +from openapi_generated.pinterest_client.model.catalogs_hotel_feed import CatalogsHotelFeed +from openapi_generated.pinterest_client.model.catalogs_hotel_feeds_create_request import CatalogsHotelFeedsCreateRequest +from openapi_generated.pinterest_client.model.catalogs_hotel_feeds_update_request import CatalogsHotelFeedsUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_hotel_guest_ratings import CatalogsHotelGuestRatings +from openapi_generated.pinterest_client.model.catalogs_hotel_item_error_response import CatalogsHotelItemErrorResponse +from openapi_generated.pinterest_client.model.catalogs_hotel_item_response import CatalogsHotelItemResponse +from openapi_generated.pinterest_client.model.catalogs_hotel_items_batch import CatalogsHotelItemsBatch +from openapi_generated.pinterest_client.model.catalogs_hotel_items_filter import CatalogsHotelItemsFilter +from openapi_generated.pinterest_client.model.catalogs_hotel_items_post_filter import CatalogsHotelItemsPostFilter +from openapi_generated.pinterest_client.model.catalogs_hotel_list_products_by_catalog_based_filter_request import CatalogsHotelListProductsByCatalogBasedFilterRequest +from openapi_generated.pinterest_client.model.catalogs_hotel_product import CatalogsHotelProduct +from openapi_generated.pinterest_client.model.catalogs_hotel_product_group import CatalogsHotelProductGroup +from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_create_request import CatalogsHotelProductGroupCreateRequest +from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filter_keys import CatalogsHotelProductGroupFilterKeys +from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filters import CatalogsHotelProductGroupFilters +from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filters_all_of import CatalogsHotelProductGroupFiltersAllOf +from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_filters_any_of import CatalogsHotelProductGroupFiltersAnyOf +from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_product_counts import CatalogsHotelProductGroupProductCounts +from openapi_generated.pinterest_client.model.catalogs_hotel_product_group_update_request import CatalogsHotelProductGroupUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_hotel_product_metadata import CatalogsHotelProductMetadata +from openapi_generated.pinterest_client.model.catalogs_hotel_report_parameters import CatalogsHotelReportParameters from openapi_generated.pinterest_client.model.catalogs_item_validation_details import CatalogsItemValidationDetails from openapi_generated.pinterest_client.model.catalogs_item_validation_errors import CatalogsItemValidationErrors from openapi_generated.pinterest_client.model.catalogs_item_validation_issue import CatalogsItemValidationIssue @@ -149,15 +273,17 @@ from openapi_generated.pinterest_client.model.catalogs_items_create_batch_request import CatalogsItemsCreateBatchRequest from openapi_generated.pinterest_client.model.catalogs_items_delete_batch_request import CatalogsItemsDeleteBatchRequest from openapi_generated.pinterest_client.model.catalogs_items_delete_discontinued_batch_request import CatalogsItemsDeleteDiscontinuedBatchRequest +from openapi_generated.pinterest_client.model.catalogs_items_filters import CatalogsItemsFilters +from openapi_generated.pinterest_client.model.catalogs_items_post_filters import CatalogsItemsPostFilters +from openapi_generated.pinterest_client.model.catalogs_items_request import CatalogsItemsRequest from openapi_generated.pinterest_client.model.catalogs_items_update_batch_request import CatalogsItemsUpdateBatchRequest +from openapi_generated.pinterest_client.model.catalogs_items_upsert_batch_request import CatalogsItemsUpsertBatchRequest +from openapi_generated.pinterest_client.model.catalogs_list_products_by_feed_based_filter import CatalogsListProductsByFeedBasedFilter from openapi_generated.pinterest_client.model.catalogs_list_products_by_filter_request import CatalogsListProductsByFilterRequest -from openapi_generated.pinterest_client.model.catalogs_list_products_by_filter_request_one_of import CatalogsListProductsByFilterRequestOneOf from openapi_generated.pinterest_client.model.catalogs_locale import CatalogsLocale from openapi_generated.pinterest_client.model.catalogs_product import CatalogsProduct -from openapi_generated.pinterest_client.model.catalogs_product_group import CatalogsProductGroup from openapi_generated.pinterest_client.model.catalogs_product_group_create_request import CatalogsProductGroupCreateRequest from openapi_generated.pinterest_client.model.catalogs_product_group_currency_criteria import CatalogsProductGroupCurrencyCriteria -from openapi_generated.pinterest_client.model.catalogs_product_group_feed_based_case import CatalogsProductGroupFeedBasedCase from openapi_generated.pinterest_client.model.catalogs_product_group_filter_keys import CatalogsProductGroupFilterKeys from openapi_generated.pinterest_client.model.catalogs_product_group_filters import CatalogsProductGroupFilters from openapi_generated.pinterest_client.model.catalogs_product_group_filters_all_of import CatalogsProductGroupFiltersAllOf @@ -165,17 +291,58 @@ from openapi_generated.pinterest_client.model.catalogs_product_group_filters_request import CatalogsProductGroupFiltersRequest from openapi_generated.pinterest_client.model.catalogs_product_group_filters_request_any_of import CatalogsProductGroupFiltersRequestAnyOf from openapi_generated.pinterest_client.model.catalogs_product_group_filters_request_any_of1 import CatalogsProductGroupFiltersRequestAnyOf1 -from openapi_generated.pinterest_client.model.catalogs_product_group_merchant_based_case import CatalogsProductGroupMerchantBasedCase +from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_countries_criteria import CatalogsProductGroupMultipleCountriesCriteria from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_gender_criteria import CatalogsProductGroupMultipleGenderCriteria +from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_media_types_criteria import CatalogsProductGroupMultipleMediaTypesCriteria from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_string_criteria import CatalogsProductGroupMultipleStringCriteria from openapi_generated.pinterest_client.model.catalogs_product_group_multiple_string_list_criteria import CatalogsProductGroupMultipleStringListCriteria from openapi_generated.pinterest_client.model.catalogs_product_group_pricing_criteria import CatalogsProductGroupPricingCriteria -from openapi_generated.pinterest_client.model.catalogs_product_group_product_counts import CatalogsProductGroupProductCounts +from openapi_generated.pinterest_client.model.catalogs_product_group_pricing_currency_criteria import CatalogsProductGroupPricingCurrencyCriteria +from openapi_generated.pinterest_client.model.catalogs_product_group_product_counts_vertical import CatalogsProductGroupProductCountsVertical from openapi_generated.pinterest_client.model.catalogs_product_group_status import CatalogsProductGroupStatus from openapi_generated.pinterest_client.model.catalogs_product_group_type import CatalogsProductGroupType from openapi_generated.pinterest_client.model.catalogs_product_group_update_request import CatalogsProductGroupUpdateRequest -from openapi_generated.pinterest_client.model.catalogs_product_metadata import CatalogsProductMetadata +from openapi_generated.pinterest_client.model.catalogs_report import CatalogsReport +from openapi_generated.pinterest_client.model.catalogs_report_distribution_issue_filter import CatalogsReportDistributionIssueFilter +from openapi_generated.pinterest_client.model.catalogs_report_distribution_stats import CatalogsReportDistributionStats +from openapi_generated.pinterest_client.model.catalogs_report_feed_ingestion_filter import CatalogsReportFeedIngestionFilter +from openapi_generated.pinterest_client.model.catalogs_report_feed_ingestion_stats import CatalogsReportFeedIngestionStats +from openapi_generated.pinterest_client.model.catalogs_report_parameters import CatalogsReportParameters +from openapi_generated.pinterest_client.model.catalogs_report_stats import CatalogsReportStats +from openapi_generated.pinterest_client.model.catalogs_retail_batch_request import CatalogsRetailBatchRequest +from openapi_generated.pinterest_client.model.catalogs_retail_feed import CatalogsRetailFeed +from openapi_generated.pinterest_client.model.catalogs_retail_feeds_create_request import CatalogsRetailFeedsCreateRequest +from openapi_generated.pinterest_client.model.catalogs_retail_feeds_update_request import CatalogsRetailFeedsUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_retail_item_error_response import CatalogsRetailItemErrorResponse +from openapi_generated.pinterest_client.model.catalogs_retail_item_response import CatalogsRetailItemResponse +from openapi_generated.pinterest_client.model.catalogs_retail_items_batch import CatalogsRetailItemsBatch +from openapi_generated.pinterest_client.model.catalogs_retail_items_filter import CatalogsRetailItemsFilter +from openapi_generated.pinterest_client.model.catalogs_retail_items_post_filter import CatalogsRetailItemsPostFilter +from openapi_generated.pinterest_client.model.catalogs_retail_list_products_by_catalog_based_filter_request import CatalogsRetailListProductsByCatalogBasedFilterRequest +from openapi_generated.pinterest_client.model.catalogs_retail_product import CatalogsRetailProduct +from openapi_generated.pinterest_client.model.catalogs_retail_product_group import CatalogsRetailProductGroup +from openapi_generated.pinterest_client.model.catalogs_retail_product_group_create_request import CatalogsRetailProductGroupCreateRequest +from openapi_generated.pinterest_client.model.catalogs_retail_product_group_product_counts import CatalogsRetailProductGroupProductCounts +from openapi_generated.pinterest_client.model.catalogs_retail_product_group_update_request import CatalogsRetailProductGroupUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_retail_product_metadata import CatalogsRetailProductMetadata +from openapi_generated.pinterest_client.model.catalogs_retail_report_parameters import CatalogsRetailReportParameters from openapi_generated.pinterest_client.model.catalogs_status import CatalogsStatus +from openapi_generated.pinterest_client.model.catalogs_type import CatalogsType +from openapi_generated.pinterest_client.model.catalogs_updatable_creative_assets_attributes import CatalogsUpdatableCreativeAssetsAttributes +from openapi_generated.pinterest_client.model.catalogs_updatable_hotel_attributes import CatalogsUpdatableHotelAttributes +from openapi_generated.pinterest_client.model.catalogs_update_creative_assets_item import CatalogsUpdateCreativeAssetsItem +from openapi_generated.pinterest_client.model.catalogs_update_hotel_item import CatalogsUpdateHotelItem +from openapi_generated.pinterest_client.model.catalogs_update_retail_item import CatalogsUpdateRetailItem +from openapi_generated.pinterest_client.model.catalogs_upsert_creative_assets_item import CatalogsUpsertCreativeAssetsItem +from openapi_generated.pinterest_client.model.catalogs_upsert_hotel_item import CatalogsUpsertHotelItem +from openapi_generated.pinterest_client.model.catalogs_upsert_retail_item import CatalogsUpsertRetailItem +from openapi_generated.pinterest_client.model.catalogs_vertical_batch_request import CatalogsVerticalBatchRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_feeds_create_request import CatalogsVerticalFeedsCreateRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_feeds_update_request import CatalogsVerticalFeedsUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group import CatalogsVerticalProductGroup +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group_create_request import CatalogsVerticalProductGroupCreateRequest +from openapi_generated.pinterest_client.model.catalogs_vertical_product_group_update_request import CatalogsVerticalProductGroupUpdateRequest +from openapi_generated.pinterest_client.model.catalogs_verticals_list_products_by_catalog_based_filter_request import CatalogsVerticalsListProductsByCatalogBasedFilterRequest from openapi_generated.pinterest_client.model.condition_filter import ConditionFilter from openapi_generated.pinterest_client.model.conversion_api_response import ConversionApiResponse from openapi_generated.pinterest_client.model.conversion_api_response_events import ConversionApiResponseEvents @@ -199,10 +366,26 @@ from openapi_generated.pinterest_client.model.conversion_tag_type import ConversionTagType from openapi_generated.pinterest_client.model.conversion_tags_ocpm_eligible_response import ConversionTagsOcpmEligibleResponse from openapi_generated.pinterest_client.model.country import Country +from openapi_generated.pinterest_client.model.country_filter import CountryFilter +from openapi_generated.pinterest_client.model.create_asset_access_request_body import CreateAssetAccessRequestBody +from openapi_generated.pinterest_client.model.create_asset_access_request_body_asset_requests import CreateAssetAccessRequestBodyAssetRequests +from openapi_generated.pinterest_client.model.create_asset_access_request_error_message import CreateAssetAccessRequestErrorMessage +from openapi_generated.pinterest_client.model.create_asset_access_request_response import CreateAssetAccessRequestResponse +from openapi_generated.pinterest_client.model.create_asset_group_body import CreateAssetGroupBody +from openapi_generated.pinterest_client.model.create_asset_group_response import CreateAssetGroupResponse +from openapi_generated.pinterest_client.model.create_asset_invites_request import CreateAssetInvitesRequest +from openapi_generated.pinterest_client.model.create_asset_invites_request_item import CreateAssetInvitesRequestItem +from openapi_generated.pinterest_client.model.create_invites_results_response_array import CreateInvitesResultsResponseArray +from openapi_generated.pinterest_client.model.create_invites_results_response_array_invite import CreateInvitesResultsResponseArrayInvite +from openapi_generated.pinterest_client.model.create_invites_results_response_array_items import CreateInvitesResultsResponseArrayItems from openapi_generated.pinterest_client.model.create_mmm_report_request import CreateMMMReportRequest from openapi_generated.pinterest_client.model.create_mmm_report_request_all_of import CreateMMMReportRequestAllOf from openapi_generated.pinterest_client.model.create_mmm_report_response import CreateMMMReportResponse from openapi_generated.pinterest_client.model.create_mmm_report_response_data import CreateMMMReportResponseData +from openapi_generated.pinterest_client.model.create_membership_or_partnership_invites_body import CreateMembershipOrPartnershipInvitesBody +from openapi_generated.pinterest_client.model.creative_assets_id_filter import CreativeAssetsIdFilter +from openapi_generated.pinterest_client.model.creative_assets_processing_record import CreativeAssetsProcessingRecord +from openapi_generated.pinterest_client.model.creative_assets_visibility_type import CreativeAssetsVisibilityType from openapi_generated.pinterest_client.model.creative_type import CreativeType from openapi_generated.pinterest_client.model.currency import Currency from openapi_generated.pinterest_client.model.currency_filter import CurrencyFilter @@ -216,20 +399,41 @@ from openapi_generated.pinterest_client.model.customer_list_update_request import CustomerListUpdateRequest from openapi_generated.pinterest_client.model.data_output_format import DataOutputFormat from openapi_generated.pinterest_client.model.data_status import DataStatus +from openapi_generated.pinterest_client.model.delete_asset_group_body import DeleteAssetGroupBody +from openapi_generated.pinterest_client.model.delete_asset_group_response import DeleteAssetGroupResponse +from openapi_generated.pinterest_client.model.delete_asset_group_response_exceptions import DeleteAssetGroupResponseExceptions +from openapi_generated.pinterest_client.model.delete_invites_results_response_array import DeleteInvitesResultsResponseArray +from openapi_generated.pinterest_client.model.delete_invites_results_response_array_exception import DeleteInvitesResultsResponseArrayException +from openapi_generated.pinterest_client.model.delete_invites_results_response_array_items import DeleteInvitesResultsResponseArrayItems +from openapi_generated.pinterest_client.model.delete_member_access_result import DeleteMemberAccessResult +from openapi_generated.pinterest_client.model.delete_member_access_results_response_array import DeleteMemberAccessResultsResponseArray +from openapi_generated.pinterest_client.model.delete_partner_asset_access_body import DeletePartnerAssetAccessBody +from openapi_generated.pinterest_client.model.delete_partner_asset_access_body_accesses import DeletePartnerAssetAccessBodyAccesses +from openapi_generated.pinterest_client.model.delete_partner_assets_result import DeletePartnerAssetsResult +from openapi_generated.pinterest_client.model.delete_partner_assets_results_response_array import DeletePartnerAssetsResultsResponseArray +from openapi_generated.pinterest_client.model.delete_partners_request import DeletePartnersRequest +from openapi_generated.pinterest_client.model.delete_partners_response import DeletePartnersResponse +from openapi_generated.pinterest_client.model.deleted_members_response import DeletedMembersResponse from openapi_generated.pinterest_client.model.delivery_metrics_response import DeliveryMetricsResponse from openapi_generated.pinterest_client.model.delivery_metrics_response_items import DeliveryMetricsResponseItems +from openapi_generated.pinterest_client.model.detailed_error import DetailedError from openapi_generated.pinterest_client.model.enhanced_match_status_type import EnhancedMatchStatusType from openapi_generated.pinterest_client.model.entity_status import EntityStatus from openapi_generated.pinterest_client.model.error import Error from openapi_generated.pinterest_client.model.exception import Exception from openapi_generated.pinterest_client.model.feed_fields import FeedFields +from openapi_generated.pinterest_client.model.feed_fields1 import FeedFields1 +from openapi_generated.pinterest_client.model.feed_fields2 import FeedFields2 from openapi_generated.pinterest_client.model.follow_user_request import FollowUserRequest from openapi_generated.pinterest_client.model.gender import Gender from openapi_generated.pinterest_client.model.gender_filter import GenderFilter from openapi_generated.pinterest_client.model.gender_list import GenderList from openapi_generated.pinterest_client.model.get_audiences_order_by import GetAudiencesOrderBy +from openapi_generated.pinterest_client.model.get_business_asset_type_response import GetBusinessAssetTypeResponse +from openapi_generated.pinterest_client.model.get_business_assets_response import GetBusinessAssetsResponse from openapi_generated.pinterest_client.model.get_mmm_report_response import GetMMMReportResponse from openapi_generated.pinterest_client.model.get_mmm_report_response_data import GetMMMReportResponseData +from openapi_generated.pinterest_client.model.get_partner_assets_response import GetPartnerAssetsResponse from openapi_generated.pinterest_client.model.google_product_category0_filter import GoogleProductCategory0Filter from openapi_generated.pinterest_client.model.google_product_category1_filter import GoogleProductCategory1Filter from openapi_generated.pinterest_client.model.google_product_category2_filter import GoogleProductCategory2Filter @@ -238,16 +442,38 @@ from openapi_generated.pinterest_client.model.google_product_category5_filter import GoogleProductCategory5Filter from openapi_generated.pinterest_client.model.google_product_category6_filter import GoogleProductCategory6Filter from openapi_generated.pinterest_client.model.granularity import Granularity +from openapi_generated.pinterest_client.model.grid_click_type import GridClickType +from openapi_generated.pinterest_client.model.hotel_id_filter import HotelIdFilter +from openapi_generated.pinterest_client.model.hotel_processing_record import HotelProcessingRecord from openapi_generated.pinterest_client.model.image_details import ImageDetails from openapi_generated.pinterest_client.model.image_metadata import ImageMetadata +from openapi_generated.pinterest_client.model.image_metadata_images import ImageMetadataImages from openapi_generated.pinterest_client.model.inline_object import InlineObject +from openapi_generated.pinterest_client.model.inline_object1 import InlineObject1 +from openapi_generated.pinterest_client.model.integration_log import IntegrationLog +from openapi_generated.pinterest_client.model.integration_log_client_error import IntegrationLogClientError +from openapi_generated.pinterest_client.model.integration_log_client_request import IntegrationLogClientRequest +from openapi_generated.pinterest_client.model.integration_logs_invalid_log_response import IntegrationLogsInvalidLogResponse +from openapi_generated.pinterest_client.model.integration_logs_invalid_log_response_rejected_logs import IntegrationLogsInvalidLogResponseRejectedLogs +from openapi_generated.pinterest_client.model.integration_logs_request import IntegrationLogsRequest +from openapi_generated.pinterest_client.model.integration_logs_success_response import IntegrationLogsSuccessResponse from openapi_generated.pinterest_client.model.integration_metadata import IntegrationMetadata from openapi_generated.pinterest_client.model.integration_record import IntegrationRecord from openapi_generated.pinterest_client.model.integration_request import IntegrationRequest from openapi_generated.pinterest_client.model.integration_request_patch import IntegrationRequestPatch from openapi_generated.pinterest_client.model.interest import Interest +from openapi_generated.pinterest_client.model.invite_assets_summary import InviteAssetsSummary +from openapi_generated.pinterest_client.model.invite_assets_summary_ad_accounts import InviteAssetsSummaryAdAccounts +from openapi_generated.pinterest_client.model.invite_assets_summary_profiles import InviteAssetsSummaryProfiles +from openapi_generated.pinterest_client.model.invite_business_role_binding import InviteBusinessRoleBinding +from openapi_generated.pinterest_client.model.invite_exception_response import InviteExceptionResponse +from openapi_generated.pinterest_client.model.invite_response import InviteResponse +from openapi_generated.pinterest_client.model.invite_status import InviteStatus +from openapi_generated.pinterest_client.model.invite_type import InviteType from openapi_generated.pinterest_client.model.item_attributes import ItemAttributes from openapi_generated.pinterest_client.model.item_attributes_all_of import ItemAttributesAllOf +from openapi_generated.pinterest_client.model.item_attributes_request import ItemAttributesRequest +from openapi_generated.pinterest_client.model.item_attributes_request_all_of import ItemAttributesRequestAllOf from openapi_generated.pinterest_client.model.item_batch_record import ItemBatchRecord from openapi_generated.pinterest_client.model.item_create_batch_record import ItemCreateBatchRecord from openapi_generated.pinterest_client.model.item_delete_batch_record import ItemDeleteBatchRecord @@ -260,9 +486,12 @@ from openapi_generated.pinterest_client.model.item_response_any_of import ItemResponseAnyOf from openapi_generated.pinterest_client.model.item_response_any_of1 import ItemResponseAnyOf1 from openapi_generated.pinterest_client.model.item_update_batch_record import ItemUpdateBatchRecord +from openapi_generated.pinterest_client.model.item_upsert_batch_record import ItemUpsertBatchRecord from openapi_generated.pinterest_client.model.item_validation_event import ItemValidationEvent from openapi_generated.pinterest_client.model.keyword import Keyword +from openapi_generated.pinterest_client.model.keyword_all_of import KeywordAllOf from openapi_generated.pinterest_client.model.keyword_error import KeywordError +from openapi_generated.pinterest_client.model.keyword_list import KeywordList from openapi_generated.pinterest_client.model.keyword_metrics import KeywordMetrics from openapi_generated.pinterest_client.model.keyword_metrics_response import KeywordMetricsResponse from openapi_generated.pinterest_client.model.keyword_update import KeywordUpdate @@ -273,18 +502,34 @@ from openapi_generated.pinterest_client.model.keywords_response import KeywordsResponse from openapi_generated.pinterest_client.model.l1_interest_list import L1InterestList from openapi_generated.pinterest_client.model.language import Language +from openapi_generated.pinterest_client.model.lead_form_array_response import LeadFormArrayResponse +from openapi_generated.pinterest_client.model.lead_form_array_response_items import LeadFormArrayResponseItems from openapi_generated.pinterest_client.model.lead_form_common import LeadFormCommon +from openapi_generated.pinterest_client.model.lead_form_common_policy_links import LeadFormCommonPolicyLinks +from openapi_generated.pinterest_client.model.lead_form_create_request import LeadFormCreateRequest from openapi_generated.pinterest_client.model.lead_form_question import LeadFormQuestion from openapi_generated.pinterest_client.model.lead_form_question_field_type import LeadFormQuestionFieldType from openapi_generated.pinterest_client.model.lead_form_question_type import LeadFormQuestionType from openapi_generated.pinterest_client.model.lead_form_response import LeadFormResponse from openapi_generated.pinterest_client.model.lead_form_response_all_of import LeadFormResponseAllOf from openapi_generated.pinterest_client.model.lead_form_status import LeadFormStatus +from openapi_generated.pinterest_client.model.lead_form_test_request import LeadFormTestRequest +from openapi_generated.pinterest_client.model.lead_form_test_response import LeadFormTestResponse +from openapi_generated.pinterest_client.model.lead_form_update_request import LeadFormUpdateRequest +from openapi_generated.pinterest_client.model.lead_form_update_request_all_of import LeadFormUpdateRequestAllOf +from openapi_generated.pinterest_client.model.leads_export_create_request import LeadsExportCreateRequest +from openapi_generated.pinterest_client.model.leads_export_create_response import LeadsExportCreateResponse +from openapi_generated.pinterest_client.model.leads_export_response_data import LeadsExportResponseData +from openapi_generated.pinterest_client.model.leads_export_status import LeadsExportStatus from openapi_generated.pinterest_client.model.line_item import LineItem from openapi_generated.pinterest_client.model.linked_business import LinkedBusiness +from openapi_generated.pinterest_client.model.mmm_reporting_column import MMMReportingColumn +from openapi_generated.pinterest_client.model.mmm_reporting_targeting_type import MMMReportingTargetingType from openapi_generated.pinterest_client.model.match_type import MatchType from openapi_generated.pinterest_client.model.match_type_response import MatchTypeResponse from openapi_generated.pinterest_client.model.max_price_filter import MaxPriceFilter +from openapi_generated.pinterest_client.model.media_type import MediaType +from openapi_generated.pinterest_client.model.media_type_filter import MediaTypeFilter from openapi_generated.pinterest_client.model.media_upload import MediaUpload from openapi_generated.pinterest_client.model.media_upload_all_of import MediaUploadAllOf from openapi_generated.pinterest_client.model.media_upload_all_of_upload_parameters import MediaUploadAllOfUploadParameters @@ -292,6 +537,9 @@ from openapi_generated.pinterest_client.model.media_upload_request import MediaUploadRequest from openapi_generated.pinterest_client.model.media_upload_status import MediaUploadStatus from openapi_generated.pinterest_client.model.media_upload_type import MediaUploadType +from openapi_generated.pinterest_client.model.member_business_role import MemberBusinessRole +from openapi_generated.pinterest_client.model.members_to_delete_body import MembersToDeleteBody +from openapi_generated.pinterest_client.model.members_to_delete_body_members import MembersToDeleteBodyMembers from openapi_generated.pinterest_client.model.metrics import Metrics from openapi_generated.pinterest_client.model.metrics_reporting_level import MetricsReportingLevel from openapi_generated.pinterest_client.model.metrics_response import MetricsResponse @@ -300,16 +548,23 @@ from openapi_generated.pinterest_client.model.non_nullable_product_availability_type import NonNullableProductAvailabilityType from openapi_generated.pinterest_client.model.nullable_catalogs_item_field_type import NullableCatalogsItemFieldType from openapi_generated.pinterest_client.model.nullable_currency import NullableCurrency +from openapi_generated.pinterest_client.model.oauth_access_token_request_client_credentials import OauthAccessTokenRequestClientCredentials +from openapi_generated.pinterest_client.model.oauth_access_token_request_client_credentials_all_of import OauthAccessTokenRequestClientCredentialsAllOf from openapi_generated.pinterest_client.model.oauth_access_token_request_code import OauthAccessTokenRequestCode from openapi_generated.pinterest_client.model.oauth_access_token_request_code_all_of import OauthAccessTokenRequestCodeAllOf from openapi_generated.pinterest_client.model.oauth_access_token_request_refresh import OauthAccessTokenRequestRefresh from openapi_generated.pinterest_client.model.oauth_access_token_request_refresh_all_of import OauthAccessTokenRequestRefreshAllOf from openapi_generated.pinterest_client.model.oauth_access_token_response import OauthAccessTokenResponse +from openapi_generated.pinterest_client.model.oauth_access_token_response_client_credentials import OauthAccessTokenResponseClientCredentials from openapi_generated.pinterest_client.model.oauth_access_token_response_code import OauthAccessTokenResponseCode from openapi_generated.pinterest_client.model.oauth_access_token_response_code_all_of import OauthAccessTokenResponseCodeAllOf +from openapi_generated.pinterest_client.model.oauth_access_token_response_everlasting_refresh import OauthAccessTokenResponseEverlastingRefresh +from openapi_generated.pinterest_client.model.oauth_access_token_response_everlasting_refresh_all_of import OauthAccessTokenResponseEverlastingRefreshAllOf from openapi_generated.pinterest_client.model.oauth_access_token_response_integration_refresh import OauthAccessTokenResponseIntegrationRefresh from openapi_generated.pinterest_client.model.oauth_access_token_response_refresh import OauthAccessTokenResponseRefresh +from openapi_generated.pinterest_client.model.oauth_access_token_response_refresh_all_of import OauthAccessTokenResponseRefreshAllOf from openapi_generated.pinterest_client.model.objective_type import ObjectiveType +from openapi_generated.pinterest_client.model.operation_type import OperationType from openapi_generated.pinterest_client.model.optimization_goal_metadata import OptimizationGoalMetadata from openapi_generated.pinterest_client.model.optimization_goal_metadata_conversion_tag_v3_goal_metadata import OptimizationGoalMetadataConversionTagV3GoalMetadata from openapi_generated.pinterest_client.model.optimization_goal_metadata_conversion_tag_v3_goal_metadata_attribution_windows import OptimizationGoalMetadataConversionTagV3GoalMetadataAttributionWindows @@ -326,8 +581,13 @@ from openapi_generated.pinterest_client.model.order_lines_array_response import OrderLinesArrayResponse from openapi_generated.pinterest_client.model.pacing_delivery_type import PacingDeliveryType from openapi_generated.pinterest_client.model.paginated import Paginated +from openapi_generated.pinterest_client.model.partner_type import PartnerType +from openapi_generated.pinterest_client.model.permissions import Permissions +from openapi_generated.pinterest_client.model.permissions_response import PermissionsResponse +from openapi_generated.pinterest_client.model.permissions_with_owner import PermissionsWithOwner from openapi_generated.pinterest_client.model.pin import Pin from openapi_generated.pinterest_client.model.pin_analytics_metrics_response import PinAnalyticsMetricsResponse +from openapi_generated.pinterest_client.model.pin_analytics_metrics_response_daily_metrics import PinAnalyticsMetricsResponseDailyMetrics from openapi_generated.pinterest_client.model.pin_analytics_response import PinAnalyticsResponse from openapi_generated.pinterest_client.model.pin_create import PinCreate from openapi_generated.pinterest_client.model.pin_media import PinMedia @@ -356,27 +616,74 @@ from openapi_generated.pinterest_client.model.pin_update_carousel_slots import PinUpdateCarouselSlots from openapi_generated.pinterest_client.model.pinterest_tag_event_data import PinterestTagEventData from openapi_generated.pinterest_client.model.placement_group_type import PlacementGroupType +from openapi_generated.pinterest_client.model.placement_multipliers import PlacementMultipliers +from openapi_generated.pinterest_client.model.price_filter import PriceFilter from openapi_generated.pinterest_client.model.product_availability_type import ProductAvailabilityType from openapi_generated.pinterest_client.model.product_group_analytics_response import ProductGroupAnalyticsResponse from openapi_generated.pinterest_client.model.product_group_promotion import ProductGroupPromotion from openapi_generated.pinterest_client.model.product_group_promotion_create_request import ProductGroupPromotionCreateRequest +from openapi_generated.pinterest_client.model.product_group_promotion_create_request_element import ProductGroupPromotionCreateRequestElement +from openapi_generated.pinterest_client.model.product_group_promotion_create_request_element_all_of import ProductGroupPromotionCreateRequestElementAllOf from openapi_generated.pinterest_client.model.product_group_promotion_response import ProductGroupPromotionResponse +from openapi_generated.pinterest_client.model.product_group_promotion_response_element import ProductGroupPromotionResponseElement from openapi_generated.pinterest_client.model.product_group_promotion_response_item import ProductGroupPromotionResponseItem from openapi_generated.pinterest_client.model.product_group_promotion_update_request import ProductGroupPromotionUpdateRequest +from openapi_generated.pinterest_client.model.product_group_reference_filter import ProductGroupReferenceFilter from openapi_generated.pinterest_client.model.product_group_summary_status import ProductGroupSummaryStatus -from openapi_generated.pinterest_client.model.product_groups_create_request_feed_base_case import ProductGroupsCreateRequestFeedBaseCase from openapi_generated.pinterest_client.model.product_type0_filter import ProductType0Filter from openapi_generated.pinterest_client.model.product_type1_filter import ProductType1Filter from openapi_generated.pinterest_client.model.product_type2_filter import ProductType2Filter from openapi_generated.pinterest_client.model.product_type3_filter import ProductType3Filter from openapi_generated.pinterest_client.model.product_type4_filter import ProductType4Filter +from openapi_generated.pinterest_client.model.quiz_pin_data import QuizPinData +from openapi_generated.pinterest_client.model.quiz_pin_option import QuizPinOption +from openapi_generated.pinterest_client.model.quiz_pin_question import QuizPinQuestion +from openapi_generated.pinterest_client.model.quiz_pin_result import QuizPinResult from openapi_generated.pinterest_client.model.related_terms import RelatedTerms from openapi_generated.pinterest_client.model.related_terms_related_terms_list import RelatedTermsRelatedTermsList from openapi_generated.pinterest_client.model.reporting_column_async import ReportingColumnAsync +from openapi_generated.pinterest_client.model.respond_to_invites_response_array import RespondToInvitesResponseArray +from openapi_generated.pinterest_client.model.respond_to_invites_response_array_items import RespondToInvitesResponseArrayItems +from openapi_generated.pinterest_client.model.role import Role +from openapi_generated.pinterest_client.model.ssio_account_address import SSIOAccountAddress +from openapi_generated.pinterest_client.model.ssio_account_item import SSIOAccountItem +from openapi_generated.pinterest_client.model.ssio_account_pmp_name import SSIOAccountPMPName +from openapi_generated.pinterest_client.model.ssio_account_response import SSIOAccountResponse +from openapi_generated.pinterest_client.model.ssio_create_insertion_order_request import SSIOCreateInsertionOrderRequest +from openapi_generated.pinterest_client.model.ssio_create_insertion_order_request_all_of import SSIOCreateInsertionOrderRequestAllOf +from openapi_generated.pinterest_client.model.ssio_create_insertion_order_response import SSIOCreateInsertionOrderResponse +from openapi_generated.pinterest_client.model.ssio_edit_insertion_order_request import SSIOEditInsertionOrderRequest +from openapi_generated.pinterest_client.model.ssio_edit_insertion_order_request_all_of import SSIOEditInsertionOrderRequestAllOf +from openapi_generated.pinterest_client.model.ssio_edit_insertion_order_response import SSIOEditInsertionOrderResponse +from openapi_generated.pinterest_client.model.ssio_insertion_order_common import SSIOInsertionOrderCommon +from openapi_generated.pinterest_client.model.ssio_insertion_order_status import SSIOInsertionOrderStatus +from openapi_generated.pinterest_client.model.ssio_insertion_order_status_response import SSIOInsertionOrderStatusResponse +from openapi_generated.pinterest_client.model.ssio_order_line import SSIOOrderLine +from openapi_generated.pinterest_client.model.shared_audience import SharedAudience +from openapi_generated.pinterest_client.model.shared_audience1 import SharedAudience1 +from openapi_generated.pinterest_client.model.shared_audience_account import SharedAudienceAccount +from openapi_generated.pinterest_client.model.shared_audience_common import SharedAudienceCommon +from openapi_generated.pinterest_client.model.shared_audience_response import SharedAudienceResponse +from openapi_generated.pinterest_client.model.shared_audience_response1 import SharedAudienceResponse1 +from openapi_generated.pinterest_client.model.shared_audience_response_common import SharedAudienceResponseCommon from openapi_generated.pinterest_client.model.single_interest_targeting_option_response import SingleInterestTargetingOptionResponse +from openapi_generated.pinterest_client.model.summary_pin import SummaryPin +from openapi_generated.pinterest_client.model.targeting_advertiser_country import TargetingAdvertiserCountry from openapi_generated.pinterest_client.model.targeting_option_response import TargetingOptionResponse from openapi_generated.pinterest_client.model.targeting_spec import TargetingSpec +from openapi_generated.pinterest_client.model.targeting_spec_app_type import TargetingSpecAppType from openapi_generated.pinterest_client.model.targeting_spec_shoppingretargeting import TargetingSpecSHOPPINGRETARGETING +from openapi_generated.pinterest_client.model.targeting_template_audience_sizing import TargetingTemplateAudienceSizing +from openapi_generated.pinterest_client.model.targeting_template_audience_sizing_reach_estimate import TargetingTemplateAudienceSizingReachEstimate +from openapi_generated.pinterest_client.model.targeting_template_common import TargetingTemplateCommon +from openapi_generated.pinterest_client.model.targeting_template_create import TargetingTemplateCreate +from openapi_generated.pinterest_client.model.targeting_template_create_all_of import TargetingTemplateCreateAllOf +from openapi_generated.pinterest_client.model.targeting_template_get_response_data import TargetingTemplateGetResponseData +from openapi_generated.pinterest_client.model.targeting_template_get_response_data1 import TargetingTemplateGetResponseData1 +from openapi_generated.pinterest_client.model.targeting_template_keyword import TargetingTemplateKeyword +from openapi_generated.pinterest_client.model.targeting_template_response_data import TargetingTemplateResponseData +from openapi_generated.pinterest_client.model.targeting_template_response_data1 import TargetingTemplateResponseData1 +from openapi_generated.pinterest_client.model.targeting_template_update_request import TargetingTemplateUpdateRequest from openapi_generated.pinterest_client.model.targeting_type_filter import TargetingTypeFilter from openapi_generated.pinterest_client.model.template_response import TemplateResponse from openapi_generated.pinterest_client.model.template_response_date_range import TemplateResponseDateRange @@ -396,11 +703,35 @@ from openapi_generated.pinterest_client.model.trending_keywords_response_trends import TrendingKeywordsResponseTrends from openapi_generated.pinterest_client.model.trends_supported_region import TrendsSupportedRegion from openapi_generated.pinterest_client.model.updatable_item_attributes import UpdatableItemAttributes +from openapi_generated.pinterest_client.model.update_asset_group_body import UpdateAssetGroupBody +from openapi_generated.pinterest_client.model.update_asset_group_body_asset_groups_to_update import UpdateAssetGroupBodyAssetGroupsToUpdate +from openapi_generated.pinterest_client.model.update_asset_group_response import UpdateAssetGroupResponse +from openapi_generated.pinterest_client.model.update_asset_group_response_exceptions import UpdateAssetGroupResponseExceptions +from openapi_generated.pinterest_client.model.update_invites_results_response_array import UpdateInvitesResultsResponseArray +from openapi_generated.pinterest_client.model.update_invites_results_response_array_items import UpdateInvitesResultsResponseArrayItems +from openapi_generated.pinterest_client.model.update_mask_bid_option_field import UpdateMaskBidOptionField +from openapi_generated.pinterest_client.model.update_mask_field_type import UpdateMaskFieldType +from openapi_generated.pinterest_client.model.update_member_asset_access_body import UpdateMemberAssetAccessBody +from openapi_generated.pinterest_client.model.update_member_asset_access_body_accesses import UpdateMemberAssetAccessBodyAccesses +from openapi_generated.pinterest_client.model.update_member_assets_results_response_array import UpdateMemberAssetsResultsResponseArray +from openapi_generated.pinterest_client.model.update_member_assets_results_response_array_items import UpdateMemberAssetsResultsResponseArrayItems +from openapi_generated.pinterest_client.model.update_member_business_role_body import UpdateMemberBusinessRoleBody +from openapi_generated.pinterest_client.model.update_member_result import UpdateMemberResult +from openapi_generated.pinterest_client.model.update_member_results_response_array import UpdateMemberResultsResponseArray +from openapi_generated.pinterest_client.model.update_partner_asset_access_body import UpdatePartnerAssetAccessBody +from openapi_generated.pinterest_client.model.update_partner_asset_access_body_accesses import UpdatePartnerAssetAccessBodyAccesses +from openapi_generated.pinterest_client.model.update_partner_assets_result import UpdatePartnerAssetsResult +from openapi_generated.pinterest_client.model.update_partner_assets_results_response_array import UpdatePartnerAssetsResultsResponseArray +from openapi_generated.pinterest_client.model.update_partner_results_response_array import UpdatePartnerResultsResponseArray +from openapi_generated.pinterest_client.model.update_partner_results_response_array_items import UpdatePartnerResultsResponseArrayItems +from openapi_generated.pinterest_client.model.user_business_role_binding import UserBusinessRoleBinding from openapi_generated.pinterest_client.model.user_following_feed_type import UserFollowingFeedType from openapi_generated.pinterest_client.model.user_list_operation_type import UserListOperationType from openapi_generated.pinterest_client.model.user_list_type import UserListType +from openapi_generated.pinterest_client.model.user_single_asset_binding import UserSingleAssetBinding from openapi_generated.pinterest_client.model.user_summary import UserSummary from openapi_generated.pinterest_client.model.user_website_summary import UserWebsiteSummary from openapi_generated.pinterest_client.model.user_website_verification_code import UserWebsiteVerificationCode from openapi_generated.pinterest_client.model.user_website_verify_request import UserWebsiteVerifyRequest +from openapi_generated.pinterest_client.model.users_for_individual_asset_response import UsersForIndividualAssetResponse from openapi_generated.pinterest_client.model.video_metadata import VideoMetadata diff --git a/openapi_generated/pinterest_client/rest.py b/openapi_generated/pinterest_client/rest.py index 9dd468f..7787226 100644 --- a/openapi_generated/pinterest_client/rest.py +++ b/openapi_generated/pinterest_client/rest.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ diff --git a/setup.py b/setup.py index 2994807..4edae42 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ Pinterest's REST API # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.14.0 Contact: pinterest-api@pinterest.com Generated by: https://openapi-generator.tech """ @@ -15,7 +15,7 @@ import os -VERSION = "0.1.8" +VERSION = "0.1.9" _IS_TEST_BUILD = os.environ.get("IS_TEST_BUILD", 0) if _IS_TEST_BUILD: diff --git a/spec/Makefile b/spec/Makefile index 6ba80a6..782c027 100644 --- a/spec/Makefile +++ b/spec/Makefile @@ -22,7 +22,7 @@ ifeq ($(DEBUG_OPS),1) GENERATOR_FLAGS += --global-property debugOperations=true endif -all: download_spec validate_spec generate_client ## General external client +all: validate_spec generate_client ## General external client download_spec: ## Download openapi.yaml from public pinterest github repo @echo ====Download openapi.yaml from public pinterest github repo==== diff --git a/spec/config.yml b/spec/config.yml index 0f0bdd5..151bf76 100644 --- a/spec/config.yml +++ b/spec/config.yml @@ -3,7 +3,7 @@ generatorStability: STABLE generatorType: CLIENT generatorLanguage: python inputSpec: openapi.yaml -packageVersion: 0.1.8 +packageVersion: 0.1.9 projectName: Pinterest_Generated_Client templateDir: templates packageName: openapi_generated.pinterest_client